The website in the solution in which the compilation of the "Rebuild Solution" was completed successfully cannot start the debugger

I have a solution that includes a website (created using a website template, not a web application project template). Conversion is not an option, by the way.

When I rebuild everything, the compilation succeeds, but strangely displays 3 errors, all of which are “Could not get dependencies for linking to the PROJNAME project. When I try to run the debugger, I get the message“ There were build errors. ”Dialog.

Two questions:

  • If I select the Yes option in the debugging errors dialog to run the last successful build, will it run on the code that my Rebuild All just compiled?
  • How to solve this problem?

I checked this post and am disappointed with my prospects. It’s strange, however, that I added these same projects to a separate website solution that compiled / debugged perfectly, deleted the test website and re-added the target website that I would like to debug, and it failed in the same way. There are secret website .proj file for .NET websites?

Failed to get dependencies for project link

+4
source share
3 answers

I spent the whole day on this problem. To summarize briefly, I worked on the old Web site project using VS 2008, and the publication failed. I looked through the list of errors and saw the terrible error "I can not get the dependencies." I looked at this post and other error messages in Stackoverflow and elsewhere, and tried all the suggestions I found. Madness peaked when I reinstalled Visual Studio 2008, rebooted, and saw that the error appeared again. Good times!

The next day, I realized that the publishing error was actually caused by directory permissions. The build error had nothing to do with it. Here is what I learned from my hell day:

  • This is a bug in Visual Studio 2008 website projects that are reported from time to time but are clearly not fixed (as of 1/2011). This happens when two or more build projects are dependent on each other, and then both are added as links to the project on the website.
  • In addition to being an error, it is not correct to classify the problem as an error. It seems to me that this is a warning level problem. The best proof of this is that it does not seem to affect the assembly, I was able to successfully deploy it without fixing it.
  • I am sure that all errors and warnings of the compiler should be monitored, understood and eliminated. This is the exception that proves the rule. If you find a workaround, be sure to use it and forget about the error!
  • Last but not least, this is another reason why a Web site project in Visual Studio should be avoided at all costs .
+7
source

Are you working with some kind of king of unmanaged code on the platform? I often get such errors when developing on an x64 machine, and my code depends on the x86 libraries. The only way I know to manage the site depending on the x86 code on the x64 machine is to use IIS and disable x64 support in the application pool, this will force you to use the .NET x86 environment, and your dependencies will work fine.

Even if this is not your case, try installing IIS on your computer and attach it to the process instead of using the built-in web server. This should fix most debugging issues.

+1
source

The restore operation succeeds and at the same time the error display sounds like a real problem. These should be mutually exclusive results.

The short answer to fixing the problem is that you need to fix the errors. Based on the user interface of the debugger, the assembly is not actually executed (no matter what is reported). You must fix this problem in order to debug the new code.

Can you talk more about the script?

  • Do you have several projects in solution?
  • Did all of them manage to build?
  • For errors to which the project relates, and whether you can provide us with additional information here.
0
source

Source: https://habr.com/ru/post/1303977/


All Articles