0
votes

I have cross-platform console package that multi-targets .NET Full and .NET Core and I am successfully using the Azure DevOps Hosted VS2017 agent to trigger CI builds. Everything is fine for Hosted VS2017 agent.

enter image description here

enter image description here

But as soon I select Hosted macOS agent to trigger a build and test for macOS it fails during Build step with the following error.

error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.6.1" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed.

I can install the .NET core SDK in the build pipeline. But how do i install .NETFramework SDK as a build tasks in my build pipeline ?

Is there any other way to resolve the build issue for Hosted macOS build agent ?

1

1 Answers

1
votes

Is there any other way to resolve the build issue for Hosted macOS build agent ?

I am afraid there is no such way to resolve this build issue for Hosted macOS build agent, AFAIK, .net framework is for windows only, it is not possible to use the full framework outside of windows.

Check the similar thread here:

it's not possible to build ASP.NET MVC projects on the Mac that aren't based on .NET Core or Mono. So if your project is currently targetting ASP.NET on .NET Framework 4.x, the you'll either have to stay on Windows.

And this document may help explain.

Hope this helps.