我添加了一个正常工作的nuget恢复。开发和发布版本在我的PC上运行正常。 在Azure Devops还原中失败。
链接到错误txt Error.txt
我的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>
答案 0 :(得分:0)
您需要使用cmd行并使用“ dotnet restore”,而不是在nuget restore任务中构建。
以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>