Description of problem: NuGet in Fedora is too outdated. It cannot handle modern packages. It need to be updated to latest upstream version 5.0.2. Version-Release number of selected component (if applicable): nuget-2.8.7-8.fc30 How reproducible: Always. Steps to Reproduce: 1. Load project with NLog or Newtonsoft.Json in dependencies. 2. Run nuget restore. Actual results: Error: Installing 'DotNetZip 1.13.3'. Installing 'NLog 4.6.4'. Successfully installed 'DotNetZip 1.13.3'. 'NLog' already has a dependency defined for 'NETStandard.Library' Expected results: Successful dependencies installation. Additional info:
I did a quick investigation. We used to get our tarball from https://download.mono-project.com/sources/nuget/, which was prepared by directhex, a Debian packager, and Xamarin/Microsoft employee. But the last version he prepared like this was 2.8.5 Debian is also still on 2.8.7: https://packages.debian.org/search?keywords=nuget I mean this is just an indication, that the task is not trivial. I went to Github, this is the repository we are looking at: https://github.com/NuGet/NuGet.Client The first thing I noticed: build.sh wants to download the dotnet cli and msbuild, which are both not part of Fedora yet. This is the show stopper. We need dotnet cli in Fedora for getting uptodate Mono libraries. There is the DotNet SIG: https://fedoraproject.org/wiki/SIGs/DotNet But they are still not there yet. We could try to build without msbuild, and without xbuild, because that is deprecated anyway. This is how far I got: cd /build/Shared # to avoid: # AssetTargetFallbackFramework.cs(90,36): error CS0122: `NuGet.Shared.HashCodeCombiner' is inaccessible due to its protection level # AssetTargetFallbackFramework.cs(93,26): error CS0122: `NuGet.Shared.HashCodeCombiner.AddStringIgnoreCase(string)' is inaccessible due to its protection level sed -i "s/internal/public/g" HashCodeCombiner.cs mcs EqualityUtility.cs HashCodeCombiner.cs SharedExtensions.cs TypeExtensions.cs TypeInfo.cs -target:library -out:NuGet.Shared.dll cd src/NuGet.Core/NuGet.Frameworks mcs *.cs def/*.cs comparers/*.cs -r:../../../build/Shared/NuGet.Shared.dll -target:library -out:NuGet.Frameworks.dll cd src/NuGet.Core/NuGet.Common mcs *.cs Logging/*.cs AsyncEnumerable/*.cs Errors/*.cs PathUtil/*.cs Telemetry/*.cs Tokenizer/*.cs Properties/*.cs -r:System.IO.Compression -resource:Strings.resx -target:library -out:Nuget.Common.dll I tried this even with Mono 5.20, but I still get this stacktrace: Unhandled Exception: Mono.CSharp.InternalErrorException: MsBuildStringUtility.cs(91,49): NuGet.Common.MSBuildStringUtility.GetNuGetLogCodes(string) ---> Mono.CSharp.InternalErrorException: (1,1): ---> Mono.CSharp.InternalErrorException: MsBuildStringUtility.cs(92,9): NuGet.Common.MSBuildStringUtility.<GetNuGetLogCodes>c__Iterator0.<result>__2 ---> System.NullReferenceException: Object reference not set to an instance of an object at IKVM.Reflection.Signature.WriteType (IKVM.Reflection.Emit.ModuleBuilder module, IKVM.Reflection.Writer.ByteBuffer bb, IKVM.Reflection.Type type) [0x000b6] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at IKVM.Reflection.FieldSignature.WriteSig (IKVM.Reflection.Emit.ModuleBuilder module, IKVM.Reflection.Writer.ByteBuffer bb) [0x00014] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at IKVM.Reflection.Emit.FieldBuilder..ctor (IKVM.Reflection.Emit.TypeBuilder type, System.String name, IKVM.Reflection.Type fieldType, IKVM.Reflection.CustomModifiers customModifiers, IKVM.Reflection.FieldAttributes attribs) [0x00062] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at IKVM.Reflection.Emit.TypeBuilder.__DefineField (System.String fieldName, IKVM.Reflection.Type type, IKVM.Reflection.CustomModifiers customModifiers, IKVM.Reflection.FieldAttributes attributes) [0x00000] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at IKVM.Reflection.Emit.TypeBuilder.DefineField (System.String fieldName, IKVM.Reflection.Type type, IKVM.Reflection.Type[] requiredCustomModifiers, IKVM.Reflection.Type[] optionalCustomModifiers, IKVM.Reflection.FieldAttributes attributes) [0x0000b] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.Field.Define () [0x00076] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.TypeDefinition.DoDefineMembers () [0x0033a] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 --- End of inner exception stack trace --- at Mono.CSharp.TypeDefinition.DoDefineMembers () [0x0035b] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.ClassOrStruct.DoDefineMembers () [0x000e9] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.CompilerGeneratedContainer.DoDefineMembers () [0x00033] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.StateMachine.DoDefineMembers () [0x0002c] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.IteratorStorey.DoDefineMembers () [0x0022a] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.TypeDefinition.Define () [0x00012] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.ExplicitBlock.DefineStoreyContainer (Mono.CSharp.EmitContext ec, Mono.CSharp.AnonymousMethodStorey storey) [0x004db] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.ParametersBlock.Emit (Mono.CSharp.EmitContext ec) [0x0001c] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.ToplevelBlock.Emit (Mono.CSharp.EmitContext ec) [0x00026] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 --- End of inner exception stack trace --- at Mono.CSharp.ToplevelBlock.Emit (Mono.CSharp.EmitContext ec) [0x000df] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.MethodData.Emit (Mono.CSharp.TypeDefinition parent) [0x00092] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.MethodOrOperator.Emit () [0x0021c] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.Method.Emit () [0x0012c] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 --- End of inner exception stack trace --- at Mono.CSharp.Method.Emit () [0x00141] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.TypeDefinition.Emit () [0x002f5] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.ClassOrStruct.Emit () [0x00025] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.Class.Emit () [0x00000] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.TypeDefinition.EmitContainer () [0x0000f] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.TypeContainer.EmitContainer () [0x0001e] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.NamespaceContainer.EmitContainer () [0x00007] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.TypeContainer.EmitContainer () [0x0001e] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.NamespaceContainer.EmitContainer () [0x00007] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.TypeContainer.EmitContainer () [0x0001e] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.ModuleContainer.EmitContainer () [0x0009c] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.AssemblyDefinition.Emit () [0x00098] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.AssemblyDefinitionStatic.Emit () [0x00126] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.Driver.Compile () [0x002f3] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.Driver.Main (System.String[] args) [0x00052] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 [ERROR] FATAL UNHANDLED EXCEPTION: Mono.CSharp.InternalErrorException: MsBuildStringUtility.cs(91,49): NuGet.Common.MSBuildStringUtility.GetNuGetLogCodes(string) ---> Mono.CSharp.InternalErrorException: (1,1): ---> Mono.CSharp.InternalErrorException: MsBuildStringUtility.cs(92,9): NuGet.Common.MSBuildStringUtility.<GetNuGetLogCodes>c__Iterator0.<result>__2 ---> System.NullReferenceException: Object reference not set to an instance of an object at IKVM.Reflection.Signature.WriteType (IKVM.Reflection.Emit.ModuleBuilder module, IKVM.Reflection.Writer.ByteBuffer bb, IKVM.Reflection.Type type) [0x000b6] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at IKVM.Reflection.FieldSignature.WriteSig (IKVM.Reflection.Emit.ModuleBuilder module, IKVM.Reflection.Writer.ByteBuffer bb) [0x00014] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at IKVM.Reflection.Emit.FieldBuilder..ctor (IKVM.Reflection.Emit.TypeBuilder type, System.String name, IKVM.Reflection.Type fieldType, IKVM.Reflection.CustomModifiers customModifiers, IKVM.Reflection.FieldAttributes attribs) [0x00062] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at IKVM.Reflection.Emit.TypeBuilder.__DefineField (System.String fieldName, IKVM.Reflection.Type type, IKVM.Reflection.CustomModifiers customModifiers, IKVM.Reflection.FieldAttributes attributes) [0x00000] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at IKVM.Reflection.Emit.TypeBuilder.DefineField (System.String fieldName, IKVM.Reflection.Type type, IKVM.Reflection.Type[] requiredCustomModifiers, IKVM.Reflection.Type[] optionalCustomModifiers, IKVM.Reflection.FieldAttributes attributes) [0x0000b] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.Field.Define () [0x00076] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.TypeDefinition.DoDefineMembers () [0x0033a] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 --- End of inner exception stack trace --- at Mono.CSharp.TypeDefinition.DoDefineMembers () [0x0035b] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.ClassOrStruct.DoDefineMembers () [0x000e9] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.CompilerGeneratedContainer.DoDefineMembers () [0x00033] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.StateMachine.DoDefineMembers () [0x0002c] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.IteratorStorey.DoDefineMembers () [0x0022a] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.TypeDefinition.Define () [0x00012] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.ExplicitBlock.DefineStoreyContainer (Mono.CSharp.EmitContext ec, Mono.CSharp.AnonymousMethodStorey storey) [0x004db] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.ParametersBlock.Emit (Mono.CSharp.EmitContext ec) [0x0001c] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.ToplevelBlock.Emit (Mono.CSharp.EmitContext ec) [0x00026] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 --- End of inner exception stack trace --- at Mono.CSharp.ToplevelBlock.Emit (Mono.CSharp.EmitContext ec) [0x000df] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.MethodData.Emit (Mono.CSharp.TypeDefinition parent) [0x00092] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.MethodOrOperator.Emit () [0x0021c] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.Method.Emit () [0x0012c] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 --- End of inner exception stack trace --- at Mono.CSharp.Method.Emit () [0x00141] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.TypeDefinition.Emit () [0x002f5] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.ClassOrStruct.Emit () [0x00025] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.Class.Emit () [0x00000] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.TypeDefinition.EmitContainer () [0x0000f] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.TypeContainer.EmitContainer () [0x0001e] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.NamespaceContainer.EmitContainer () [0x00007] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.TypeContainer.EmitContainer () [0x0001e] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.NamespaceContainer.EmitContainer () [0x00007] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.TypeContainer.EmitContainer () [0x0001e] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.ModuleContainer.EmitContainer () [0x0009c] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.AssemblyDefinition.Emit () [0x00098] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.AssemblyDefinitionStatic.Emit () [0x00126] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.Driver.Compile () [0x002f3] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 at Mono.CSharp.Driver.Main (System.String[] args) [0x00052] in <55b013571d4f4c41aa1953ef1b1de2ca>:0 Do you think it is worth the effort going down this route? Would you be able to help, Vitaly?
I have filed now an issue upstream for this mcs bug. https://github.com/mono/mono/issues/15694 I commented the method, and was able to continue further. My current build script is here: https://gist.github.com/tpokorra/d733453432740af990de4064cd288b13 I was able to build some dlls, but have now the same compiler issue with building NuGet.Packaging.dll
I got now to **** building /root/NuGet.Client-5.0.2.5988/src/NuGet.Core/NuGet.Protocol/ **** ./HttpSource/HttpSource.cs(245,60): error CS1525: Unexpected symbol `(', expecting `,', `;', or `=' see https://github.com/NuGet/NuGet.Client/blob/dev/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpSource.cs#L245 I just wonder if mcs is too old for this, and we need to wait until csc and msbuild land in Fedora... I have updated the gist with my latest progress: https://gist.github.com/tpokorra/d733453432740af990de4064cd288b13
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle. Changing version to '31'.
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle. Changing version to 32.
This bug appears to have been reported against 'rawhide' during the Fedora 33 development cycle. Changing version to 33.
dotnet is now part of the official Fedora repos: https://src.fedoraproject.org/rpms/dotnet3.1 You can now run dotnet restore to restore nuget packages. https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-restore Perhaps we don't need this nuget package anymore? Is dotnet restore a full replacement for nuget? I am not sure.
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.