0

I am building a .netcore app and want to deploy it as self-contained app. I don't have access to nuget server for my build agent. But when I build it using the dotnet publish line below, I see dotnet.exe trying to get the nuget package https://www.nuget.org/packages/microsoft.netcore.app.runtime.win-x64/.

I don't want dotnet.exe to get it from nuget.org(api). How can I deploy this app with its x64 DLLs? I have installed .netcore SDK/runtimes on build machine. I don't have .netcore runtime dlls installed on the host windows server I am planning to deploy on.

dotnet publish WorkerService1.csproj -c release -r win-x64 --self-contained true

  • there is a way to add a local package source and then pull from that. You would have to put all your packages in there though. – Andy Sep 07 '20 at 04:20
  • Correct Andy! I do have local package source accessible to the build agent. But the same DLLs found in the package https://www.nuget.org/packages/microsoft.netcore.app.runtime.win-x64/ do exist in the .netcore SDK. I think I am missing a switch for dotnet/msbuild to bring these DLLs from the SDK/runtime and not from NuGet. – rara rarara Sep 07 '20 at 05:19

0 Answers0