views:

133

answers:

2

I have a solution that includes a Web Site (created using the web site template not the web app project template - converting isn't an option, btw).

When I rebuild all, the compile succeeds, but strangely displays 3 errors, all of which are "Could not get dependencies for project reference 'PROJNAME'". When I try to launch the debugger, I get the "There were build errors." dialogue.

Two questions:

  1. If I choose the 'Yes' option in the debug error dialogue to run the last successful build, will it run on the code that my Rebuild All just compiled?
  2. How do I resolve this issue?

I checked this post and am disheartened by my prospects. What is strange, though, is that I added these same projects to a separate web site solution that compiled/debugged fine, removed the test web site and re-added the target website I would like to debug, and it failed in the same manner. Is there a secret web site .proj file for .NET web sites?

http://stackoverflow.com/questions/863379/could-not-get-dependencies-for-project-reference

+1  A: 

Are you working with some king of unmanaged, platform-specific code? I get that kind of errors a lot when I'm developing on a x64 machine and my code depends on x86 libraries. The only way I know of running a website depending on x86 code on a x64 machine is to use IIS and disable x64 support on the application pool, this will force the use of the .NET x86 environment and your dependencies will run fine.

Even if that's not your case, try to install IIS on your machine and attach to his process, instead of using the built-in web server. This should eliminate most of the debugging issues.

Fábio Batista
That's precisely the problem. I tried running IIS and then attaching the debugger to the process but it still only displayed the default site. What do I have to configure in IIS itself to get the debug site to take over local web requests?
fordareh
You'll have to add your application into IIS: http://technet.microsoft.com/en-us/library/cc772042(WS.10).aspxThen you configure your Visual Studio project not to use the internal web server (Web Project properties, Start Options, Use custom server), and to use your IIS Application (fill in Base URL with http://localhost/myapp for example). It also helps to mark the "Don't open a page. Wait for a request from an external application".
Fábio Batista
A: 

The rebuild operation "succeeding" and at the same time displaying errors sounds like a real problem. These should be mutually exclusive results.

The short answer to fixing your problem is that you need to resolve the errors. Based on the debugger UI the build is not actually succeeding (regardless of what's being reported). You must fix this problem in order to debug the new code.

Can you elaborate more on the scenario?

  • Do you have more than one project in the solution?
  • Do all of them succeed in building?
  • For the errors what project do they refer to and can you give us any additional information here.
JaredPar
There are 7 projects and one website in the solution (that's a website, not web application project). All of them succeed in building whether I build them individually or as part of the solution. The project referenced in the Error List is the website. The only other thing that might be useful to know is that I have a 32bit and a 64bit version of a 3rd party dll that 2 of the projects and the website reference. I tried converting them to the 64bit version only to revert back to the 32bit after I had trouble debugging the site.
fordareh