开发者

Is it possible to debug a .net project when a separate project in the same solution has errors?

开发者 https://www.devze.com 2023-02-17 16:59 出处:网络
I have a solution with multiple projects from another developer. One of the projects is a test app that has errors 开发者_开发问答because it has hard-coded references to DLL\'s that developer\'s hard

I have a solution with multiple projects from another developer. One of the projects is a test app that has errors 开发者_开发问答because it has hard-coded references to DLL's that developer's hard drive. I don't need the test project or those DLL's to use the other projects in the solution

Because of the errors, I can't run any of the projects in debug mode. One solution is to remove the test project from the solution, but is there any other way to debug one of the projects when another project has errors? Making sure the projects don't depend on each other doesn't seem to be enough.


Right click the project and "Unload" it. You should then be able to compile and run the solution while the partial project is ignored.

Also to note: The unloaded project setting isn't saved inside the solution/project files so you can check in/our code without having to worry that setting (unless you somehow check in your suo/user files).


There are a few options:

  1. Unload the offending projects (Right click the proj and select "unload". This only changes your local .suo (solution user options) file, so you don't need to worry about checking in these changes.
  2. To debug: right click -> Debug -> Start New Instance. This will build only the dependent projects, so if the offending project is not a dependent of the one you want to run, this will work.
  3. Politely tell the other developer he checked in changes that prevent you from compiling the solution. This is generally not accepted on teams > 1.


You can start it directly, not in debug mode and then attach VS to it.

0

精彩评论

暂无评论...
验证码 换一张
取 消