Azure Pipelines 构建错误 nuget 命令失败,退出代码 (1) 和错误(错误 NU5012:无法找到...确保项目已构建
Azure Pipelines build error nuget command failed with exit code(1) and error(Error NU5012: Unable to find... Make sure the project has been built
我一直在努力使用 Azure 管道将一些 nuget 包构建到工件提要中,但我无法通过我为管道设置的“Nuget Pack”作业。尝试查找 NCrunch.Framework.dll 时失败。其他 .ddl 已根据作业日志打包好,但有关 NCrunch 和 azure 的内容不一致,我找不到任何相关资源。我已经打开项目并构建它,打包作业之前的“vs build”作业成功运行。我不确定其他几行是否与此问题相关:
WARNING: NU5128: Some target frameworks declared in the dependencies group of the nuspec and the lib/ref folder do not have exact matches in the other location. Consult the list of actions below:
Add a dependency group for .NETFramework4.8 to the nuspec
Successfully created package 'D:\a\a\ourbox.nupkg'.
Attempting to pack file: D:\a\s\repo\packages\NCrunch.Framework.3.3.0.6\NCrunch.Framework.csproj
C:\hostedtoolcache\windows\NuGet.8.1\x64\nuget.exe pack D:\a\s\repo\packages\NCrunch.Framework.3.3.0.6\NCrunch.Framework.csproj -NonInteractive -OutputDirectory D:\a\a -Properties Configuration=release;Platform=AnyCpu;version=1.0; -Verbosity Detailed
Error NU5012: Unable to find 'D:\a\s\repo\packages\ClientBinaries\Release\NCrunch.Framework.dll'. Make sure the project has been built.
尽量使用最新的nuget版本。
此错误是因为解决方案使用“Platform=Any CPU”构建,但项目使用“Platform=AnyCPU”构建。
您可以尝试删除平台值中的 space,它应该可以工作。
我一直在努力使用 Azure 管道将一些 nuget 包构建到工件提要中,但我无法通过我为管道设置的“Nuget Pack”作业。尝试查找 NCrunch.Framework.dll 时失败。其他 .ddl 已根据作业日志打包好,但有关 NCrunch 和 azure 的内容不一致,我找不到任何相关资源。我已经打开项目并构建它,打包作业之前的“vs build”作业成功运行。我不确定其他几行是否与此问题相关:
WARNING: NU5128: Some target frameworks declared in the dependencies group of the nuspec and the lib/ref folder do not have exact matches in the other location. Consult the list of actions below:
Add a dependency group for .NETFramework4.8 to the nuspec
Successfully created package 'D:\a\a\ourbox.nupkg'.
Attempting to pack file: D:\a\s\repo\packages\NCrunch.Framework.3.3.0.6\NCrunch.Framework.csproj
C:\hostedtoolcache\windows\NuGet.8.1\x64\nuget.exe pack D:\a\s\repo\packages\NCrunch.Framework.3.3.0.6\NCrunch.Framework.csproj -NonInteractive -OutputDirectory D:\a\a -Properties Configuration=release;Platform=AnyCpu;version=1.0; -Verbosity Detailed
Error NU5012: Unable to find 'D:\a\s\repo\packages\ClientBinaries\Release\NCrunch.Framework.dll'. Make sure the project has been built.
尽量使用最新的nuget版本。
此错误是因为解决方案使用“Platform=Any CPU”构建,但项目使用“Platform=AnyCPU”构建。
您可以尝试删除平台值中的 space,它应该可以工作。