18 Feb 2009

How to change the name of the Virtual Directory

By default, when you create a Web Setup Project in Visual Studio, the name of the Virtual Directory it will deploy to is the name that you gave to the Web Setup Project. This can be changed in the property window of the "Web Application Folder" element. At the bottom of the property window, there is a property called VirtualDirectory. If you want the setup to install your application in a subdirectory, you can specify directories using the / character.

WebSetupVirtualDirectory

Simple, but took me some time to find it (I don't use Web Setup Project very often I have to say).

When I deploy (or when I run the Setup), some of the files are not copied

I had this problem lately. My web project contained a .scv file, and the file was never copied to the IIS virtual directory when using the Deploy... option of Visual Studio, nor was it copied by the Web Setup Project. Actually, this has to do with the Build Action property of the file. If it is set to "None", the file will not be copied. It has to be set to "Content" for the file to be copied as is.

FileBuildAction

When I create a .svc file in my projects, I generally select "Text File" and name it with svc extension. By default, text files have their Build Action set to "None".

Here are two links to articles that contain very useful information on Web Setup Projects:



blog comments powered by Disqus