Facepunch / Facepunch.Steamworks

Another fucking c# Steamworks implementation
MIT License
2.91k stars 348 forks source link

Update Wiki Documentation for build process #605

Open tvogt opened 3 years ago

tvogt commented 3 years ago

I'm trying to build from source and the documentation (at https://wiki.facepunch.com/steamworks/#howtobuildfrommasterbranch) seems to be outdated.

What I noticed so far:

/usr/local/share/dotnet/sdk/6.0.100-rc.2.21505.57/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.DefaultItems.targets(5,5): Warning NETSDK1182: Targeting .NET 6.0 in Visual Studio 2019 is not supported. (NETSDK1182) (Generator) /Users/tom/Documents/Game Projects/Facepunch/Facepunch.Steamworks/Generator/CSC: Error CS1617: Invalid option '10' for /langversion. Use '/langversion:?' to list supported values. (CS1617) (Generator) /Users/tom/Documents/Game Projects/Facepunch/Facepunch.Steamworks/Facepunch.Steamworks/CSC: Error CS1617: Invalid option '10' for /langversion. Use '/langversion:?' to list supported values. (CS1617) (Facepunch.Steamworks.Win64) /usr/local/share/dotnet/sdk/6.0.100-rc.2.21505.57/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.DefaultItems.targets(5,5): Warning NETSDK1182: Targeting .NET 6.0 in Visual Studio 2019 is not supported. (NETSDK1182) (Facepunch.Steamworks.Win64) /Users/tom/Documents/Game Projects/Facepunch/Facepunch.Steamworks/Facepunch.Steamworks/CSC: Error CS1617: Invalid option '10' for /langversion. Use '/langversion:?' to list supported values. (CS1617) (Facepunch.Steamworks.Win64) /Users/tom/Documents/Game Projects/Facepunch/Facepunch.Steamworks/Facepunch.Steamworks/CSC: Error CS1617: Invalid option '10' for /langversion. Use '/langversion:?' to list supported values. (CS1617) (Facepunch.Steamworks.Win64) /Users/tom/Documents/Game Projects/Facepunch/Facepunch.Steamworks/Facepunch.Steamworks/CSC: Error CS1617: Invalid option '10' for /langversion. Use '/langversion:?' to list supported values. (CS1617) (Facepunch.Steamworks.Win32) /usr/local/share/dotnet/sdk/6.0.100-rc.2.21505.57/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.DefaultItems.targets(5,5): Warning NETSDK1182: Targeting .NET 6.0 in Visual Studio 2019 is not supported. (NETSDK1182) (Facepunch.Steamworks.Win32) /Users/tom/Documents/Game Projects/Facepunch/Facepunch.Steamworks/Facepunch.Steamworks/CSC: Error CS1617: Invalid option '10' for /langversion. Use '/langversion:?' to list supported values. (CS1617) (Facepunch.Steamworks.Win32) /Users/tom/Documents/Game Projects/Facepunch/Facepunch.Steamworks/Facepunch.Steamworks/CSC: Error CS1617: Invalid option '10' for /langversion. Use '/langversion:?' to list supported values. (CS1617) (Facepunch.Steamworks.Win32) /Users/tom/Documents/Game Projects/Facepunch/Facepunch.Steamworks/Facepunch.Steamworks/CSC: Error CS1617: Invalid option '10' for /langversion. Use '/langversion:?' to list supported values. (CS1617) (Facepunch.Steamworks.Posix) /usr/local/share/dotnet/sdk/6.0.100-rc.2.21505.57/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.DefaultItems.targets(5,5): Warning NETSDK1182: Targeting .NET 6.0 in Visual Studio 2019 is not supported. (NETSDK1182) (Facepunch.Steamworks.Posix) /Users/tom/Documents/Game Projects/Facepunch/Facepunch.Steamworks/Facepunch.Steamworks/CSC: Error CS1617: Invalid option '10' for /langversion. Use '/langversion:?' to list supported values. (CS1617) (Facepunch.Steamworks.Posix) /Users/tom/Documents/Game Projects/Facepunch/Facepunch.Steamworks/Facepunch.Steamworks/CSC: Error CS1617: Invalid option '10' for /langversion. Use '/langversion:?' to list supported values. (CS1617) (Facepunch.Steamworks.Posix)

tvogt commented 3 years ago

changing the language target to "default" solves the errors and the build works (with warnings). A "rebuild all" seems necessary if one tried a failed build before.

userKolecko commented 2 years ago

Hi, it seems that to target c# 10 you actually need vs 2022. I had the same problem in vs 2019 but 2022 could build without problems. I found the requirements to target c# 10 here.

jzapdot commented 1 year ago

I just put up a PR here (https://github.com/Facepunch/Facepunch.Steamworks/issues/591) that reverts the removal of .Net 4.6 and adds support for being able to build on macOS, this might help you out. We needed .Net 4.6 for Unity still as it can't handle .Net 6 dlls.