0 Comments

I started my IoT (Internet of Things) journey a bit later then some. I waited for a suitable small project to come along and some free time. The creators update (Windows 15063) has just been released and apparently also the IoT version of the creators update.

I already had the Visual Studio RTM version of 2017 on my machine. I have worked with several release candidates of the 2017 version, but updated as soon as possible to the RTM update. The SDK and everything else was already setup and ready to go.

snip_20170410110914

When I started with file –> new project and selected the background application I got this error:

snip_20170406161443

“Could not add all required packages to the project.” That’s odd because this is just a file new project…

The package causing this is: “Microsoft.NETCore.UniversalWindowsPlatform.5.0.0” Unable to find version 5.0.0 of package Microsoft.NETCore.UniversalWindowsPlatform

When I manually ran the install-package command in the package console I got more info. The Jit package was also failing to install (dependency)

snip_20170406162235

I did not see how to fix it, so I turned to stack overflow. Rita Han from Microsoft reached out and confirmed that the solution workaround given by Wind Rider was the solution to my issue.

My solution explorer looked like this after the file new project and the popup with the error:

snip_20170407120531

The project.json had a yellow exclamation mark and checking it with explorer, it was not available on disk. So there is no file… that’s odd.

The workaround from SO was to manually create a project.json with this content:

{
  "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": {}
  }
}

and then manually edit the .csproj file.

navigate the the “ItemGroup” of project.json and add below the </itemgroup>

  <ItemGroup>
    <SDKReference Include="WindowsIoT, Version=10.0.15063.0">
      <Name>Windows IoT Extension SDK</Name>
    </SDKReference>
  </ItemGroup>

This will cause visual studio to reload things. Installing the Microsoft.NETCore.UniversalWindowsPlatform package now works Smile

 

Good luck, hope this reference helped!

Pin on pinterest Plus on Googleplus Post on LinkedIn
 
Post comment