Gri*_*ory 3 .net nuget windows-10 .net-core uwp
我读到dotnet是OpenSource,并通过nuget而不是monolith安装程序通过粒度包分发.
我创建了一个简单的UWP应用程序,我在project.json中看到的是
{
"dependencies": {
"Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0"
},
"frameworks": {
"uap10.0": {}
},
"runtimes": {
"win10-arm": {},
"win10-arm-aot": {},
"win10-x86": {},
"win10-x86-aot": {},
"win10-x64": {},
"win10-x64-aot": {}
}
}
Run Code Online (Sandbox Code Playgroud)
当我尝试通过nuget安装预发布System.Collections我得到以下
Version conflict detected for System.Private.Uri.
SM.W10 (? 1.0.0) -> System.Collections (? 4.0.11-beta-23516) -> System.Runtime (? 4.0.21-beta-23516) -> System.Private.Uri (? 4.0.1-beta-23516)
SM.W10 (? 1.0.0) -> Microsoft.NETCore.UniversalWindowsPlatform (? 5.0.0) -> Microsoft.NETCore.Runtime (? 1.0.0) -> Microsoft.NETCore.Runtime.CoreCLR-arm (? 1.0.0) -> System.Private.Uri (= 4.0.0).
Run Code Online (Sandbox Code Playgroud)
我觉得我应该以某种方式展开,Microsoft.NETCore.UniversalWindowsPlatform但它有很多级别的嵌套,只有深度嵌套Microsoft.NETCore.Runtime.CoreCLR-arm有严格版本的System.Private.Url
有没有办法更新System.Collections没有痛苦?
对于它的第一个版本的应用程序UWP寄托,因为像包之间的一些私人依赖的所有核心包System.Runtime或System.Collections与.NETNative工具链.因此,为了测试任何最低级别合同的新版本,您还需要更新运行时包.
例如.
"dependencies": {
"Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0"
"Microsoft.NETCore.Runtime": "1.0.1-beta-23516",
"System.Collections" : "4.0.11-beta-23516"
}
Run Code Online (Sandbox Code Playgroud)
特别是,对于堆栈最底部的包,您只会遇到此行为
System.Collections,
System.Diagnostics.Contracts,
System.Diagnostics.Debug,
System.Diagnostics.StackTrace,
System.Diagnostics.Tools,
System.Diagnostics.Tracing,
System.Globalization,
System.Globalization.Calendars,
System.IO,
System.ObjectModel,
System.Reflection,
System.Reflection.Extensions,
System.Reflection.Primitives,
System.Resources.ResourceManager,
System.Runtime,
System.Runtime.Extensions,
System.Runtime.Handles,
System.Runtime.InteropServices,
System.Text.Encoding,
System.Text.Encoding.Extensions,
System.Threading,
System.Threading.Tasks,
System.Threading.Timer
Run Code Online (Sandbox Code Playgroud)
未来的UWP版本不会出现同样的问题.我们发现使用NuGet尝试强制执行私有依赖项是脆弱的,并产生令人困惑的错误.
| 归档时间: |
|
| 查看次数: |
590 次 |
| 最近记录: |