nic
nic

Reputation: 2135

Integrating ASP.NET 5 with WebForms

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.

ASP.NET 5 project

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:

enter image description here

Upvotes: 0

Views: 936

Answers (2)

nic
nic

Reputation: 2135

Okay, got the problem right here. It's the project.json definition.

Project.json

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

Guruprasad J Rao
Guruprasad J Rao

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

Related Questions