Reputation: 5285
Stuck (during a deadline, of course) in the Azure Functionapp Quickstart: Create a C# function in Azure from the command line by the error NU1101: Unable to find package Microsoft.NET.Sdk.Functions
. A websearch for download Microsoft Visual Studio Offline Packages
led to me Create an offline installation - Visual Studio (Windows) | Microsoft Docs which led me to Create an offline installation of Visual Studio Step 1 which told me to download the Visual Studio Professional "bootstrapper". That just seems to update Viusual Studio. And I still get the error.
Upvotes: 3
Views: 3244
Reputation: 8234
I have 3 ways to resolve this
WAY-1: Try reinstalling the latest .Net SDK again.
WAY-2: Add nuget.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
</configuration>
WAY-3: Add Restore Packages step to the build pipeline
- task: DotNetCoreCLI@2
displayName: dotnet restore
inputs:
command: restore
projects: '$(serviceLocation)/**/*.csproj'
includeNuGetOrg: true
REFERENCES :
Upvotes: 3