Skip to content

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Candy.MSBuild

MSBuild tools for projects based on the Candy Framework

How to use

Replace the current NSwag.MSBuild with Candy.MSBuild. For example:

Old:

  <ItemGroup>
    <PackageReference Include="NSwag.MSBuild" Version="13.18.0">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
    </PackageReference>
  </ItemGroup>

New:

  <ItemGroup>
    <PackageReference Include="Candy.MSBuild" Version="1.2.1">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
    </PackageReference>
  </ItemGroup>

Then replace the "Exec" part from the PostBuildEvent:

Old:

  <Target Name="NSwag" AfterTargets="PostBuildEvent" Condition="'$(Configuration)' == 'Debug' AND '$(TargetFramework)' == 'net6.0' ">
    <Copy SourceFiles="@(Reference)" DestinationFolder="$(OutDir)References" />
    <Exec Command="$(NSwagExe_Net70) run nswag.json /variables:Configuration=$(Configuration)" />
    <RemoveDir Directories="$(OutDir)References" />
  </Target>

New:

  <Target Name="NSwag" AfterTargets="PostBuildEvent" Condition="'$(Configuration)' == 'Debug' AND '$(TargetFramework)' == 'net8.0' ">
    <Copy SourceFiles="@(Reference)" DestinationFolder="$(OutDir)References" />
    <Exec Command="$(Candy) nswag.json" />
    <RemoveDir Directories="$(OutDir)References" />
  </Target>

About

MSBuild tools for projects based on the Candy Framework

Resources

Stars

1 star

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages