Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

C# C# Streams and Data Processing Serialization Soccer Player Data

Kyaw Tun Sein
Kyaw Tun Sein
2,291 Points

There is no 'paste Json as Classes' in paste special of my visual studio. What to do?

I can only see paste XML as classes.

6 Answers

Kyaw Tun Sein
Kyaw Tun Sein
2,291 Points

Solved! Just need to install Microsoft Web Development Tools.

evanpavan
evanpavan
5,024 Points

For anyone using an editor other than visual studio there's a free application that parses JSON into 'types'.

I used this to paste the types into VS code.

https://app.quicktype.io/

Kevin Gates
Kevin Gates
14,854 Points

Make sure you're attempting to paste from the Edit menu. If you just right-click what you've highlighted, you will not get the "Paste Special" option. You must go to Top Menu -> Edit -> Paste-Special -> Paste JSON as Classes.

The above is at least true for Visual Studio 2017 Developer Edition. (She's using Community edition, so it should work there too.)

I am doing what you say here, but there just is no Paste Special option listed under edit. All I see is Paste and Cycle Clipboard Ring (whatever that means). Also if you have to have Microsoft Web Development Tools installed, how do you do that?

Kevin Gates
Kevin Gates
14,854 Points

Emma Wyman : try going to Tools -> Get Tools and Features, and make sure you have libraries added for web development. Not 100% sure if it's there, but I would look there first.

Kyaw Tun Sein , Kevin Gates, and Emma Wyman, do you know if Microsoft Web Development Tools. is Workload or an Individual Component on the installation wizard? I'm having trouble finding it.

Is this for mac or windows? I'm in Community Edition. I've uninstalling and reinstalling nothing works. Where are these mythical Development Tools for mac? I can't find anything from 2019 with an actual solution to this problem! Are there step by step instructions...FOR MAC?

If you use Visual Studio and don't have the paste special option: Go to modify in the Visual Studio Installer and then under Workloads>Web & Cloud select "ASP.NET and web development"

I am using the mac edition of visual studio and there is no paste special. Anyone knows??

Did you ever find a solution?

Thomas Swatland
Thomas Swatland
13,530 Points

I'm having the same issue as Erdem. Any ideas?

Kevin Gates
Kevin Gates
14,854 Points

Thomas Swatland : did you see my answer above?