|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
New Features - Part 2
New Options There are a lot of new options in the ToolsàOptions dialog in Visual Studio .NET 2003. For instance, there are several new options added to the “Environment/Projects and Solutions” node. The new options allow you to have the Solutions Explorer automatically sync with the current active document, to run projects without saving the files within them (very handing for testing), and to determine exactly what projects are built under what circumstances. Below is an image of these options, with red arrows pointing them out. For those of you who, for some reason, don’t like the MRUM (most recently used members) feature, there is a corresponding option to turn that off for the language of your choice, as is seen below. One handy feature of VB6 was the procedure separator lines the IDE drew into the code window so it was easier to tell where one method ended, and another began. Visual Studio .NET 2003 now brings that feature back for VB.NET developers. The option is shown below. There is an entirely new set of options available, called “Device Tools”, then allow you to configure various aspects of Smart Device development. (Pocket PC, for instance.) The two nodes of the new options set are shown below. There is a new “VB Defaults” node underneath the “Projects” options set. It allows you to set various defaults used by Visual Studio .NET 2003 when it creates a new VB.NET project. It includes options for “Option Explicit”, “Option Strict”, and “Option Compare”, just as VB6 did. Below is an image of the new node. Miscellaneous Improvements You now have the ability to expand and collapse nodes in any XML schema you view inside the Visual Studio .NET 2003 designer. Below is an image of an XML schema with some nodes collapsed to demonstrate. This is very nice, but there should be a similar feature for plain old XML documents. Microsoft should have allowed you to do what Internet Explorer does, and collapse/expand nodes directly in the textual representation of the document. With C#, you can now add custom build steps (both pre-build and post-build) to the build process. This is extremely handy when just building the project isn’t quite enough to get everything running happily. For instance, you may need to copy some files from one folder to another, obfuscate your compiled MSIL, or run some documentation scripts you’ve written. Below is an image of the new build steps screen in the C# project properties dialog, as well as an image of the tool that helps you build the commands. You can run anything as a pre/post build step, as long as you could execute that same line (minus environment variables) on the command line. I played around with this quite a bit, and I was unable to get it to run anything. It always completed the build, and informed me that the build step I specified failed. This was probably me just being stupid, so we can chalk this one up to user ignorance. At any rate, the build step can include environment variables (like “{$ProjectDir}”) that are evaluated to their correct values at build time. The Visual Basic Upgrade Wizard is now much improved over Visual Studio .NET2002’s. To test out its new abilities, I attempted to convert a fairly complicated Name Server Lookup application (full VB6 source available on my website here) in both Visual Studio .NET 2002 and Visual Studio .NET 2003. The Visual Studio .NET 2002 attempt crashed about 5 seconds into the conversion. The Visual Studio .NET 2003 was quite successful. In fact, I only had to change 1 line of code to get the application to run! (The line assigned a value of -1 to a byte variable, which in .NET, is impossible.) Below are two images, one of the converted GUI, and one of the Upgrade Report. The application didn’t work completely, but it did a lot more than I expected. (It was unable to process the resource records in the DNS packet, which is the most complex part of the application. I didn’t take the time to figure out why.) In addition to being able to upgrade an entire VB6 project to VB.NET, you can now also upgrade just a small piece of code using the Code Snippet Upgrade Wizard pictured below. This is very useful for when you have a small chunk of code in a larger project that you need to convert for use in a new VB.NET project. There is finally a folder browser WinForms control that you can use in an application where the user needs to select a directory. This was a big oversight in Visual Studio .NET 2002, and I’m very happy to see it in Visual Studio .NET 2003. Below is an image showing the new control in action. Lastly, there have been some pretty major improvements to VC++.NET. Among them is the ability to design WinForms like in VB.NET and C#. Alas, I forgot to install VC++.NET, and so I have no screen shots to show all you VC++.NET developers out there. All 6 of you. J Now that we’ve gone through all the improvements I could find in Visual Studio .NET 2003, let’s go over some of the major new features and tools included in Visual Studio .NET 2003. Code Obfuscation via Dotfuscator One major complaint often voiced about .NET is how easy it is to translate the MSIL that lives in your EXEs and DLLs into the original source, or even source in a different language than the original. Many often respond to this by saying that any language can be decompiled, so .NET is no different. This is obviously a copout, as anybody can see that it is far more difficult to understand decompiled C++ than it is to understand decompiled MSIL. To help protect intellectual property, Microsoft decided to include a version of DotFuscator by Preemptive Solutions, an MSIL obfuscator that makes it more difficult to decompile MSIL, and more difficult to read the resulting C# or VB.NET when it is decompiled. The “Community Edition” included with Visual Studio .NET 2003 is somewhat crippled when compared to the full “Pro” version, but it does a decent job of obfuscating code. Below is an image of the nag-dialog that pops up until you register DotFuscator. I included the image because it lists the benefits of upgrading to the “Pro” version.
As you can see, the program itself isn’t exactly a gem of user interface design. It’s fairly unattractive to look at, and not particular intuitive to use. It does offer some nifty features, however, including an “Output” view that shows in a graphical way what has been changed during the obfuscation process. An image of this view is shown below. Overall, I would say this tool is just average. There are certainly better tools than DotFuscator available, although none of them are free. I was kind of hoping that Microsoft was developing an obfuscator in-house that would be completely integrated into Visual Studio .NET, but their inclusion of DotFuscator seems to make that possibility very unlikely anytime soon. For more detailed information about DotFuscator and what it can do, check out preemptive solution’s website.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||