I'm trying to install dotnet-svcutil tool on a server that has no internet connection. Visual Studio is also not installed on the server.
.NET 7 SDK is already installed on the server,
dotnet --version
gives:
7.0.100
I have downloaded the tool from https://www.nuget.org/packages/dotnet-svcutil
Then I tried to do offline installation using the following command:
dotnet tool install -g dotnet-svcutil --add-source D:\Install\dotnet-svcutil.2.1.0.nupkg
but unfortunately I get the following error:
C:\Users\admin\AppData\Local\Temp\3\a3fdc36c-b100-4e78-99ba-3f987d505581\restore.csproj : error NU1301: The local source 'D:\Install\dotnet-svcutil.2.1.0.nupkg' doesn't exist. The tool package could not be restored. Tool 'dotnet-svcutil' failed to install. This failure may have been caused by:
- You are attempting to install a preview release and did not use the --version option to specify the version.
- A package by this name was found, but it was not a .NET tool.
- The required NuGet feed cannot be accessed, perhaps because of an Internet connection problem.
- You mistyped the name of the tool.
For more reasons, including package naming enforcement, visit https://aka.ms/failure-installing-tool
Is there anything else I could try in order to install the tool?
Use just folder location without filename as a source:
NOTE:
As you are installing being offline you need
--ignore-failed-sourcesflag. Nuget feed is unavailable and your installation will fail if one of the sources is unavailable. Feeds are accessed in parallel. From here: