Skip to content

Can an ASP.NET Core app run against the .NET Framework runtime? #7617

@GoFightNguyen

Description

@GoFightNguyen

There are many enjoyable things about developing an ASP.NET Core application, this includes, but is not limited to:

  • SPA support
  • ease of testing
  • separation of concerns
  • middleware configuration
  • dependency inversion/injection
  • tooling

It feels like modern web app development.

I am creating a web application that will include an Angular SPA and Web API. Unfortunately, my organization will not allow ASP.NET Core deployments for the foreseeable future; all software must run against the .NET Framework runtime.

What can I do now to satisfy the organizational requirement of the .NET Framework runtime, while still having a great development experience and using the first-class constructs of ASP.NET Core?

Through some research, I came across two items that might help:

  1. the Microsoft.AspNetCore.App and Microsoft.AspNetCore.All metapackages actually encapsulate netstandard packages such as Microsoft.AspNetCore.
  2. The csproj can be edited to target net471

Here is what I am considering.

  1. In the csproj, replace the netcore target with net471
  2. Remove the dependency upon Microsoft.AspNetCore.App
  3. Add dependencies to the netstandard versions of the packages needed such as Microsoft.AspNetCore
  4. Host in IIS with an Application Pool configured with a .NET CLR Version belonging to .NET Framework instead of No Managed Code

Do you see any issues or have any concerns? Even if this is possible, is this something I should do?

Here are some questions I had, please answer if you can.

  1. Will the app execute in the .NET Framework runtime?
  2. Will this require the .NET Hosting Bundle?
  3. Will it require .NET Core to be installed on the IIS server?
  4. As a deployed app, will there be anything ".NET Core" about it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions