The specified solution configuration “Latest|Any CPU” is invalid

一笑奈何 提交于 2019-12-21 04:33:13

问题


I am getting this error with my MSBuild script running in Jenkins

C:\<path>\<solutionname>.sln.metaproj : error MSB4126: The specified solution
configuration "Latest|Any CPU" is invalid. Please specify a valid solution 
configuration using the Configuration and Platform properties (e.g. MSBuild.exe
Solution.sln
/p:Configuration=Debug /p:Platform="Any CPU") or leave those properties blank
to use the default solution configuration.

In my Jenkins configuration under Build->Command Line Arguments I have

/t:Deploy /P:Configuration=Latest

I've used this on other projects without any issue before and I've just practically the same build file too but I've never seen this issue happen before. I suspect that since the only thing that is different is the solution file that there may be something different there that needs to be changed.


回答1:


Does the "Latest" configuration exist? By Default Visual Studio creates 2 configurations when you create a new solution. These are "Debug" and "Release" if you want to create a custom configuration you need to use the Configuration Manager in Visual Studio.

Right Click on the Solution in Solution Explorer and select "Configuration Manager" you will then be presented with the following UI. This lists all of the projects in the solution, what type they are (Any CPU, x86 etc) and whether they should be build as part of that configuration.

You can now create a configuration called "Latest" and decide what needs to be built for that configuration.



来源:https://stackoverflow.com/questions/15132848/the-specified-solution-configuration-latestany-cpu-is-invalid

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!