... until the collector arrives ...

This "blog" is really just a scratchpad of mine. There is not much of general interest here. Most of the content is scribbled down "live" as I discover things I want to remember. I rarely go back to correct mistakes in older entries. You have been warned :)

2004-10-07

Visual Studio

The way Visual Studio 2003 handles web projects still sucks.  As I noted before, there is a way to work around most of the problems discussed at:

ASP.NET Applications without Web Projects

In the end, however, these were the steps I followed to get things to work in my project:

  1. Create a deploy directory to hold your assembled web application.  Add this directory to your web server instead of the default build outputs directory.
  2. Create a post-build script to copy the build outputs to the deploy directory, as well as other critical files like the *.aspx, Global.asax, Web.config, etc.  Note that the DLLs for the application must be contained in a directory tree rooted in a directory called bin.  A sample post-build script might look like:
    del/s/q $(ProjectDir)deploy
    xcopy/y/f $(ProjectDir)Web.config $(ProjectDir)deploy
    xcopy/y/f $(ProjectDir)Global.asax $(ProjectDir)deploy
    xcopy/y/f $(ProjectDir)*.aspx $(ProjectDir)deploy
    xcopy/y/f $(TargetDir)*.dll $(ProjectDir)deploy\bin
  3. Make sure you have a Web.config file and that the attribute /configuration/compilation/@debug is true.
  4. Edit the project's configuration properties so that:
    1. Debugging\Enable ASP.NET Debugging is true
    2. Debugging\Debug Mode is URL
    3. Debugging\Start URL is the URL of your page

Also, as a one-time operation on any given Visual Studio installation, I followed the steps on the web site referenced above to get make all of the web items available on the "new item" palette.  Specifically, I added the following lines to the of the file VC#\CSharpProjectItems\LocalProjectItems\localprojectitems.vsdir in the VS installation directory:

..\CSharpAddWebFormWiz.vsz|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|#2236|10|#2263|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|4534|0|WebForm.aspx
..\CSharpAddWebServiceWiz.vsz|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|#2243|20|#2266|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|4521|0|Service.asmx
..\CSharpAddMobileWebFormWiz.vsz|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|#2398|25|#2399|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|4571|0|MobileWebForm.aspx
..\CSharpAddGlobalASAX.vsz|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|#2304|160|#2305|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|4542|8192|Global.asax
..\CSharpAddMobileWebFormWiz.vsz|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|#2398|25|#2399|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|4571|0|MobileWebForm.aspx
..\CSharpAddMobileWebUserControl.vsz|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|#2400|56|#2401|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|4572|0|MobileWebUserControl.ascx
..\CSharpAddWebConfig.vsz|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|#2312|170|#2313|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|4545|8192|Web.config
..\CSharpAddWebDataForm.vsz|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|#2380|45|#2381|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|4559|0|DataForm.aspx
..\CSharpAddWebFormWiz.vsz|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|#2236|10|#2263|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|4534|0|WebForm.aspx
..\CSharpAddWebServiceWiz.vsz|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|#2243|20|#2266|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|4521|0|Service.asmx
..\CSharpAddWebUserControl.vsz|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|#2378|55|#2379|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|4558|0|WebUserControl.ascx
..\StaticDisco.disco|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|#2393|155|#2394|{FAE04EC1-301F-11d3-BF4B-00C04F79EFBC}|4525|0|Disco.disco

Blog Archive