简体   繁体   English

Azure DevOps 还原失败

[英]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.

相关问题 Azure DevOps 管道 - dotnet restore Package 内容 Hash 验证失败 - Azure DevOps Pipeline - dotnet restore Package Content Hash Validation Fails Nuget 在 Azure Devops 上恢复失败,并显示消息“无法加载源的服务索引” - Nuget restore fails on Azure Devops with message "unable to load the service index for source" Azure DevOps Pipeline 在 NuGet 恢复任务中失败 - Azure DevOps Pipeline failing at NuGet restore task Azure Devops nuget 恢复无法解决依赖关系 - Azure Devops nuget restore unable to resolve dependencies Azure DevOps YAML 管道失败,并显示“没有预期的序列” - Azure DevOps YAML Pipeline fails with “A sequence was not expected” Azure Devops GitHttpClient 的 CreateAnnotatedTagAsync API 失败 - Azure Devops GitHttpClient's CreateAnnotatedTagAsync API fails Azure devops 无法为 Nuget 包连接 Nuget 还原和 VSBuild - Azure devops Cant connect Nuget Restore and VSBuild for Nuget Packages 在 Azure DevOps Build Pipeline 中恢复 Libman JS 库 - Restore Libman JS Libraries in Azure DevOps Build Pipeline Azure Devops 私有构建代理在 nuget 恢复任务中失败 - Azure Devops private build agent failing at nuget restore task .net 核心 3.1 Azure devops 管道在 nuget 恢复时失败 - .net core 3.1 Azure devops Pipeline failed on nuget restore
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM