请注意,我能够在Visual Studio Professional 2017中构建此项目:https://github.com/briannoyes/WPFMVVM-StarterCode
但是当我尝试在Team City 2019.1中运行构建时,它给了我这个错误:
C:\Program Files\dotnet\sdk\2.0.0\Microsoft.Common.CurrentVersion.targets(2924,5): error MSB4216: Could not run the "GenerateResource" task because MSBuild could not create or connect to a task host with runtime "CLR4" and architecture "x86".
然后我找到了这个链接:
'dotnet build' error after migrating dotnetcore project to 1.0.4
从那里我按照评论中的建议将其添加到项目中:
<Prefer32Bit>false</Prefer32Bit>
但是现在我收到了这个错误:
从构建脚本报告的问题(1)Customers \ AddEditCustomerView.xaml.cs(25,13):错误CS0103:当前上下文中不存在名称“InitializeComponent”Customers \ CustomerListView.xaml.cs(25,13):error CS0103:当前上下文中不存在名称“InitializeComponent”OrderPrep \ OrderPrepView.xaml.cs(25,13):错误CS0103:当前上下文中存在名称“InitializeComponent”Orders \ OrderView.xaml.cs( 25,13):错误CS0103:当前上下文中不存在名称'InitializeComponent'MainWindow.xaml.cs(25,13):错误CS0103:当前上下文CSC中不存在名称'InitializeComponent':错误CS5001 :程序不包含适用于入口点的静态“Main”方法···构建失败条件(1)使用代码1退出的过程
以下是我在构建步骤中的设置:
这是完整的构建日志:
有没有人有什么建议?