Install the .NET Core MVC application in Visual Studio 2017 to use full IIS (not IIS Express)

In Visual Studio 2015, you can easily install the MVC application to use full IIS by right-clicking on the project and going to properties.

It is not clear how to do this in the Vanilla.NET Core Web (MVC) project in Visual Studio 2017.

I can’t find anything about it on Google - am I looking in the wrong place?

+4
source share
1 answer

You can post it for iis.

There are four things you need to do, except that iis is installed in disconnected mode:

, iis.

https://docs.microsoft.com/en-us/aspnet/core/publishing/iis

visual studio 2017.

Update: FlubuCore ( #), 3 4 . flubu script, ( 4):

protected override void ConfigureTargets(ITaskContext session)
{
    session.CreateTarget("iis.install").Do(IisInstall);
}

private static void IisInstall(ITaskContext context)
{
    context.Tasks().IisTasks()
        .CreateAppPoolTask("SomeAppPoolName")
        .ManagedRuntimeVersion("No Managed Code")
        .Mode(CreateApplicationPoolMode.DoNothingIfExists)
        .Execute(context);

    context.Tasks().IisTasks()
        .CreateWebsiteTask()
        .WebsiteName("SomeWebSiteName")
        .BindingProtocol("Http")
        .Port(2000)
        .PhysicalPath("SomePhysicalPath")
        .ApplicationPoolName("SomeAppPoolName")
        .WebsiteMode(CreateWebApplicationMode.DoNothingIfExists)
        .Execute(context);
}

, visual studio 2017, script flubu dotnet cli tool prebuild postbuild "dotnet flubu iis.install". .

flubu : : MSBuild, NANT - ?

+4

Source: https://habr.com/ru/post/1671740/


All Articles