Search code examples
.netmacosvisual-studiomsbuild.net-3.5

Compiling DLL project that written in .NET Framework 3.5 on Visual Studio for Macos giving MSB3086 error


I took a project that compiles .dll file. Then opened project in MacOS Visual Studio. But it gives error that,

Error: Unknown MSBuild failure. Please try building the project again (project)

When I looked at the console, it gave an error code called MSB3086. I researched on the internet. It was written that a situation called ComReference was causing problems in compile, but the solutions I found did not work and the project was not compiled. Has anyone encountered this situation before and solved it?

Additionally, it said "Make sure Microsoft Windows SDK is installed" in the Console. Do I need to compile the project on a Windows device?


Solution

  • There are two major implementations of '.NET':

    • .NET Framework is older and supported on Windows only.
    • .NET (previously known as .NET Core) is supported on Windows, macOS, and Linux.

    (Microsoft's choices around names and versions have made things confusing.)

    Your project is a .NET Framework 3.5 project and .NET Framework is Windows only. The project cannot be compiled or run on macOS. You will need to compile the project on a Windows host.

    The DLL produced by the project can only be used on Windows. Further the project apparently has at least one COMReference. COM is not supported on macOS.