Philipp15b / go-steam

Steam's protocol in Go to allow automation of different actions on the Steam network without running an actual Steam client. Includes APIs for friends, chatting, trading, trade offers and TF2 crafting.
https://pkg.go.dev/github.com/Philipp15b/go-steam/v3
Other
387 stars 131 forks source link

Issue compiling GoSteamLanguageGenerator #97

Closed Nuc1eoN closed 5 years ago

Nuc1eoN commented 5 years ago

Trying to compile GoSteamLanguageGenerator.csproj using xbuild as in the readme gives me the following error:

$ xbuild GoSteamLanguageGenerator.csproj /p:OutputPath=bin/Debug

>>>> xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<<

XBuild Engine Version 14.0
Mono, Version 5.20.1.0
Copyright (C) 2005-2013 Various Mono authors

Build started 07/30/2019 13:53:28.
__________________________________________________
Project "/home/nuc/go/src/github.com/Philipp15b/go-steam/generator/GoSteamLanguageGenerator/GoSteamLanguageGenerator.csproj" (default target(s)):
        Target PrepareForBuild:
                Configuration: Debug Platform: x86
        Target ResolveProjectReferences:
                Project "/home/nuc/go/src/github.com/Philipp15b/go-steam/generator/SteamKit/Resources/SteamLanguageParser/SteamLanguageParser.csproj" (default target(s)):
                        Target PrepareForBuild:
                                Configuration: Debug Platform: x86
                        Target GenerateSatelliteAssemblies:
                        No input files were specified for target GenerateSatelliteAssemblies, skipping.
                        Target _GenerateTargetFrameworkMonikerAttribute:
                        Skipping target "_GenerateTargetFrameworkMonikerAttribute" because its outputs are up-to-date.
                        Target CoreCompile:
                        Skipping target "CoreCompile" because its outputs are up-to-date.
                        Target _CopyAppConfigFile:
                        Skipping target "_CopyAppConfigFile" because its outputs are up-to-date.
                Done building project "/home/nuc/go/src/github.com/Philipp15b/go-steam/generator/SteamKit/Resources/SteamLanguageParser/SteamLanguageParser.csproj".
        Target CopyFilesMarkedCopyLocal:
                Copying file from '/home/nuc/go/src/github.com/Philipp15b/go-steam/generator/SteamKit/Resources/SteamLanguageParser/bin/Debug/SteamLanguageParser.exe' to '/home/nuc/go/src/github.com/Philipp15b/go-steam/generator/GoSteamLanguageGenerator/bin/Debug/SteamLanguageParser.exe'
                Copying file from '/home/nuc/go/src/github.com/Philipp15b/go-steam/generator/SteamKit/Resources/SteamLanguageParser/bin/Debug/SteamLanguageParser.pdb' to '/home/nuc/go/src/github.com/Philipp15b/go-steam/generator/GoSteamLanguageGenerator/bin/Debug/SteamLanguageParser.pdb'
        Target GenerateSatelliteAssemblies:
        No input files were specified for target GenerateSatelliteAssemblies, skipping.
        Target _GenerateTargetFrameworkMonikerAttribute:
        Skipping target "_GenerateTargetFrameworkMonikerAttribute" because its outputs are up-to-date.
        Target CoreCompile:
                Tool /usr/lib/mono/4.5/csc.exe execution started with arguments: /noconfig /debug:full /debug:portable /optimize- /out:obj/x86/Debug/GoSteamLanguageGenerator.exe Program.cs Properties/AssemblyInfo.cs GoGen.cs obj/x86/Debug/.NETFramework,Version=v4.0.AssemblyAttribute.cs /target:exe /define:DEBUG /nostdlib /platform:x86 /reference:/usr/lib/mono/4.0-api/System.dll /reference:/usr/lib/mono/4.0-api/System.Xml.Linq.dll /reference:/usr/lib/mono/4.0-api/System.Data.dll /reference:/usr/lib/mono/4.0-api/System.Core.dll /reference:/home/nuc/go/src/github.com/Philipp15b/go-steam/generator/SteamKit/Resources/SteamLanguageParser/bin/Debug//SteamLanguageParser.exe /reference:/usr/lib/mono/4.0-api//mscorlib.dll /warn:4
                Microsoft (R) Visual C# Compiler version 2.8.2.62916 (2ad4aabc)
                Copyright (C) Microsoft Corporation. All rights reserved.
Program.cs(27,29): error CS0122: 'LanguageParser' is inaccessible due to its protection level
        Task "Csc" execution -- FAILED
        Done building target "CoreCompile" in project "/home/nuc/go/src/github.com/Philipp15b/go-steam/generator/GoSteamLanguageGenerator/GoSteamLanguageGenerator.csproj".-- FAILED
Done building project "/home/nuc/go/src/github.com/Philipp15b/go-steam/generator/GoSteamLanguageGenerator/GoSteamLanguageGenerator.csproj".-- FAILED

Build FAILED.
Errors:

/home/nuc/go/src/github.com/Philipp15b/go-steam/generator/GoSteamLanguageGenerator/GoSteamLanguageGenerator.csproj (default targets) ->
/usr/lib/mono/xbuild/14.0/bin/Microsoft.CSharp.targets (CoreCompile target) ->

        Program.cs(27,29): error CS0122: 'LanguageParser' is inaccessible due to its protection level

         0 Warning(s)
         1 Error(s)

Time Elapsed 00:00:01.1137200

Alternatively I have tried msbuild without success:

$ msbuild GoSteamLanguageGenerator.csproj /p:OutputPath=bin/Debug
Microsoft (R) Build Engine version 16.0.0.0 for Mono
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 07/30/2019 13:54:14.
Project "/home/nuc/go/src/github.com/Philipp15b/go-steam/generator/GoSteamLanguageGenerator/GoSteamLanguageGenerator.csproj" on node 1 (default targets).
Project "/home/nuc/go/src/github.com/Philipp15b/go-steam/generator/GoSteamLanguageGenerator/GoSteamLanguageGenerator.csproj" (1) is building "/home/nuc/go/src/github.com/Philipp15b/go-steam/generator/SteamKit/Resources/SteamLanguageParser/SteamLanguageParser.csproj" (2:2) on node 1 (default targets).
CoreCompile:
  /usr/lib/mono/msbuild/15.0/bin/Roslyn/csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /highentropyva- /reference:/usr/lib/mono/4.0-api/mscorlib.dll /reference:/usr/lib/mono/4.0-api/System.Core.dll /reference:/usr/lib/mono/4.0-api/System.Data.DataSetExtensions.dll /reference:/usr/lib/mono/4.0-api/System.Data.dll /reference:/usr/lib/mono/4.0-api/System.dll /reference:/usr/lib/mono/4.0-api/System.Xml.dll /reference:/usr/lib/mono/4.0-api/System.Xml.Linq.dll /debug:portable /filealign:512 /out:obj/x86/Debug/SteamLanguageParser.exe /target:winexe /utf8output CodeGenerator.cs Generator/JavaGen.cs Generator/CSharpGen.cs Generator/ObjCGenBase.cs Generator/ObjCImplementationGen.cs Generator/ObjCInterfaceGen.cs Parser/LanguageParser.cs Parser/SymbolLocator.cs Parser/TokenAnalyzer.cs Program.cs Properties/AssemblyInfo.cs "/tmp/.NETFramework,Version=v4.0.AssemblyAttributes.cs"
_CopyAppConfigFile:
Skipping target "_CopyAppConfigFile" because all output files are up-to-date with respect to the input files.
CopyFilesToOutputDirectory:
  Copying file from "/home/nuc/go/src/github.com/Philipp15b/go-steam/generator/SteamKit/Resources/SteamLanguageParser/obj/x86/Debug/SteamLanguageParser.exe" to "/home/nuc/go/src/github.com/Philipp15b/go-steam/generator/SteamKit/Resources/SteamLanguageParser/bin/Debug/SteamLanguageParser.exe".
  SteamLanguageParser -> /home/nuc/go/src/github.com/Philipp15b/go-steam/generator/SteamKit/Resources/SteamLanguageParser/bin/Debug/SteamLanguageParser.exe
  Copying file from "/home/nuc/go/src/github.com/Philipp15b/go-steam/generator/SteamKit/Resources/SteamLanguageParser/obj/x86/Debug/SteamLanguageParser.pdb" to "/home/nuc/go/src/github.com/Philipp15b/go-steam/generator/SteamKit/Resources/SteamLanguageParser/bin/Debug/SteamLanguageParser.pdb".
Done Building Project "/home/nuc/go/src/github.com/Philipp15b/go-steam/generator/SteamKit/Resources/SteamLanguageParser/SteamLanguageParser.csproj" (default targets).
GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
CoreCompile:
  /usr/lib/mono/msbuild/15.0/bin/Roslyn/csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /platform:x86 /errorreport:prompt /warn:4 /define:DEBUG /highentropyva- /reference:/usr/lib/mono/4.0-api/mscorlib.dll /reference:/home/nuc/go/src/github.com/Philipp15b/go-steam/generator/SteamKit/Resources/SteamLanguageParser/bin/Debug/SteamLanguageParser.exe /reference:/usr/lib/mono/4.0-api/System.Core.dll /reference:/usr/lib/mono/4.0-api/System.Data.dll /reference:/usr/lib/mono/4.0-api/System.dll /reference:/usr/lib/mono/4.0-api/System.Xml.Linq.dll /debug+ /debug:portable /optimize- /out:obj/x86/Debug/GoSteamLanguageGenerator.exe /target:exe /utf8output Program.cs Properties/AssemblyInfo.cs GoGen.cs "/tmp/.NETFramework,Version=v4.0.AssemblyAttributes.cs"
Program.cs(27,29): error CS0122: 'LanguageParser' is inaccessible due to its protection level [/home/nuc/go/src/github.com/Philipp15b/go-steam/generator/GoSteamLanguageGenerator/GoSteamLanguageGenerator.csproj]
Done Building Project "/home/nuc/go/src/github.com/Philipp15b/go-steam/generator/GoSteamLanguageGenerator/GoSteamLanguageGenerator.csproj" (default targets) -- FAILED.

Build FAILED.

"/home/nuc/go/src/github.com/Philipp15b/go-steam/generator/GoSteamLanguageGenerator/GoSteamLanguageGenerator.csproj" (default target) (1) ->
(CoreCompile target) -> 
  Program.cs(27,29): error CS0122: 'LanguageParser' is inaccessible due to its protection level [/home/nuc/go/src/github.com/Philipp15b/go-steam/generator/GoSteamLanguageGenerator/GoSteamLanguageGenerator.csproj]

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:02.70
Philipp15b commented 5 years ago

It might be necessary to add a public modifier to the class. I'm not sure why this was not a problem before. Happy to accept pull requests for this!

Nuc1eoN commented 5 years ago

Indeed that fixed it! PR is out.

Philipp15b commented 5 years ago

I've also updated the submodule in this repository (941c01e2d2f0185c7d64a867e1f0656b9630da60), so your changes are now in go-steam. Thanks again!