While developing applications in VS.NET, the project will not open if the project directory is changed or renamed. This can be resolved by editing the .webInfo file in the project.
Consider that we create a new project from VS.NET an specify location as
VS.NET will do the following:
1. Create a physical folder where this virtual location is mapped, say as d:worksWebApplication1
2. Create at the required project files including Global.asax, web.config etc.
3. Now, you can add Web Forms and continue with the development of web pages.
Suppose now we need to move the application from 'works' folder to 'testing'
folder, that is in 'd:testing'. The steps to be followed are:
1. Move the 'WebApplicaiton1' directory from 'd:works' to 'd:testing'
2. Now if you try to open the project, VS.NET throws error that 'file path does not correspond to the url'
3. To resolve this problem, in the 'webapplication1', you can find the file 'webapplication1.csproj.webinfo'
The content will be
<VisualStudioUNCWeb> <Web URLPath = "http://localhost/works/WebApplication1/WebApplication1.csproj" /> </VisualStudioUNCWeb>
Modify the XML content as
<VisualStudioUNCWeb> <Web URLPath="http://localhost/testing/WebApplication1/WebApplication1.csproj" /> </VisualStudioUNCWeb>4. Now the project can be opened and you can
This was first published in February 2002