UWP Windows-10无法添加Microsoft.NETCore.UniversalWindowsPlatform到我的C#应用​​程序

问题描述:

我有一个针对Windows UWP的C#应用​​程序。几个月前,这一切都很好。当我今天打开它时,找不到这个参考:Microsoft.NETCore.UniversalWindowsPlatform。我也无法安装此参考。这里是我的项目的细节&我按照步骤:

我的VS细节:UWP Windows-10无法添加Microsoft.NETCore.UniversalWindowsPlatform到我的C#应用​​程序

MS VS Professional 2015 
    Version 14.0.25123.00 Update 2 
    Microsoft .NET Framework 
    Version 4.6.01038 


当我尝试安装此引用:Referencs(右键) - >管理的NuGet包,&然后通过选择Microsoft.NETCore.UniversalWindowsPlatform,我得到这个错误:

Could not install package 'Microsoft.NETCore.Platforms 1.0.0'. You are trying to install this package into a project that targets '.NETCore,Version=v5.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.


我有已安装Visual Studio 2015版本3.4.3.855的NuGet Package Manager。

根据这里提供的建议Github MS UWP samples page我删除了project.json从我的项目,但似乎没有帮助我。不幸的是,我没有看到project.lock.json文件在我的项目中

+0

你可以分享你当前的csproj和项目。 json内容? –

+0

Hi @HarikrishnaMenonA,谢谢你的回应。我不知道如何在堆栈溢出时共享这些文件。请让我知道任何替代方式来做到这一点。 –

我有类似的例外复制解决方案文件夹后,其他机器。 在project.lock.json在现场“packageFolders”和“项目”里演的警戒机的设置,我已经改变了他们,并解决我的问题