none
Problems with outputs from unloaded projects

    Question

  • Based on the number of postings I've found on it, I'm guessing that "unloading projects" is a fairly common thing to do when a solution gets large and sluggish.   We are getting near to 50 projects or so.  A lot of features don't work so well at that point including VS startup times, navigating to references, code analysis, build times, and so forth.

    So for us, "unloading c# projects"  seems to be a step in the right direction.

    However, we've noticed that VS gets confused about how to find the outputs from unloaded projects that were successfully built prior to unloading.  Even though they are unloaded, they may yet be dependencies for other projects so their outputs (in bin) should be available to others.

    Has anyone else noticed these types of issues in VS after unloading projects?  I've tried to google the error message but it doesn't turn up any VS 2015 bugs.  We are on update 2.

    ***The OutputPath property is not set for project 'ClassLibrary1.csproj'.  Please check to make sure that you have specified a valid combination of Configuration and Platform for this project.  Configuration='Debug'  Platform='AnyCPU'.  This error may also appear if some other project is trying to follow a project-to-project reference to this project, this project has been unloaded or is not included in the solution, and the referencing project does not build using the same or an equivalent Configuration or Platform. ***


    David Beavon

    Friday, April 29, 2016 12:53 PM

Answers

All replies

  • Hi David,

    To really repro this issue, maybe you could share me a simple sample using one drive.

    Just add two simple apps(Winform and console app), add the console as the reference of the Winform app. If I build the whole solution, I will get the result like the following screen shot.

    If I unload the console app, I will get the result like the following screen shot:

    So it seems that it would not compile the console app, of course, I just add it as a reference, not really call the code in that console app.

    >>The OutputPath property is not set for project 'ClassLibrary1.csproj'.  Please check to make sure that you have specified a valid combination of Configuration and Platform for this project.  Configuration='Debug'  Platform='AnyCPU'.  This error may also appear if some other project is trying to follow a project-to-project reference to this project, this project has been unloaded or is not included in the solution, and the referencing project does not build using the same or an equivalent Configuration or Platform

    Based on the error messages, I also did some research, some members also met this kind of error which was related to the PropertyGroup node:

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/285618be-3efb-4fe4-80c0-88a74a8dd01d/the-outputpath-property-is-not-set-for-project-xxx-error-while-doing-x64-build?forum=msbuild

    https://blogs.msdn.microsoft.com/spike/2010/11/18/error-the-outputpath-property-is-not-set-for-project-xxxxx-dbproj/

    If still no help, maybe you could share me a simple sample, I will test it in my side.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, May 2, 2016 6:34 AM
    Moderator
  • This feature is now broken for us (after VS 2015 update 2) .

    We should be able to unload a project, even  a dependency, and continue to build a solution successfully.

    Steps to reproduce the issue:

    1.  Create a sln
    2.  Create a csproj (class library ClassLibrary1)
    3.  Create a csproj (console app ConsoleApplication1)
    4.  Add reference in ConsoleApplication1 to ClassLibrary1
    5.  Open configuration manager and create a new sln configuration called "Dev"
       - copy settings from Debug
       - check box to create new project configurations (will also be called Dev)

    6.  Delete previous project configurations named "Debug" from both projects.
       - Delete sln configuration that was named "Debug".

    7. End result is that the configuration name "Dev" is a replacement for "Debug"
       (both at the project and sln level)

    8.  Select the "Dev" sln configuration

    9. Clean solution.  Additionally make sure the (now eliminated) "Debug" 
      output folders are deleted from both projects (from both "obj" and "bin"
      directories of each)


    10. In ConsoleApplication1, reference and make use of a class defined in ClassLibrary1.

    11.  Set ConsoleApplication1 as startup

    12. Build solution and run

    13. Unload "ClassLibrary1" project from the solution explorer

    14. Make a change to a ConsoleApplication1 code file (eg "Program.cs") and try to build.

    15.  You should get an error like the following


    ***The OutputPath property is not set for project 'ClassLibrary1.csproj'.  Please check to make sure that you have specified a valid combination of Configuration and Platform for this project.  Configuration='Debug'  Platform='AnyCPU'.  This error may also appear if some other project is trying to follow a project-to-project reference to this project, this project has been unloaded or is not included in the solution, and the referencing project does not build using the same or an equivalent Configuration or Platform. ***

    Final note:

    I think these errors will all go away after restarting VS.

    Please let me know whether you see the same behavior in VS 2015 update 2.


    David Beavon

    Monday, May 2, 2016 8:43 PM
  • Hi David,

    Thanks for provide us the detailed steps.

    I think I could repro this issue using the VS2015 with update 2 now.

    Since I could repro this issue, you can submit this feedback to Microsoft Connect feedback portal: http://connect.microsoft.com/VisualStudio/feedback/CreateFeedback.aspx,Microsoft engineers will evaluate them seriously. If you submit this feedback, I hope you could post that link here, I will help you vote it. Thanks for your understanding.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, May 3, 2016 11:15 AM
    Moderator
  • Thanks for the bug confirmation.  (That is more than I've gotten from Microsoft professional support after more than a week of waiting).  Did the problem go away for you after simply restarting Visual Studio?

    The connect website does not work for me. I've had problems using this from time to time.  Sometimes it is so slow it is almost impossible to use,  but right now it says :

    The system has encountered an unexpected error. We apologize for the inconvenience. The issue will be addressed as quickly as possible.


    Even if connect did work, I have to say that VS is not a free or open-source product, and fixing obvious bugs in the configuration manager or solution explorer should be part of the price we pay for it - especially if we pay for it on a subscription.  I really think it is poor customer service if I buy something that is broken and have to take a poll to get it fixed.  If I go to Best Buy and purchase a computer with a broken key on the keyboard, they don't make me start a poll and count up the number of people that are affected.  That's just wrong.


    David Beavon

    Tuesday, May 3, 2016 4:19 PM
  • Hi David Beavon,

    >>Did the problem go away for you after simply restarting Visual Studio?

    Yes, it worked well after I restart the VS and re-open this project.

    Anyway, since I could repro this issue in my side, I help you submit a report:

    https://connect.microsoft.com/VisualStudio/feedbackdetail/view/2665372/problems-with-outputs-from-unloaded-projects

    If possible, you could vote it, the product team experts would share us the information in that report.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, May 4, 2016 7:31 AM
    Moderator
  • There is a KB for the bug too. Its the type of thing that probably won't get fixed via Connect:

    https://support.microsoft.com/en-us/kb/3175301

    Basically you have to beware when unloading projects that it might cause problems for Visual Studio, when searching for the outputs from those projects.


    David Beavon

    Thursday, August 25, 2016 4:48 PM