简体   繁体   English

Nuget 包和 Dotnet 发布永远

[英]Nuget packages & Dotnet publish taking forever

Anybody is familiar with Nuget Packages in IIS server?有人熟悉 IIS 服务器中的 Nuget 包吗?

I'm stuck with a serious issue from 3 days.从 3 天开始,我就遇到了一个严重的问题。

I tried installing and pushing.nupkg file I have to nuget.org by making source as my local server by adding it as local feed.我尝试安装和 push.nupkg 文件我必须通过将源作为本地服务器添加到 nuget.org 并将其添加为本地提要。

After this problem I tried to host a new .netcore site in IIS by publishing the code first but when I try "dotnet publish" it is showing MS NU1100 error and failing.出现此问题后,我尝试通过首先发布代码在 IIS 中托管一个新的 .netcore 站点,但是当我尝试“dotnet publish”时,它显示 MS NU1100 错误并失败。

Then after I tried some ways which I got from internet like deleting Nuget.Config file from %AppData% folder since then when trying "dotnet publish" it is taking for ever until I fed up and abort it myself.然后,在我尝试了一些从互联网上获得的方法之后,比如从 %AppData% 文件夹中删除 Nuget.Config 文件,从那时起,当我尝试“dotnet publish”时,它一直在使用,直到我厌倦并自己中止它。

About NuGet Error NU1100关于 NuGet 错误 NU1100

Scenario 1场景 1

Unable to resolve 'Dependency (>= 1.0.0)' for 'TargetFramework'无法解析“TargetFramework”的“依赖项 (>= 1.0.0)”

Issue问题

A dependency could not be resolved.无法解决依赖关系。 This is a generic issue for types that are not packages or projects.对于不是包或项目的类型,这是一个普遍问题。

Solution 1解决方案 1

Open the project file and examine the list of its dependencies.打开项目文件并检查其依赖项列表。 Check that each dependency exists on the package sources you're using, and that the package supports the project's target framework.检查您正在使用的包源上是否存在每个依赖项,以及该包是否支持项目的目标框架。

Solution 2方案二

This issue may also be caused by the lack of configured NuGet sources.此问题也可能是由于缺少已配置的 NuGet 源造成的。 Sometimes a configuration may not specify any sources.有时配置可能不指定任何来源。 You can verify this by running dotnet nuget list source from the project or solution directory.您可以通过从项目或解决方案目录运行dotnet nuget list source来验证这一点。 Check the content of the user configuration and add a source there.检查用户配置的内容并在那里添加源。 Alternatively, you can create a configuration file using dotnet new nugetconfig .或者,您可以使用dotnet new nugetconfig创建配置文件。 We recommend that you create this file at the repository level.我们建议您在存储库级别创建此文件。

Scenario 2场景 2

Unable to resolve 'Dependency (>= 1.0.0)' for 'TargetFramework'.无法解析“TargetFramework”的“依赖项 (>= 1.0.0)”。 PackageSourceMapping is enabled, the following source(s) were not considered: nuget. PackageSourceMapping 已启用,未考虑以下来源:nuget。

Issue问题

A dependency could not be resolved.无法解决依赖关系。 PackageSourceMapping is enabled and there are no matching sources. PackageSourceMapping 已启用,但没有匹配的源。

Solution解决方案

Check your NuGet.Config for the PackageSourceMapping configuration and ensure there's a matching pattern for the package in question.检查您的NuGet.Config中的PackageSourceMapping配置,并确保存在与相关包匹配的模式。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Dotnet 包包括 nuget 包到 output nuget ZEFE90A8E604A7C840E8ZD03A - Dotnet Pack include nuget packages into output nuget package dotnet pack 命令不会为测试和规范项目生成 .nuget 包? - dotnet pack command does not generate .nuget packages for tests and spec projects? 使用dotnet cli使用nuget.org的http版本还原项目的nuget软件包 - Restoring nuget packages of project with the http version of nuget.org using the dotnet cli dotnet pack可以在不添加其他nuget软件包的内容文件的情况下创建nuget软件包吗? - Can dotnet pack create a nuget package without adding content files from other nuget packages? 如何正确设置dotnet核心类库以在Azure DevOps中发布到NuGet feed? - How do you properly set up a dotnet core class libray to publish to NuGet feed in Azure DevOps? 使 dotnet 发布使用来自 bin 文件夹而不是来自 nuget 缓存的依赖项 - Make dotnet publish use dependencies from bin folder and not from nuget cache 如何制作本地nuget包并在dotnet核心本地解决方案 - How to make local nuget packages and refference them across solutions locally in dotnet core 如何在Visual Studio Team Services中发布和访问nuget包 - How can I publish and access nuget packages within Visual Studio Team Services 考虑到它们之间的依赖关系,我应该如何将我的项目发布为 NuGet 包? - How should I publish my projects as NuGet packages considering dependencies between them? dotnet 发布“无法加载源 https://api.nuget.org/v3/index.json 的服务索引” - dotnet publish “Unable to load the service index for source https://api.nuget.org/v3/index.json”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM