Skip to content

ASP.NET Core app (TargetFramework .NetFramework) hosted in a Windows Service, with a reference to an .NetStandard project.

Notifications You must be signed in to change notification settings

ygarnicab/dotnetcore-webapp-winservice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AspNetCoreApp

ASP.NET Core app (TargetFramework .NetFramework) hosted in a Windows Service, with a reference to an .NetStandard project.

Installing the service

  1. Publish the wep app to the outpout folder.
  2. To install the service run in the cmd: "AspNetCoreApp.Service --install"
  3. Browse http://localhost:5000 to access to the webapp.
  4. To uninstall the service run in the cmd "AspNetCoreApp.Service --uninstall"

Workarounds .NetFramework refencing .NetStandard project

Make the .NET Framework project a ProjectReference based project by setting the following property in the project in the csproj:

<RestoreProjectStyle> PackageReference </RestoreProjectStyle>

There is also a good change you will need auto-bindingredirects as well so make sure that is set in your project:

<AutoGenerateBindingRedirects> true </AutoGenerateBindingRedirects>

References:

About

ASP.NET Core app (TargetFramework .NetFramework) hosted in a Windows Service, with a reference to an .NetStandard project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published