Jos*_*enk 3 .net c# visual-studio nuget nuget-package
试图从 dll 生成 Nuget 包。我们的项目之一是生成 ConfigurationCore.dll 和下面给出的项目程序集的引用
使用下面的 ConfigurationCore.nuspec 生成 Nuget 包
<?xml version="1.0"?>
<package >
<metadata>
<id>ConfigurationCore</id>
<version>1.2.0</version>
<title>Configuration Core</title>
<authors>MAKK</authors>
<owners>IT Department</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>ConfigurationCore contains core funcationality of Software</description>
<releaseNotes></releaseNotes>
<copyright>Copyright 2018</copyright>
<dependencies>
<dependency id="Newtonsoft.Json" version="10.0.3" />
</dependencies>
</metadata>
<files>
<file src="C:\Users\makk\source\repos\ConfigurationCore\bin\x86\Test\ConfigurationCore.dll" target="lib\net461" />
</files>
</package>
Run Code Online (Sandbox Code Playgroud)
尝试针对项目“NugetTest”收集包“ConfigurationCore.1.2.0”的依赖信息,目标是“.NETFramework,Version=v4.6.1” 收集依赖信息需要 1.09 秒尝试解析包“ConfigurationCore.1.2”的依赖。 0' with DependencyBehavior 'Lowest' 解析依赖信息需要 0 ms 解析安装包 'ConfigurationCore.1.2.0' 的操作 安装包 'ConfigurationCore.1.2.0' 的解析操作 ' http://builtsrv1:8080/ 上的 V2 提要nuget/FindPackagesById()?id= 'ConfigurationCore'&semVerLevel=2.0.0' 返回了一个意外的状态代码 '404 Not Found'。已用时间:00:00:02.1513344 ========== 完成 ==========
注意:Nuget 包源位于本地硬盘上...请建议解决此问题。
小智 8
更新您的 Nuget 包链接。
转到项目-> 管理 Nuget 包。
现在单击您的包源设置
更新源链接到https://api.nuget.org/v3/index.json
在此处输入图像描述 https://i.stack.imgur.com/sMLYn.png
这是因为您引用了一个不存在的链接:http://builtsrv1:8080/nuget/FindPackagesById()?id='ConfigurationCore'&semVerLevel=2.0.0'
您正在使用 url 内的方法,该方法无效,并且是错误的原因:
//this is an error
../nuget/FindPackagesById()?
Run Code Online (Sandbox Code Playgroud)
修复网址,测试并重试,
| 归档时间: |
|
| 查看次数: |
8187 次 |
| 最近记录: |