This issue occurs when the configuration is deleted. IN this situation, the Debug build configuration is left in the project file, as follows:
Steps to reproduce the problem
- Create a new Visual Studio Solution (.sln).
- Create a C# class library project.
- Create a C# console application.
- Add a reference of the class library in the console application.
- Open Configuration Manager, and then create a new solution configuration that's named "Dev" (or you can give any name):
- Copy settings from Debug.
- Select the check box to create new project configurations.
- Delete the previous project configurations that are named "Debug" from both projects:
- Delete the solution configuration that was named "Debug."
- Make sure that the "Debug" output folders are deleted from both projects (from both the "obj" and "bin" directories of each).
- The configuration name "Dev" has now replaced "Debug" (both at the project and solution levels).
- Select the new solution configuration ("Dev" or whatever new name you used).
- Clean the solution.
- Add the class library as a reference to the console application, and make use of a class defined in it.
- Set the console application as startup.
- Build the solution and run it.
- Unload the class library project from Solution Explorer.
- Make a change to the console application code file (for example, to "Program.cs"), and then try to build it.
- You receive an error message that resembles 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. ***
Article ID: 3175301 - Last Review: Aug 24, 2016 - Revision: 1