./NuGet.exe pack MyAssembly.nuspec Attempting to build package from 'MyAssembly.nuspec'. -6ren">
gpt4 book ai didi

c# - 当程序集实际上在库中时,我收到 "Assembly outside lib folder"警告

转载 作者:行者123 更新时间:2023-12-03 22:04:12 26 4
gpt4 key购买 nike

这是我得到的错误:

>./NuGet.exe pack MyAssembly.nuspec
Attempting to build package from 'MyAssembly.nuspec'.
Successfully created package 'V:\...\MyAssembly\bin\Publish\MyAssembly.0.0.0.nupkg'.
WARNING: Issue found with package 'MyAssembly'.

WARNING: Issue: Assembly outside lib folder.
WARNING: Description: The assembly 'lib/net46/MyAssembly.dll' is not inside the 'lib' folder and hence it won't be added as reference when the package is installed into a project.
WARNING: Solution: Move it into the 'lib' folder if it should be referenced.

这是我使用的包括:

<?xml version="1.0" encoding="utf-8"?>
<package>
<metadata>
<id>MyAssembly</id>
<version>0.0.0</version>
<authors>Poma</authors>
<description>MyAssembly</description>
</metadata>
<files>
<file src="MyAssembly.dll" target="lib/net46/" />
</files>
</package>

我用 NuGet Explorer 检查过,dll 确实在 lib/net46 中。这里可能出了什么问题?

更新:NuGet 3.5 和 4.1 会发生这种情况,但 3.4 不会发生这种情况

最佳答案

正如 George 所说,在目标中使用反斜杠 \ 而不是正斜杠 / 并且警告应该消失(转载于 nuget 4.3.0.440).

关于c# - 当程序集实际上在库中时,我收到 "Assembly outside lib folder"警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45419468/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com