[英]Azure DevOps restore fails
I added a nuget restore which works fine.我添加了一个工作正常的 nuget 恢复。 Dev and Release build works fine on my pc.
Dev 和 Release 版本在我的电脑上运行良好。 Its failing in Azure Devops restore.
它在 Azure Devops 还原中失败。
Link to error txt Error.txt链接到错误 txt Error.txt
My Csproj我的 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>
You need to use cmd line and use "dotnet restore" not build in nuget restore task.您需要使用 cmd 行并使用“dotnet restore”而不是在 nuget restore 任务中构建。
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>
在 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>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.