Over the last few days I had no less than four people point out to me that they are having problems with my free ASP.NET Compiler UI utility. Wonder what's going on that a number of people are running into this? I suspect a whole lot more have hit this and this is just the first that I hear about this...
For background: The utility acts as a graphical front end for most of the features the ASP.NET command line compiler (ASPNET_COMPILER.EXE in ASP.NET 2.0) as well as the new Web Deployment Projects (which allows you to compile to a single assembly). It provides a number of useful features, such as the ability to save compiler settings, create a batch file, jump you to the deployment directory and more. It's a great way to experiment with the myriad of compilation options that ASP.NET 2.0 offers and see what fits best for your needs.
The tool can be found here:
http://www.west-wind.com/tools/aspnetcompiler.asp
Anyway a number of people have run into a problem where they run the tool and get an error that says that the file couldn't be found:
Compiler Execution failed:
The system cannot find the path specified
This is not exactly a bug <s> - it's related to the fact that the initial .NET version that is displayed in the .NET version dropdown is hardcoded to an old beta version which likely isn't installed on your system <s>. The fix is simply to go into the drop down and choose the right version (2.0.50727)…
The Compiler tool, looks up .NET versions and dumps them intot he dropdown but the initial value set is a default value which is hardcoded. I've made the logical change to use the current, running version number as the default (but that may be overridden by the last compilation you ran). The download has been updated to reflect this change.
Formatting the .NET Version Number
Incidentally, I hate trying to figure out which parts of the Environment.Version I need to come up with the above version number, which is the scheme used by Windows to store .NET versions on disk and what this tool uses to figure out which version is installed.
In case you're as forgetful of me what the numbers mean, this does the trick:
this.AspNetVersion = string.Format("{0}.{1}.{2}",
System.Environment.Version.Major,
System.Environment.Version.Minor,
System.Environment.Version.Build);
Maybe I'll remember that for next time now that I've written it down…