- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个在本地构建良好的项目,但在 VSTS 中构建它在 dotnet build
命令中失败。这个错误对我来说看起来很奇怪,因为我不知道为什么构建命令会再次尝试恢复包。错误如下所示:
2018-07-09T11:06:48.2541705Z Retrying 'FindPackagesByIdAsync' for source 'https://mycompany.pkgs.visualstudio.com/_packaging/5b9fd539-d653-4771-aa3c-6544d73b1234/nuget/v3/flat2/system.data.sqlclient/index.json'. 2018-07-09T11:06:48.2562315Z Response status code does not indicate success: 401 (Unauthorized).
在构建步骤之前,我有一个成功完成的 dotnet 还原步骤。还原步骤使用 NuGet.config 文件,其中包含 VSTS 中的私有(private)提要,但 URL 看起来与错误中的不相似。这里的文件只是为了清楚起见。
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="MyCompany.NuGet.Internal" value="https://MyCompany.pkgs.visualstudio.com/_packaging/MyCompany.NuGet.Internal/nuget/v3/index.json" />
<add key="MyCompany.NuGet.ThirdParty" value="https://MyCompany.pkgs.visualstudio.com/_packaging/MyCompany.Nuget.ThirdParty/nuget/v3/index.json" />
</packageSources>
</configuration>
这可能是什么问题? dotnet 构建步骤是否完全忽略 NuGet.config 文件并尝试项目中的提要?我不知道该供稿 URL 是如何生成的。
最佳答案
我能够通过将 --no-restore
参数传递给 dotnet build
命令来解决问题。
我刚刚读了this article here并想试一试,结果成功了。
With .NET Core 1.x SDK, you needed to explicitly run the dotnet restore before running dotnet build. Starting with .NET Core 2.0 SDK, dotnet restore runs implicitly when you run dotnet build. If you want to disable implicit restore when running the build command, you can pass the --no-restore option
看起来 VSTS 中的 dotnet build
不关心 NuGet.config 文件,并尝试在没有它的情况下进行恢复。
关于nuget - 恢复包时 dotnet build 命令失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51244716/
我在 Ubuntu v16.04 上安装了 dotent core。问题是当我尝试使用 dotnet user-secrets 时它说:未找到匹配命令“dotnet-user-secrets”的可执行
好。这似乎是我看到答案时会面对的问题类型。 所以... 为什么要打扰 dotnet build做之前dotnet publish ? build自动执行 restore .凉爽的。 好像publish
我正在尝试创建一个 dotnet 新模板的 NuGet 包。我创建了一个 nuspec 文件来设置包的详细信息,它位于我的内容文件夹旁边,其中包含我想要打包的所有内容: My.
我正在尝试使用'dotnet dev-certs'工具导出https证书以包含在Docker镜像中。现在我正在使用: dotnet dev-certs https -v -ep $(HOME)\.as
我昨天从 .Net 5 更新到 .Net 6,现在我的项目无法从 dotnet run 开始。然后我得到错误: Building... warn: Microsoft.AspNetCore.Serve
我使用 dockerfile 成功构建,但是当我尝试从构建镜像运行新容器时,出现以下错误: 我必须为解决方案做什么? Error : /bin/sh: 1: [dotnet,: not found d
我有一个引用其他几个项目的 .NET Core 3 项目。我的主根项目有一个 Release-X构建配置,但其他项目只有 Release配置,无匹配 Release-X配置。 当我尝试使用这个发布我的
我的 dotnet new 列表中有许多“孤立的”dotnet 模板。 它们不再存在于我的驱动器上,因为我删除了文件夹,所以我不能 dotnet new --uninstall。 有没有办法从列表中删
编辑: 以下是最初与标题一起发布的前一个问题 xunit show ITestOutputHelper output when run in the console 经过调查(见评论),这个问题仍然非
来自 docs.microsoft.com: dotnet build - Builds a project and all of its dependencies. dotnet run - Run
我有一个 Dotnet 核心项目,我试图在其中安装 Microsoft.EntityFrameworkCore.Tools.Dotnet 以使用迁移。我在 Mac 上,所以我使用 MySql.Data
我已经在这个问题上徘徊了很长一段时间,但仍然没有找到答案,也没有其他帖子处理同样的问题。 我已经发布了一个 .net 5.0 网站,如果我在同一个发布的文件夹中运行 dotnet,一切都会正常运行。在
我正在尝试使用 CLI dotnet 命令复制以下 Azure 管道: - task: DotNetCoreCLI@2 inputs: command: publish publi
假设这个文件夹结构 SampleApp global.json Src Web pro
我正在使用dotnet watch命令来运行asp.net core项目。但是,默认情况下,它选择 Production 作为环境。 我已经尝试了这两个选项: 1) > dotnet watch AS
我正在尝试在 Linux 主机上的官方 Microsoft/dotnet 镜像之外的容器中构建一个 dotnet 项目,因为该镜像与 Windows 和 Linux 都兼容。我只有 linux 主机,
我不是 Linux 用户,所以这可能是一个简单的修复,但我已经尝试了以下方法: 首先我使用命令 curl -sSL https://dot.net/v1/dotnet-install.sh | bas
我在发布配置文件中遇到了 Visual Studio 和 EF 迁移的奇怪情况。鉴于: Visual Studio 2019 v16.4 .NET 核心项目。目标 .NET Core 3.1 EF 3
我已经安装了 .NET Core 1.0.1 以与 VS 2015 Update 3 一起使用,并且以管理员身份运行(在 Windows 8.1 x64 上)。 如果我创建任何 .NET Core 项
我正在尝试为dotnet core 2创建开发Dockerfile。到目前为止,我的工作是: FROM microsoft/aspnetcore-build:2.0 VOLUME /app WORKD
我是一名优秀的程序员,十分优秀!