tomcam
tomcam

Reputation: 5285

Azure functionapp tutorial: Stopped at NU1101: Unable to find package Microsoft.NET.Sdk.Functions

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

Answers (1)

SwethaKandikonda
SwethaKandikonda

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 :

  1. Fix error NU1101: Unable to find package. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages · Hossam Barakat.
  2. Can't compile: Seems to require Microsoft.NET.Sdk.Functions · Issue #80462 · MicrosoftDocs/azure-docs (github.com)
  3. VS 2019 Manage Nuget Packages has only Offline packages (microsoft.com)

Upvotes: 3

Related Questions