1

I added a nuget restore which works fine. Dev and Release build works fine on my pc. Its failing in Azure Devops restore.

Link to error txt Error.txt

My Csproj

<Project Sdk="Microsoft.NET.Sdk.Web">    
  <PropertyGroup>
    <TargetFramework>netcoreapp2.1</TargetFramework>
     <RuntimeFrameworkVersion>2.1.5</RuntimeFrameworkVersion>
    <UserSecretsId>aspnet-AspNetCorePagesIdentity-***************-***-*******-</UserSecretsId>
    <TypeScriptToolsVersion>3.0</TypeScriptToolsVersion>
    <AutoGenerateBindingRedirects>True</AutoGenerateBindingRedirects>
  </PropertyGroup>

  <ItemGroup>
    <Content Include="Client\assets\control-logo.png" />
    <Content Include="Client\assets\webrelay_170.png" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.5" />
    <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.5" PrivateAssets="All" />
  </ItemGroup>

  <ItemGroup>
    <Folder Include="Areas\Identity\Services\" />
  </ItemGroup>

  <ItemGroup>
    <Content Update="Client\_ViewImports.cshtml">
      <Pack>$(IncludeRazorContentInPack)</Pack>
    </Content>
  </ItemGroup>
</Project>
Hossein Golshani
  • 1,847
  • 5
  • 16
  • 27
Steve Coleman
  • 1,987
  • 2
  • 17
  • 28

1 Answers1

0

You need to use cmd line and use "dotnet restore" not build in nuget restore task.

in yaml steps: - task: DotNetCoreCLI@2 inputs: command: restore projects: '**/*.csproj' feedsToUse: config nugetConfigPath: NuGet.config # Relative to root of the repository externalFeedCredentials: <Name of the NuGet service connection>

Janusz Nowak
  • 2,595
  • 1
  • 17
  • 36