views:

28

answers:

1

Visual Studio is asking to create virtual directories in IIS when I open a solution. Could this be because projects within the solution have been configured to use IIS rather than Cassini?

The dialog message is:

"The local URI ... specified for Web project ... has not been configured. In order to open this project the virtual directory needs to be configured. Would you like to create the virtual directory now?"

+1  A: 

Yes it is. If a web project is configured to use IIS (on the Web tab in the project properties -> "Use local IIS web server"), Visual Studio requires that the path defined exists in IIS as a virtual directory and corresponds to the project's location on disk. If the path does not exist in IIS, Visual Studio will offer to create it for you.

adrianbanks
Thanks Adrian. What are the headline benefits of doing this? It is causing me additional effort when I switch to work on code in a branch, because VS seems to care from which project each virtual directory was created, meaning I have to delete all the virtual directories in IIS each time I switch branches (of my working copy). Is this something you've experienced?
Ben Aston
@Ben: Yes, it is a pain when working on branches. After a few times though, it is relatively quick to set up as you become familiar with what needs configuring. I prefer to use IIS because it means that my web application keeps running after I stop debugging it with Visual Studio, meaning it can still be used. Also, when developing new functionality, I hit compile and then switch to a browser, without having to start the built-in web server or start debugging.
adrianbanks
OK, I'll live with the pain. Sincere thanks
Ben Aston