Thursday, July 9, 2015

.webinfo file needed when Can't open my VS2003 project: The project you are trying to open is a Web project. You need...

Re: Can't open my VS2003 project: The project you are trying to open is a Web project. You need...

Mar 05, 2007 12:44 PM|LINK

    <Web URLPath = "http://localhost/Folder/fred.csproj" />
Folder is the application name of the  in the IIS manager website properties
ex. xyzService is the application name


VB.net

<VisualStudioUNCWeb>
    <Web URLPath = "http://localhost/xyzService/xyzServices.vbproj" />
</VisualStudioUNCWeb>




To fix this error all you need to do is add a webinfo file.  If your using VSS for source control, it's probably a good idea to add the webinfo file to SourceSafe as well as this is not done for you automatically.
If you have a project file c:\Inetpub\wwwroot\Folder\fred.csproj then you need a corresponding webinfo file fred.csproj.webinfo.  The contents of the webinfo file looks like this:
<VisualStudioUNCWeb>
    <Web URLPath = "http://localhost/Folder/fred.csproj" />
</VisualStudioUNCWeb>
When you go to add this web project to your solution file you actually don't specify “Add Existing Project From Web”, but simply “Add Existing Project”, then browse to c:\Inetpub\wwwroot\Folder\fred.csproj

No comments:

Post a Comment