Linux/UNIX build for NuGet.CommandLine #10603
Replies: 1 comment 2 replies
-
|
@YakoYakoYokuYoku Have you tried using the Unfortunately self-contained .NET Core apps are not a direct replacement for ILMerged .NET Framework apps. .NET Core apps, during the publish step, need to select a runtime identifier (RID). This makes the publish output specific to Windows, Linux or Mac, and therefore a single executable is no longer compatible with all platforms like a .NET Framework assembly is thanks to mono. Hence, I advocate to make NuGet's features in the dotnet CLI a superset of nuget.exe, and then we can make nuget.exe obsolete. There are still some gaps, but if customers give us feedback about which commands are most important to them, we can prioritize the most requested commands. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Long ago the
nugetCLI could be built using Monoxbuild. But as time passed andxbuildwasn't making the cut and it was trimmed off the repository while leaving no documented way of building it for Linux or UNIX-like distros.Time has passed since with no news about it until recently. Back in February of the past year I published a patch in the Solus Phabricator that updated it to a much newer version of NuGet (latest version of the package was
2.11, still supportingxbuild). Although I haven't updated it since then because of failing builds withmono-msbuild, I'll now explain how I've built version5.10.0.7131.Basically the steps are:
build/bootstrap.projandsrc/NuGet.Clients/NuGet.CommandLine.csproj.dotnetsrc/NuGet.Clients/NuGet.CommandLine.csprojwith theSkipILMergeOfNuGetExeproperty set totrue.NuGet.exeand its*.dlldependencies and install it to the proper dir or...dotnet publish -o <your output path>.Microsoft.VisualStudio.Setup.Configuration.Interop.dllto avoid licensing issues.monorunsNuGet.exeas intended although I couldn't find the way to do it withdotnetyet.As an alternative to
ilmerge.exe(as it uses native Windows libs) I'd suggest to produce self-contained applications.Beta Was this translation helpful? Give feedback.
All reactions