Page 1 of 1

Server 2016 msbuild errors

Posted: Mon Oct 15, 2018 9:39 pm
by mvlismas
Hello team,

I am currently trying to setup a Windows 2016 server to perform "continuous integration" for testing. Here is what is happening.
When I pull the source files on to the server, I have a CLI script that will run to build the Ranorex solution. On my Windows 10 workstation, the .Net 4.5.2 msbuild builds the exe with no errors or warnings. However, the same attempt on the Windows Server throws a bunch of warnings, then the exe does not run correctly.

Here are some of the warnings. How do I target the 4.5.2 version of msbuild on Server 2016? and how do I resolve these errors?

Code: Select all

  C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3247: Found conflicts betw
een different versions of the same dependent assembly. [C:\Users\admin\Desktop\Test-Software\Ranorex\Workstatio
nOnlineHelp\WorkstationOnlineHelp.csproj]

  C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3270: There was a mismatch
 between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "

C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll", "x86". This mismatch may cause runtime failures. Please co
nsider changing the targeted processor architecture of your project through the Configuration Manager so as to align th
e processor architectures between your project and references, or take a dependency on references with a processor arch
itecture that matches the targeted processor architecture of your project. [C:\Users\admin\Desktop\Test-Software\Ranore
x\WorkstationOnlineHelp\WorkstationOnlineHelp.csproj]

  C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3270: There was a mismatch
 between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "
System.Data", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor archit
ecture of your project through the Configuration Manager so as to align the processor architectures between your projec
t and references, or take a dependency on references with a processor architecture that matches the targeted processor
architecture of your project. [C:\Users\admin\Desktop\Test-Software\Ranorex\WorkstationOnlineHelp\Works
tationOnlineHelp.csproj]

Re: Server 2016 msbuild errors

Posted: Tue Oct 16, 2018 1:56 pm
by krstcs
You need to install .NET 4.5.2 on the server as Windows Server 2016 comes with 4.6.2 by default. Since there were changes in some of the libraries, your MSBuild can't find the right ones.

You should be able to install it from the server's Add Features option.

Re: Server 2016 msbuild errors

Posted: Tue Oct 16, 2018 1:58 pm
by mvlismas
I get that. But when I try to install .Net 4.5.2 it gives a message that it is already installed. What else?

Re: Server 2016 msbuild errors

Posted: Tue May 24, 2022 5:44 pm
by Krunch
Just to post how I fixed this issue...

Originally we were using Ranorex version 9.2. We hesitated to upgrade to the latest because it created more issues. Anyway, I decided to perform an upgrade of our Studio(s), runtime on remote systems, and all the agents, to the latest version of Ranorex, version 10.1.7. That fixed the issues on all our VM's. The only issue I now get is - Warning MSB3247: Found conflicts between different versions of the same dependent assembly.

I will post a solution once I figure this out.