When you build your Visual Studio solution you get the following error message:
The OutputPath property is not set for project ‘XYZ.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.
When you add a new project to a Visual Studio solution the IDE many times changes the settings in the Configuration Manager. Visual Studio 2010 adds a new solution platform “x86” and sets the platform of the existing projects to “x86”. It can also remove the projects from the build list and change their build configuration.
- Open the Configuration Manager,
- For all Active solution configurations:
- Set the Active solution platform to “Any CPU”.
- For all projects that have to be included in the build:
- Set the Configuration to “Debug” or “Release” depending on the environment,
- Set the Platform to “Any CPU”,
- Check the “Build” check box.