I was trying to create new packages for a Store application and got this error. I was updating my Nest Thermostat application and adding the new Navigation View component. Which is a great new XAML component.

The docs for the navigationview xaml control are great. But during the creation of the new store package I got this dummymodulereference error… Here is my attempt to fix it:

image

  1. cleared all nuget caches
  2. removed the .vs hidden folder in my solution folder
  3. removed in each project folder the bin and obj folder
  4. removed the project.lock
  5. Had to open my solution file in notepad++ to see that I had a project in my solution in an other (parent) dir. So had to remove bin and obj and project.lock there too.
  6. right click on solution in the solution explorer and restore nuget packages
  7. build –> rebuild solution

But unfortunately..  I Googled with Bing and found people having similar issues: https://developercommunity.visualstudio.com/content/problem/133644/internal-compiler-error-5.html

and https://developercommunity.visualstudio.com/content/problem/137629/error-on-build-for-store.html


I even removed the symbol cache (tools –> options –> debugging –> symbols –> empty symbol cache)

Also skipped the nuget restore, because creating store packages will auto restore nuget packages.


I found out that the issue was in a global nuget package:

image

So I added a reference in my store app project to the same nuget but a newer version. Not 1.7.1 but 2.0.0

That did not help, so I added the microsoft.net.native.compiler package to all my referenced projects.

Also no fix. Last resort: tweet to @VisualStudio because it is already listed in the vs feedback.




Please let me know if you have a solution.

Pin on pinterest Plus on Googleplus Post on LinkedIn
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

As you might have noticed, there is no Paste as XML option under Edit –> Paste Special in the menu when you are working on .net Core applications.

The reason is actually very simple. The current project type has no build in serialization support for XML.

I only realized it after reading this post from codecalculated.com. But it has been mentioned in the Asp.Net Standup before. 

However, I have a workaround available for those who have Visual Studio Code installed. You should have it on your machine! It is so fast, responsive and lightweight (and free).

Fire up Visual Studio Code and hit Ctrl+P and type: ext install smartpaste

snip_20161130105646

if you have it installed and reloaded Visual Studio Code you can invoke it with: Cltr + Shift + P and type: smart paste.

Select “Paste XML as JSON” (since xml to classes is not finished yet)

Copy the JSON output and switch to Visual Studio 2017 RC.

snip_20161130105859

You can now paste your JSON as Classes Smile

 

Good luck!

Pin on pinterest Plus on Googleplus Post on LinkedIn
0 Comments

This is my solution explorer:

solution-explorer

and this is my nuget package manager:

nuget

So The XmlSerializer is installed. Somehow the Newtonsoft.Json gives a yellow icon in the solution explorer. But no errors from that lib in the output window.

I thought that the nuget packagemanager or visual studio would auto restore all packages for me. Somehow it was fixed by manually running dotnet restore from the cli.

The whole tooling for .net core is still work in progress and I really liked working with preview 2 (1.0.1) in vs code with the project.json files.

Switching back to the csproj file makes it imho harder to work with vs code and makes using Visual Studio 2017 (community) almost required.

I really enjoyed working through the jonhilton tutorial for dotnet core.

But that does not work anymore, because 1.1 is out and project.json is gone.

I have used dotnet migrate to move from project.json to projectname.csproj and it returned zero errors/issues. But did not launch. No project was found according to msbuild. And after changing task.json it gave a lot of reference issues. So I started over in Visual Studio 2017 RC and have a lot more setup by default and less issues.

I see that the whole development of dotnet core is moving forward fast. But I really enjoyed the development experience with vs code and the jonhilton tutorial. I hope that it will come back, or that someone will make a similar tutorial for vs code with dotnet 1.1 and mvc (and kestrel, because vs2017 has iis express as default webserver)

Looking forward to all the new bits and pieces and will keep updating vs code (insider) and dotnet core.

I hope the suggestion of the manual dotnet restore helped someone.

 

good luck!

Pin on pinterest Plus on Googleplus Post on LinkedIn