Skip to content

Adafy/Candy.MSBuild

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

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

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •