Visual Studio 2015 - C# Windows Universal App missing assembly reference

前端 未结 3 2022
温柔的废话
温柔的废话 2021-02-15 01:53

Today I cloned my windows universal app project from github onto a new machine running a new install of Visual Studio 2015.

After the project loaded, I noticed that all

相关标签:
3条回答
  • 2021-02-15 02:35

    I had similar problem. universal project I create my self had reference there. Some of the samples for windows iot sites didn't have reference when downloaded. NUGET said it was already installed. for me the solution was to build the solution and it repaired itself.

    0 讨论(0)
  • 2021-02-15 02:52

    Looking in the References of the project in the Solution Explorer it can be seen that even though Microsoft.NETCore.UniversalWindowsPlatformis listed as a dependency, it's missing from the project and this is causing the issue.

    Visual studio knows that the assembly is a dependency and needs to be referenced but it doesn't seem to come preinstalled with Visual Studio 2015, even when you install all of the Windows 10 development tools during setup, and it doesn't seem to autofetch the package even when it knows it needs it!

    To fix, you need to manually install the package using NuGet and it will then be resolved correctly as a reference.

    To do this, right click on References, then click Manage NuGet Packages....

    On the NuGet Package Manager screen, search for Microsoft.NETCore.UniversalWindowsPlatform and it will be an exact match.

    Click on Install in the details pane on the right hand side and Visual Studio will fetch the package and include it as a reference in your project

    The red underlining will then all disappear and you can continue working on your project!

    0 讨论(0)
  • 2021-02-15 02:53

    what worked for me was Tools -> nuget package Manager -> manage nuget packages for solution and update the packages for the solution it adds a lot of stuff and then updates your solution hope it works for you

    0 讨论(0)
提交回复
热议问题