GFlisch / Arc4u.Guidance.Doc

Other
5 stars 1 forks source link

(bug, Guidance 2022.2.1.11) Renaming "localhost" to "developmement" is not reflected in NSwag generation #130

Closed vvdb-architecture closed 1 year ago

vvdb-architecture commented 1 year ago

Recent versions of the Guidance adopted the standard 'development' environment setting for ASPNETCORE_ENVIRONMENT instead of localhost.

This was not adopted in the *.host.csproj settings for invoking NSwag for facades: the variable still contains localhost. It also is missing the ;NSwag=true setting as well:

    <Target Name="NSwagFacade" AfterTargets="PostBuildEvent" Condition=" '$(Configuration)' == 'Debug' ">
        <Exec WorkingDirectory="$(ProjectDir)" EnvironmentVariables="ASPNETCORE_ENVIRONMENT=Localhost" Command="$(NSwagExe_Net60) run ..\Sdks\Solution1.Yarp.Facade.Sdk\Generator\facade.nswag  /variables:Configuration=$(Configuration)" />
    </Target>

Strangely enough, for interface projects, this is correctly generated:

  <Target Name="NSwagInterface" AfterTargets="PostBuildEvent" Condition=" '$(Configuration)' == 'Debug' ">
    <Exec WorkingDirectory="$(ProjectDir)" EnvironmentVariables="ASPNETCORE_ENVIRONMENT=Development;NSwag=true" Command="$(NSwagExe_Net60) run ..\Sdks\Solution1.Service.Interface.Sdk\Generator\interface.nswag  /variables:Configuration=$(Configuration)" />
  </Target>
GFlisch commented 1 year ago

Fixed and will be released in the version 2022.2.1.12.