【发布时间】:2018-06-26 14:37:18
【问题描述】:
我正在尝试在 TFS 中为 WPF 项目实现自动构建。 自动构建效果很好,但我无法为项目准备 nuget 包。
这是我在 TFS 中的构建过程:
如果我删除 NuGet 包和 NuGet 推送,它可以毫无问题地工作。
这是我通过 TFS 收到的消息:
Found packages.config. Using packages listed as dependencies
NuGet.CommandLine.CommandLineException: Unable to find 'Extended.Wpf.Toolkit.3.3.0.nupkg'. Make sure the project has been built.
at NuGet.CommandLine.ProjectFactory.AddDependencies(Dictionary`2 packagesAndDependencies)
at NuGet.CommandLine.ProjectFactory.ProcessDependencies(PackageBuilder builder)
at NuGet.CommandLine.ProjectFactory.CreateBuilder(String basePath, NuGetVersion version, String suffix, Boolean buildIfNeeded, PackageBuilder builder)
at NuGet.Commands.PackCommandRunner.BuildFromProjectFile(String path)
at NuGet.CommandLine.PackCommand.ExecuteCommand()
at NuGet.CommandLine.Command.ExecuteCommandAsync()
at NuGet.CommandLine.Command.Execute()
at NuGet.CommandLine.Program.MainCore(String workingDirectory, String[] args)
Unable to find 'Extended.Wpf.Toolkit.3.3.0.nupkg'. Make sure the project has been built.
##[error]The nuget command failed with exit code(1) and error(Unable to find 'Extended.Wpf.Toolkit.3.3.0.nupkg'. Make sure the project has been built.)
在日志中,它说它没有找到“Extended.Wpf.Toolkit.3.3.0.nupkg”。我在构建之前确实使用了 NuGet Restore,并且构建是正确的。在 TFS 的日志中,我可以看到它使用 'Extended.Wpf.Toolkit.3.3.0'
我已经尝试在 NuGet 用于打包的命令上添加 -Prop Platform=AnyCPU,但它没有改变任何东西。我在我的电脑上运行了这个命令,它成功了。
以下是我在寻找修复程序时已经检查过的页面:
- https://developercommunity.visualstudio.com/content/problem/245349/the-nuget-command-failed-with-exit-code1-and-error.html
- NuGet pack for TFS Continuous Integration
- NuGet pack fails with "Unable to find '@(_OutputPathItem->'%(FullPath)..."
- VisualStudio Online and pack Nuget packages
- http://timjames.me/blog/2015/07/29/nuget-pack-fails-with-exited-with-code-1/
- https://www.benday.com/2017/05/03/walkthrough-publish-to-private-nuget-server-from-tfs2017-build/
【问题讨论】:
标签: tfs nuget azure-devops nuget-package