指定的解决方案配置“调试|BNB”无效
在 Expression Blend 4 中,编译时出现错误:
指定的解决方案配置“Debug|BNB”无效。请使用“配置”和“平台”属性(例如 MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform=”Any CPU”)指定有效的解决方案配置,或将这些属性留空以使用默认解决方案配置。
完成构建项目“myproject.sln”——失败。
构建失败。
In Expression Blend 4, while compiling I get an error saying
The specified solution configuration “Debug|BNB” 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.
Done building project “myproject.sln” — FAILED.
Build failed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
背景:在构建时,编译器(无论是从 Expression Blend 还是 Visual Studio 启动)必须知道代码的目标平台,即 X86、64 位等系统架构。
现在的问题是,名为“平台”的环境变量的系统范围设置似乎也覆盖了 Expression Blend 用作目标平台的任何设置。
我在其他网站上找到了一些解决方法,并将在这里提供可能的解决方案。尝试两个建议中的一个应该会有所帮助:
请评论哪些解决方案有效。
Background: At build-time the compiler (no matter if started from Expression Blend or Visual Studio) has to know what the target platform of your code, i.e. the system architecture like X86, 64bit etc.
The problem now is, that a system wide setting of an environment variable called "Platform" seems to override any setting of what Expression Blend uses as target platform, too.
I found some workarounds on other websites and will provide the possible solutions here. Trying one of the two suggestions should help:
Please give a comment which of the solutions worked.
我刚刚从环境变量中删除了平台,它就工作了。
I just removed the Platform from Environment variables and it worked.
使用 Microsoft Visual Studio,以下解决方案应该可以在不重新启动计算机的情况下运行。运行命令行(Windows 键 + R,键入 cmd,按 enter)并键入项目的相应命令:
MSVC 2013:
SET MSBUILD="C:\Program Files Path\MSBuild\12.0\Bin\msbuild.exe"
MSVC 2015:
SET MSBUILD="C:\Program Files Path\MSBuild\14.0\Bin\msbuild.exe"
对我来说,PLATFORM = BWS。运行上述脚本一次永久解决了我的项目的问题,无需修改或删除平台。
With Microsoft Visual Studio the following solution should work without restarting your computer. Run the command line (Windows Key + R, type cmd, hit enter) and type the respective commands for your project:
MSVC 2013:
SET MSBUILD="C:\Program Files Path\MSBuild\12.0\Bin\msbuild.exe"
MSVC 2015:
SET MSBUILD="C:\Program Files Path\MSBuild\14.0\Bin\msbuild.exe"
For me, PLATFORM = BWS. Running the above script once fixed the problem permanently for my projects, without modifying or deleting PLATFORM.
如果仍然不起作用,请尝试指定配置和平台,
例如
这对我有用。
If still not work try to specify configuration and platform
for example
This works for me.