-
Notifications
You must be signed in to change notification settings - Fork 20
Doesn't work with projects without an 'AnyCPU' configuration #3
Comments
I'll have to take a look at the mechanism for managing configuration/platforms in the VSSDK. It is not provided by the project node base class. In the short term, you should be able to modify the .nuproj file to include the configuration/platform property groups needed by your projects. |
I think the SubType based version could implicitly solve this problem, Solution Properties / Configuration Manager will handle the platforms in the NuBuild projects. |
Use Configuration and Platform settings from the solution file when collecting the referenced project's output .dll files. Previously the default values were used.
This small modification solves, that MSBuild doesn't want to rebuild, just gives back the TargetOutputs.
GetTargetPath target returns the TargetOutputs to VS/IDE when VS/IDE requests the outputs of the projects for the reference dialog. We let GetTargetPath to believe that NuBuild projects are .exe projects to let them be able to be used as referenced projects. This has no effect during real build, GetTargetPath is used by VS/IDE. But now we have to filter out these .exe results from the TargetOutputs/ReferenceLibraries list.
With combined AssignProjectConfiguration and MSBuild tasks it is possible, that the projects referred by the NuBuild project will build with the proper configuration and platform (defined in the .sln or build definition) and not the default AnyCPU. So, the NuBuild project remains AnyCPU, but the referred projects can be set to anything in the Configuration Manager (x64, x86, Win32, etc). |
Most of our VS projects have AnyCPU build configurations removed, instead using specific configurations such as x86 or x64. NuBuild projects seem to want an AnyCPU configuration on projects that are referenced to them.
I think the fix would be to allow NuBuild projects to have other configurations like x86 and x64 so the Platform property can match that of referenced projects.
Here are the steps to reproduce:
The OutputPath property is not set for project 'NuBuildTest.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.
The text was updated successfully, but these errors were encountered: