英文:
NuGet restore fore solution to get wix getting failed in Azure Devops
问题
在运行wpf UI tests
时,在Azure DevOps中出现以下错误,任务'NuGet restore fore solution to get wix'失败了。请问如何解决这些错误?
已安装:
1 个包(s) 到 packages.config 项目中
##[error]NuGet 命令以退出代码(1) 和错误(在 c:\agent_work\9\s\tests\MediaApp.Wpf.UiTests\MediaApp.Wpf.UiTests.csproj 中的错误
Package Appium.WebDriver 3.0.0.2 与 netcoreapp3.0 (.NETCoreApp,Version=v3.0) 不兼容。Package Appium.WebDriver 3.0.0.2 支持: net45 (.NETFramework,Version=v4.5)
Package Selenium.WebDriver 3.0.1 与 netcoreapp3.0 (.NETCoreApp,Version=v3.0) 不兼容。Package Selenium.WebDriver 3.0.1 支持:
- net35 (.NETFramework,Version=v3.5)
- net40 (.NETFramework,Version=v4.0)
Package Selenium.Support 3.0.1 与 netcoreapp3.0 (.NETCoreApp,Version=v3.0) 不兼容。Package Selenium.Support 3.0.1 支持: - net35 (.NETFramework,Version=v3.5)
- net40 (.NETFramework,Version=v4.0)
Package Castle.Core 3.3.3 与 netcoreapp3.0 (.NETCoreApp,Version=v3.0) 不兼容。Package Castle.Core 3.3.3 支持: - net35 (.NETFramework,Version=v3.5)
- net40-client (.NETFramework,Version=v4.0,Profile=Client)
- net45 (.NETFramework,Version=v4.5)
- sl4 (Silverlight,Version=v4.0)
- sl5 (Silverlight,Version=v5.0)
Package Microsoft.Extensions.FileSystemGlobbing 3.0.0 与 netcoreapp3.0 (.NETCoreApp,Version=v3.0) 不兼容。Package Microsoft.Extensions.FileSystemGlobbing 3.0.0 支持: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Win32.SystemEvents 4.6.0-preview8.19405.3 与 netcoreapp3.0 (.NETCoreApp,Version=v3.0) 不兼容。Package Microsoft.Win32.SystemEvents 4.6.0-preview8.19405.3 支持: - net461 (.NETFramework,Version=v4.6.1)
- net472 (.NETFramework,Version=v4.7.2)
- netstandard2.0 (.NETStandard,Version=v2.0)
一个或多个包与 .NETCoreApp,Version=v3.0 不兼容。
在 c:\agent_work\9\s\src\MediaApp.Wpf\MediaApp.Wpf.csproj 中的错误
Package AutoMapper 8.1.0 与 netcoreapp3.0 (.NETCoreApp,Version=v3.0) 不兼容。Package AutoMapper 8.1.0 支持:
- net461 (.NETFramework,Version=v4.6.1)
- netstandard2.0 (.NETStandard,Version=v2.0)
Package Serilog.Settings.Configuration 3.0.1 与 netcoreapp3.0 (.NETCoreApp,Version=v3.0) 不兼容。Package Serilog.Settings.Configuration 3.0.1 支持: - net451 (.NETFramework,Version=v4.5.1)
- net461 (.NETFramework,Version=v4.6.1)
- netstandard2.0 (.NETStandard,Version=v2.0)
Package System.Windows.Interactivity.WPF 2.0.20525 与 netcoreapp3.0 (.NETCoreApp,Version=v3.0) 不兼容。Package System.Windows.Interactivity.WPF 2.0.20525 支持: net40 (.NETFramework,Version=v4.0)
Package Microsoft.Extensions.Configuration 2.2.0 与 netcoreapp3.0 (.NETCoreApp,Version=v3.0) 不兼容。Package Microsoft.Extensions.Configuration 2.2.0 支持: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Extensions.Configuration.Json 2.2.0 与 netcoreapp3.0 (.NETCoreApp,Version=v3.0) 不兼容。Package Microsoft.Extensions.Configuration.Json 2.2.0 支持: netstandard2.0 (.NETStandard,Version=v2.0)
Package System.Diagnostics.PerformanceCounter 4.5.0 与 netcoreapp3.0 (.NETCoreApp,Version=v3.0) 不兼容。Package System.Diagnostics.PerformanceCounter 4.5.0 支持: - monoandroid10 (MonoAndroid,Version=v1.0)
- monotouch10 (MonoTouch,Version=v1.0)
- net461 (.NETFramework,Version=v4.6.1)
- netstandard2.0 (.NETStandard,Version=v2.0)
- xamarinios10 (Xamarin.iOS,Version=v1.0)
- xamarinmac20 (Xamarin.Mac,Version=v2.0)
- xamarintvos10 (Xamarin.TVOS,Version=v1.0)
- xamarinwatchos10 (Xamarin.WatchOS,Version=v1.0)
Package System.Drawing.Common 4.5.1 与 netcoreapp3.0 (.NETCoreApp,Version=v3.0) 不兼容。Package System.Drawing.Common 4.5.1 支持: - monoandroid10 (MonoAndroid,Version=v1.0)
- monotouch10 (MonoTouch,Version=v1.0)
- net461 (.NETFramework,Version=v4.6.1)
- netstandard2.0 (.NETStandard,Version=v2.0)
- xamarinios10 (Xamarin.iOS,Version=v1.0)
- xamarinmac20 (Xamarin.Mac,Version=v2.0)
- xamarintvos10 (Xamarin.TVOS,Version=v1.0)
- xamarinwatchos10 (Xamarin.WatchOS,Version=v1.0)
Package System.Management 4.5.0 与 netcoreapp3.0 (.NETCoreApp,Version=v3.0) 不兼容。Package System.Management 4.5.0 支持: - net45 (.NETFramework,Version=v4.5)
- netstandard2.0 (.NETStandard,Version=v2.0)
Package System.Configuration.ConfigurationManager 4.5.0 与 netcoreapp3.0 (.NETCoreApp,Version=v3.0) 不兼容。Package System.Configuration.ConfigurationManager 4.5.0 支持: - net461 (.NETFramework,Version=v4.
英文:
While running the wpf UI tests
the following task 'NuGet restore fore solution to get wix' getting failed in Azure Devops with below errors. Could someone please advise on how to resolve the errors ?
Installed:
1 package(s) to packages.config projects
##[error]The nuget command failed with exit code(1) and error(Errors in c:\agent\_work\s\tests\MediaApp.Wpf.UiTests\MediaApp.Wpf.UiTests.csproj
Package Appium.WebDriver 3.0.0.2 is not compatible with netcoreapp3.0 (.NETCoreApp,Version=v3.0). Package Appium.WebDriver 3.0.0.2 supports: net45 (.NETFramework,Version=v4.5)
Package Selenium.WebDriver 3.0.1 is not compatible with netcoreapp3.0 (.NETCoreApp,Version=v3.0). Package Selenium.WebDriver 3.0.1 supports:
- net35 (.NETFramework,Version=v3.5)
- net40 (.NETFramework,Version=v4.0)
Package Selenium.Support 3.0.1 is not compatible with netcoreapp3.0 (.NETCoreApp,Version=v3.0). Package Selenium.Support 3.0.1 supports:
- net35 (.NETFramework,Version=v3.5)
- net40 (.NETFramework,Version=v4.0)
Package Castle.Core 3.3.3 is not compatible with netcoreapp3.0 (.NETCoreApp,Version=v3.0). Package Castle.Core 3.3.3 supports:
- net35 (.NETFramework,Version=v3.5)
- net40-client (.NETFramework,Version=v4.0,Profile=Client)
- net45 (.NETFramework,Version=v4.5)
- sl4 (Silverlight,Version=v4.0)
- sl5 (Silverlight,Version=v5.0)
Package Microsoft.Extensions.FileSystemGlobbing 3.0.0 is not compatible with netcoreapp3.0 (.NETCoreApp,Version=v3.0). Package Microsoft.Extensions.FileSystemGlobbing 3.0.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Win32.SystemEvents 4.6.0-preview8.19405.3 is not compatible with netcoreapp3.0 (.NETCoreApp,Version=v3.0). Package Microsoft.Win32.SystemEvents 4.6.0-preview8.19405.3 supports:
- net461 (.NETFramework,Version=v4.6.1)
- net472 (.NETFramework,Version=v4.7.2)
- netstandard2.0 (.NETStandard,Version=v2.0)
One or more packages are incompatible with .NETCoreApp,Version=v3.0.
Errors in c:\agent\_work\s\src\MediaApp.Wpf\MediaApp.Wpf.csproj
Package AutoMapper 8.1.0 is not compatible with netcoreapp3.0 (.NETCoreApp,Version=v3.0). Package AutoMapper 8.1.0 supports:
- net461 (.NETFramework,Version=v4.6.1)
- netstandard2.0 (.NETStandard,Version=v2.0)
Package Serilog.Settings.Configuration 3.0.1 is not compatible with netcoreapp3.0 (.NETCoreApp,Version=v3.0). Package Serilog.Settings.Configuration 3.0.1 supports:
- net451 (.NETFramework,Version=v4.5.1)
- net461 (.NETFramework,Version=v4.6.1)
- netstandard2.0 (.NETStandard,Version=v2.0)
Package System.Windows.Interactivity.WPF 2.0.20525 is not compatible with netcoreapp3.0 (.NETCoreApp,Version=v3.0). Package System.Windows.Interactivity.WPF 2.0.20525 supports: net40 (.NETFramework,Version=v4.0)
Package Microsoft.Extensions.Configuration 2.2.0 is not compatible with netcoreapp3.0 (.NETCoreApp,Version=v3.0). Package Microsoft.Extensions.Configuration 2.2.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Extensions.Configuration.Json 2.2.0 is not compatible with netcoreapp3.0 (.NETCoreApp,Version=v3.0). Package Microsoft.Extensions.Configuration.Json 2.2.0 supports: netstandard2.0 (.NETStandard,Version=v2.0)
Package System.Diagnostics.PerformanceCounter 4.5.0 is not compatible with netcoreapp3.0 (.NETCoreApp,Version=v3.0). Package System.Diagnostics.PerformanceCounter 4.5.0 supports:
- monoandroid10 (MonoAndroid,Version=v1.0)
- monotouch10 (MonoTouch,Version=v1.0)
- net461 (.NETFramework,Version=v4.6.1)
- netstandard2.0 (.NETStandard,Version=v2.0)
- xamarinios10 (Xamarin.iOS,Version=v1.0)
- xamarinmac20 (Xamarin.Mac,Version=v2.0)
- xamarintvos10 (Xamarin.TVOS,Version=v1.0)
- xamarinwatchos10 (Xamarin.WatchOS,Version=v1.0)
Package System.Drawing.Common 4.5.1 is not compatible with netcoreapp3.0 (.NETCoreApp,Version=v3.0). Package System.Drawing.Common 4.5.1 supports:
- monoandroid10 (MonoAndroid,Version=v1.0)
- monotouch10 (MonoTouch,Version=v1.0)
- net461 (.NETFramework,Version=v4.6.1)
- netstandard2.0 (.NETStandard,Version=v2.0)
- xamarinios10 (Xamarin.iOS,Version=v1.0)
- xamarinmac20 (Xamarin.Mac,Version=v2.0)
- xamarintvos10 (Xamarin.TVOS,Version=v1.0)
- xamarinwatchos10 (Xamarin.WatchOS,Version=v1.0)
Package System.Management 4.5.0 is not compatible with netcoreapp3.0 (.NETCoreApp,Version=v3.0). Package System.Management 4.5.0 supports:
- net45 (.NETFramework,Version=v4.5)
- netstandard2.0 (.NETStandard,Version=v2.0)
Package System.Configuration.ConfigurationManager 4.5.0 is not compatible with netcoreapp3.0 (.NETCoreApp,Version=v3.0). Package System.Configuration.ConfigurationManager 4.5.0 supports:
- net461 (.NETFramework,Version=v4.6.1)
- netstandard2.0 (.NETStandard,Version=v2.0)
Package Microsoft.Win32.SystemEvents 4.5.0 is not compatible with netcoreapp3.0 (.NETCoreApp,Version=v3.0). Package Microsoft.Win32.SystemEvents 4.5.0 supports:
- net461 (.NETFramework,Version=v4.6.1)
- netstandard2.0 (.NETStandard,Version=v2.0)
Package System.CodeDom 4.5.0 is not compatible with netcoreapp3.0 (.NETCoreApp,Version=v3.0). Package System.CodeDom 4.5.0 supports:
- net461 (.NETFramework,Version=v4.6.1)
- netstandard2.0 (.NETStandard,Version=v2.0)
One or more packages are incompatible with .NETCoreApp,Version=v3.0.
Errors in c:\agent\_work\s\tests\MediaApp.Wpf.Tests\MediaApp.Wpf.Tests.csproj
Package AutoMapper 8.1.0 is not compatible with netcoreapp3.0 (.NETCoreApp,Version=v3.0). Package AutoMapper 8.1.0 supports:
- net461 (.NETFramework,Version=v4.6.1)
- netstandard2.0 (.NETStandard,Version=v2.0)
答案1
得分: 1
包 xxx 与 netcoreapp3.0 不兼容
如果您的解决方案中的所有项目都针对 .net core
,请使用以下方式使用 Use .net core task+dotnet restore
:
如果您的解决方案包含针对 .net core+.net framework
的项目,则可以使用以下方式使用 Use nuget+nuget restore
:
您应该指定要使用的 nuget.exe 版本。Nuget 5.3.1 是在我的管道中运行良好的版本。此外,您可以选择启用始终下载最新匹配版本
框。请参阅类似问题 此处。
当前的 .NET SDK 不支持针对 .NET Core 3.0 的目标。
要么针对 .NET Core 2.1 或更低版本,要么使用支持 .NET Core 3.0 的 .NET SDK 版本。
这表示您应该使用 VS2019+相应的 .net core sdk
代理来运行还原操作。如果您使用的是 microsoft-hosted 代理,请在排队构建管道时使用 window 2019
代理。如果您使用 VS2017-Window2016
代理,您将遇到此问题。
此外,您应该确保已安装相同或更高版本的 .net core sdk。(链接 在此处)。如果您使用私有代理,则可以在排队管道之前手动安装相应的 SDK,或者如果您使用托管代理,则可以使用 Use .net core 3.x task
。
英文:
> Package xxx is not compatible with netcoreapp3.0
If all projects in your solution targets .net core
, please use Use .net core task+dotnet restore
like this:
If your solution contains projects that target .net core+.net framework
, then you can use Use nuget+nuget restore
like this:
You should specify the version of nuget.exe to use. Nuget 5.3.1 is the version that works well in my pipeline. Also, you can choose to enable the Always download the latest matching version
box. See similar issue here.
> The current .NET SDK does not support targeting .NET Core 3.0.
> Either target .NET Core 2.1 or lower, or use a version of the .NET SDK
> that supports .NET Core 3.0.
It indicates you should use the agent with VS2019+corresponding .net core sdk
to run the restore. If you're using microsoft-hosted agent, you should use the window 2019
agent when you queue the build pipeline. You'll meet the issue if you use VS2017-Window2016
agent.
Also you should make sure you've installed same or higher versions of .net core sdk.(link here). You can install corresponding sdk manually before queuing the pipeline if you're using private agent, or use Use .net core 3.x task
if you're using hosted agent.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论