Quantcast
Channel: JPHellemons
Viewing all articles
Browse latest Browse all 132

Paste XML as Classes in Visual Studio 2017 Fix/workaround

$
0
0

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!


Viewing all articles
Browse latest Browse all 132

Trending Articles