Reputation: 2135
I'm trying to use a simple Default.aspx WebForm generated from a simple ASP.NET application which uses WebForms. What I did is that I just copy and paste the entire Default.aspx and Default.aspx.cs.
When I tried to build the application, it fails. I'm not sure what's wrong.
I'm curious about the DNX Core 5.0 which says the class it's not available there. What should I do? Anyways, here's my VS info:
Upvotes: 0
Views: 936
Reputation: 2135
Okay, got the problem right here. It's the project.json definition.
It seems I'm targeting multiple frameworks, just as Guruprasad said. Since I'm using WebForms, then I should use the full CLR instead of CoreCLR. Removing the "dnxcore50" did the trick.
Upvotes: 2
Reputation: 29683
Check your solution! If your solution has multiple projects then try setting the Target Framework
of all the projects to be the same and clean and rebuild.
Upvotes: 1