Please note that I am able to build this project in Visual Studio Professional 2017: https://github.com/briannoyes/WPFMVVM-StarterCode
But when I try to run the build in Team City 2019.1 it gave me this error:
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".
Then I found this link:
'dotnet build' error after migrating dotnetcore project to 1.0.4
From there I added this to the project as suggested in a comment:
<Prefer32Bit>false</Prefer32Bit>
But now I am getting this error:
Problem reported from build script (1) Customers\AddEditCustomerView.xaml.cs(25,13): error CS0103: The name 'InitializeComponent' does not exist in the current context Customers\CustomerListView.xaml.cs(25,13): error CS0103: The name 'InitializeComponent' does not exist in the current context OrderPrep\OrderPrepView.xaml.cs(25,13): error CS0103: The name 'InitializeComponent' does not exist in the current context Orders\OrderView.xaml.cs(25,13): error CS0103: The name 'InitializeComponent' does not exist in the current context MainWindow.xaml.cs(25,13): error CS0103: The name 'InitializeComponent' does not exist in the current context CSC : error CS5001: Program does not contain a static 'Main' method suitable for an entry point··· Build failure condition (1) Process exited with code 1
Here are the settings I have in my build step:
Here is the full build log:
Does anyone have any suggestions?