我已经制作了一个MSBuild项目,它只是以我们的解决方案文件作为参数执行msbuild任务。我已经定义了一个BeforeBuild目标,我设置了一些属性以及一个执行msbuild任务的Build目标。只有在调用CCNET中的MSBuild时才会出现“输出路径属性未设置”错误
我已确认在命令行控制台中构建msbuild脚本时没有发生错误。然而,当我在CCNET项目中使用它的MSBuild任务,我不断收到以下错误:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets (483,9): error: The OutputPath property is not set for project 'MyProject.msbuild'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Debug' Platform='AnyCPU'. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project.
我检查了构建日志,似乎_CheckForInvalidConfigurationAndPlatform过程中发生的错误。它甚至无法继续执行我的构建任务!由于脚本只建意在调试/发布和AnyCPU为平台的解决方案,我想下面的行添加到我的MSBuild项目:
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<OutputPath>.\bin\Debug\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>.\bin\Release\</OutputPath>
</PropertyGroup>
我仍然可以生成项目没有错误的命令行,但CCNET正在返回上述相同的错误。
我不明白为什么CCNET不断收到错误,我不知道还有什么可以尝试的。
请帮忙。
这是否对您有帮助? http://blogs.msdn.com/b/brandonwerner/archive/2010/03/14/the-nasty-visual-studio-platform-mcd-error-in-visual-studio-2010-rc.aspx – 2010-11-08 18:39:40
你能发布在CC.NET中使用的msbuild任务? – alexandrul 2010-12-15 10:27:16