简体   繁体   中英

Build a solution with MS build when the solution configuration doesn't match all projects

I have a solution which has a configuration, let's call it A . 80% of the projects in that solution also have a configuration A but the rest do not. Although they do need to be built.

When I build with msbuild proj.sol /p:Configuration=A /p:Platform=x64 I get error messages like this

error MSB4057: The target "Build" does not exist in the project.

It seams that I can build move of my projects but not the ones where the configuration name does not match the solutions.

You need to update your solution configuration 'A' to ensure that the other projects have a valid project configuration for solution configuration 'A'

  1. In Visual Studio, go to menu Build > Configuration Manager.
  2. In the Active Solution Configurations drop down list select configuration 'A'
  3. Select a configuration that you want to use for each project. Note it does not have to be 'A'. It can be any valid project configuration.
  4. Ensure the platform setting is set for the projects as well. They can be different then the solution platform. IE solution x64 but one project might be set to x86.

msbuild proj.sln /p:Configuration=A /p:Platform=x64

配置管理器

I've just got the same problem. It was fixed by installing F# Tools for Visual Studio Express 2012 for Web and restart Xamarin as the steps described in Xamarin forums

The bug was filed here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM