Unable to Open Web Project

K

kevin.koehne

I'm having a problem building a solution in VS2003 (.NET 1.1) on
Windows XP. I get the error:
"Unable to open Web project 'projname'. The file path
'C:\app-1.6.0.600\solution\projname' does not correspond to the URL
'http://localhost/projname'. The two need to map to the same server
location."

What is frustrating me is that the error message is technically
correct; that particular URL is not pointing at that specific system
path. In IIS manager, the virtual directory "projname" is pointing at a
folder called :C:\app-1.7.0.602\solution\projname".

Just as an FYI, the way that we are doing our builds, is that for every
release, we create a new folder named with the version number and then
repoint all of the virtual directories to the new folders. It appears
that the solution doesn't realize that the virtual directory points at
a new folder - but there doesn't seem to be any file in which the old
folder name is stored.

This process has been working for the last 1 1/2 years and the only
change to the server that I am aware of is that we've installed .NET
2.0 on the machine in order to run the new SQL Server 2005 Manager.

Any help in figuring out what is going on would be appreciated.

Thanks,
Kevin Koehne
 
J

Juan T. Llibre

Your project file is expecting the Web application to be a virtual root
(http://localhost/projname) but is not finding the virtual directory.

Since, In IIS manager, the virtual directory "projname" is pointing at a
folder called "C:\app-1.7.0.602\solution\projname" and you say that
VS is going to 'C:\app-1.6.0.600\solution\projname', you can back up
C:\app-1.6.0.600\solution\projname, delete the project files, and open
the project solution at C:\app-1.7.0.602\solution\projname.

You may need to edit the "C:\app-1.7.0.602\solution\projname" project's
webinfo file with Notepad to reflect the correct virtual directory.

It should read :

<VisualStudioUNCWeb>
<Web URLPath = "http://localhost/projname.csproj" />
</VisualStudioUNCWeb>

If you are using vb.net, of course, the projectname will have vb in it, instead of cs.
 
K

kevin.koehne

Thanks Juan,

The unusual bit is that I am not trying to build the old solution in
the ".600" folder. It is simply a copy of the last version. Here are
some other details that may clarify my situation.

* The vbproj file is in the folder "c:\app-1.7.0.602\solution\projname"
* "http://localhost/projname" is configured to point
"c:\app-1.7.0.602\solution\projname"
* The webinfo file in "c:\app-1.7.0.602\solution\projname" is pointing
to "http://localhost/projname".

I am manually building the solution from the command line. So, I am at
the command line, my current directory is
"c:\app-1.7.0.602\solution\projname". I execute "devenv /build debug
base.sln". That's when I get the error I described above. It's like
"devenv" thinks that I'm compiling in the old directory.

I was thinking that maybe VS was caching the mapping between the folder
and the URL, so I cleared all of the caches, but I still get the error.

Thanks again for your help.
Kevin
 
K

kevin.koehne

I figured out what the issue was. The short answer was that it was due
to the fact that the VSWebCache contains a file that maps the folder
path to a virtual directory - instead of relying on the IIS settings.

As I had said in the previous post, I had cleared out the cache. My
mistake was that by default, the cache is in c:\documents and
settings\<user name>\VSWebCache. However, Visual Studio had been
configured so that it was pointing to a 'non-standard' folder for the
cache. Once I figured out where to change that setting
(Tools/Options/Projects/Web Settings) and changed the setting to the
'standard' value, the error went away.

FWIW, I could not find any detail as to what is stored in the file in
VSWebCache. I had to use a File Monitoring tool to watch what files VS
was opening - that's where I noticed the strange directory reference.

Thanks again for your help.
Kevin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top