Set web.config transform in Asp.NET Core

后端 未结 8 1603
遥遥无期
遥遥无期 2021-01-04 10:54

I\'ve just came across with problem of web.config transformation in asp.net core.

There are two files: base web.config and web.prod-zone-a.config. My aim is to use t

8条回答
  •  走了就别回头了
    2021-01-04 11:37

    This is now supported by dotnet publish from SDK version 2.2 with a whole bunch of options.

    https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/transform-webconfig?view=aspnetcore-2.2

    I think in the example from the question, it would then work when published as

    dotnet publish --configuration prod-zone-a

提交回复
热议问题