OpenRA / ra2

A Red Alert 2 mod for the OpenRA game engine
GNU General Public License v3.0
965 stars 158 forks source link

Build fails on windows #807

Closed joker5bb closed 1 year ago

joker5bb commented 1 year ago

I have installed all the dependencies from the wiki

C:\Users\Admin\Downloads\ra2-master>make all Building in Release configuration... Microsoft (R) Build Engine version 16.0.450+ga8dc7f1d34 for .NET Core Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1001: Unknown switch. Switch: --nologo

For switch syntax, type "MSBuild -help" Build failed. If just the development tools failed to build, try installing Visual Studio. You may also still be able to run the game.

Building ra2 in Release configuration... Microsoft (R) Build Engine version 16.0.450+ga8dc7f1d34 for .NET Core Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1001: Unknown switch. Switch: --nologo

For switch syntax, type "MSBuild -help" Build failed. If just the development tools failed to build, try installing Visual Studio. You may also still be able to run the game.

How can I fix this issue?

penev92 commented 1 year ago

What version of RA2 are you trying to compile? The current requires .net6

joker5bb commented 1 year ago

I am trying to compile the latest version of ra2

penev92 commented 1 year ago

The fact that you are running make all instead of ./make.ps1 all and the fact that you are getting an MSBuild error makes me think you are somehow running the Linux Makefile instead of the Windows build script, and perhaps trying to use Mono (??) Instead of .NET6. Perhaps WSL is playing a trick on you?

abcdefg30 commented 1 year ago

Running make.all should work from the command line. When using a PowerShell host it should be .\make.cmd all.

CortexReaver commented 1 year ago

No luck either

03-06-2023 151711

CortexReaver commented 1 year ago

This instruction gives you links to older .NET Framework, I think this might be a reason. https://github.com/OpenRA/OpenRA/blob/release-20200202/INSTALL.md

So you need this https://dotnet.microsoft.com/en-us/download/dotnet/6.0 Instead of mentioned in this guide 2.2 version.

CortexReaver commented 1 year ago

And now it finally builds. 03-06-2023 153339

But it seems that there is no "dependencies" command in "make" script. 03-06-2023 153546

abcdefg30 commented 1 year ago

This instruction gives you links to older .NET Framework, I think this might be a reason. https://github.com/OpenRA/OpenRA/blob/release-20200202/INSTALL.md

Those are the instructions for a release from 02-02-2020! https://github.com/OpenRA/OpenRA/blob/bleed/INSTALL.md contains the newest instructions. make dependencies is no longer needed. But seems like you worked the issues out regardless. 👍