OpenRAModSDK icon indicating copy to clipboard operation
OpenRAModSDK copied to clipboard

how can i use dotnet core 3.1 to make all?

Open Rinimabi opened this issue 5 years ago • 8 comments

When I tried to make all. It seems I can't do that, it break out error:
C:\Program Files\dotnet\sdk\3.1.101\Microsoft.Common.CurrentVersion.targets(1175,5): error MSB3644:cant' find .NETFramework,Version=v4.6.1 ........

how can i use dotnet core 3.1 to make all?

Rinimabi avatar Jan 30 '20 09:01 Rinimabi

Sorry, I don't think you can. The engine still requires the .NET framework and doesn't yet run under .NET core.

abcdefg30 avatar Jan 31 '20 11:01 abcdefg30

You will need to install the .NET 4.6.1 developer pack from https://dotnet.microsoft.com/download/dotnet-framework/net461.

pchote avatar Jan 31 '20 11:01 pchote

@Rinimabi can you confirm whether installing the developer pack fixed the problem?

pchote avatar Feb 07 '20 18:02 pchote

@pchote thanks for answer.sorry,I can't use my personal computer lately. I will confirm that soon or later.

Rinimabi avatar Feb 08 '20 12:02 Rinimabi

What about Linux? .NET framework is not available for it. How linux appimages are build then?

pilhoo avatar Mar 20 '20 14:03 pilhoo

Linux and macOS currently use Mono.

pchote avatar Mar 20 '20 14:03 pchote

Ok. there are some problems with mono. xbuild in mono is depticated and it's not working with openra project. to use msbuild I had to add dotnet prefix to MSBUILD variable in two Makefiles (project root and engine directory): MSBUILD = dotnet msbuild -verbosity:m -nologo

And then tell msbuild where is mono. So to every .csproj file added in PropertyGroup line: <FrameworkPathOverride Condition="'$(TargetFramework)' == 'net461'">/usr/lib/mono/4.6.1-api</FrameworkPathOverride> I don't know is the condition needed. Solution taken from https://andrewlock.net/building-net-framework-asp-net-core-apps-on-linux-using-mono-and-the-net-cli/

pilhoo avatar Mar 20 '20 15:03 pilhoo

msbuild has been a core part of mono since its 5.0 release (OpenRA requires 5.4 at a minimum). Some distros still aren't packaging it, but there is not much we can do about that other than recommending users on those distros to use the packages from https://www.mono-project.com/download/stable/#download-lin.

pchote avatar Mar 20 '20 15:03 pchote