Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/powerbi/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.net 如何在通用Windows平台应用程序中更新特定的点网程序集?_.net_Nuget_Windows 10_Uwp_.net Core - Fatal编程技术网

.net 如何在通用Windows平台应用程序中更新特定的点网程序集?

.net 如何在通用Windows平台应用程序中更新特定的点网程序集?,.net,nuget,windows-10,uwp,.net-core,.net,Nuget,Windows 10,Uwp,.net Core,我读到dotnet是开源的,通过nuget而不是monolith安装程序的粒度包分发 我创建了一个简单的UWP应用程序,我在project.json中看到的是 { "dependencies": { "Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0" }, "frameworks": { "uap10.0": {} }, "runtimes": { "win10-arm": {}, "wi

我读到dotnet是开源的,通过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": {}
  }
}
当我试图通过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).
我觉得我应该以某种方式打开Microsoft.NETCore.UniversalWindowsPlatform的


有什么方法可以轻松地更新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"
}
您只会在堆栈最底层的包中遇到这种行为,特别是

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

UWP的未来版本不会有同样的问题。我们发现,使用NuGet强制执行私有依赖关系是脆弱的,并且会产生令人困惑的错误。

我认为您可以在依赖项下添加一个条目,以引用所需的System.Collection版本。把它放在.NetCore条目下