当VS2017用于创建有状态解决方案,生成标准样板代码时,生成的两个项目有两个不同的MSBuild版本。应用程序使用MSBuild版本1.5.0。该服务使用MSBuild版本1.6.0 (当前的“最新版本”)。
如果以这种方式运行解决方案,它在本地Service集群上运行良好。
但是,当我使用NuGet将应用程序的MSBuild更新为1.6.0 (因此应用程序和服务器项目都使用相同)时,会发生以下错误。
Severity Code Description Project File Line Suppression State
Error The OutputPath property is not set for project 'gt_strd5.sfproj'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Debug' P follow a project-to-project reference to this project, this project has belatform='x64'. This error may also appear if some other project is trying toen unloaded or is not included in the solution, and the referencing project does not build using the same or an equivalent Configuration or Platform. gt_strd5 C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets 737
Severity Code Description Project File Line Suppression State
Error MSB4057 The target "CreateManifestResourceNames" does not exist in the project. gt_strd5 C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets 2630
发布于 2017-06-12 21:21:40
我发现在更改之后,应用程序项目文件中的一些引用继续引用MSBuild 1.5.0。在我的例子中,gt_strd5.sfproj文件包含四个引用,需要从1.5.0更新到1.6.0。请参阅下面XML中的片段。
Import Project="..\packages\Microsoft.VisualStudio.Azure.Fabric.**MSBuild.1.5.0**\build\Microsoft.VisualStudio.Azure.Fabric.Application.props" Condition="Exists('..\packages\Microsoft.VisualStudio.Azure.Fabric.**MSBuild.1.5.0**\build\Microsoft.VisualStudio.Azure.Fabric.Application.props')"
.....
Import Project="..\packages\Microsoft.VisualStudio.Azure.Fabric.**MSBuild.1.5.0**\build\Microsoft.VisualStudio.Azure.Fabric.Application.targets" Condition="Exists('..\packages\Microsoft.VisualStudio.Azure.Fabric.**MSBuild.1.5.0**\build\Microsoft.VisualStudio.Azure.Fabric.Application.targets')"
为了验证这一点,我返回了几次,并且能够复制问题和这个解决方案。
希望这能帮别人节省点时间。诚挚的问候
发布于 2021-06-04 09:03:11
我把这个错误输入了PCF控制系统。
运行Developer命令提示符Run 2017/ VS2019
( a)从您的文件夹中删除空白,比如Test%20-%20PCFs (源代码管理生成的名称)应该是TestPCFs
( b)从cmd行转到pcf项目文件夹&运行msbuild /t:restore
( b)从cmd行转到cds项目文件夹&运行msbuild /t:restore
( c)在cds项目文件夹上,运行msbuild
( d)对于发行版部署,运行msbuild /p:configuration=Release
用于其他类型项目的
( a)从文件夹名中删除空白
( b)运行msbuild /t:restore
c)运行msbuild
https://stackoverflow.com/questions/44508916
复制相似问题