So I have a dotnet template that is published to nuget, but it is only getting installed when running the install command with the version like so: dotnet new --install Foundation.Api::0.3.0
. When I run the install command without the version dotnet new --install Foundation.Api
, it gives me a 401 unauthorized. Is there some kind of setting I need to add to my csproj? I'm 99% i've done this before without the version and it's ran just fine.
Here's the full error:
Determining projects to restore...
C:\Program Files\dotnet\sdk\5.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.EolTargetFrameworks.targets(28,5): warning NETSDK1138: The target framework 'netcoreapp1.0' is out of support and will not receive security updates in the future. Please refer to https://aka.ms/dotnet-core-support for more information about the support policy. [C:\Users\Paul\.templateengine\dotnetcli\v5.0.100\scratch\restore.csproj]
Retrying 'FindPackagesByIdAsync' for source 'https://company.pkgs.visualstudio.com/_packaging/94b81536-897b-42e6-8b47-bca8f94285e6/nuget/v3/flat2/foundation.api/index.json'.
Response status code does not indicate success: 401 (Unauthorized).
Retrying 'FindPackagesByIdAsync' for source 'https://company.pkgs.visualstudio.com/_packaging/94b81536-897b-42e6-8b47-bca8f94285e6/nuget/v3/flat2/foundation.api/index.json'.
Response status code does not indicate success: 401 (Unauthorized).
C:\Program Files\dotnet\sdk\5.0.100\NuGet.targets(131,5): error : Failed to retrieve information about 'Foundation.Api' from remote source 'https://company.pkgs.visualstudio.com/_packaging/94b81536-897b-42e6-8b47-bca8f94285e6/nuget/v3/flat2/foundation.api/index.json'. [C:\Users\Paul\.templateengine\dotnetcli\v5.0.100\scratch\restore.csproj]
C:\Program Files\dotnet\sdk\5.0.100\NuGet.targets(131,5): error : Response status code does not indicate success: 401 (Unauthorized). [C:\Users\Paul\.templateengine\dotnetcli\v5.0.100\scratch\restore.csproj]