79373259

Date: 2025-01-21 05:22:44
Score: 0.5
Natty:
Report link

The JSON files are generated in the path obj\Debug\net8.0\EndpointInfo\*.json. Therefore, I am trying to add a target in the .csproj file to copy these files after the build process.

<Target Name="CopySwaggerJson" AfterTargets="Build">
    <PropertyGroup>
        <EndpointInfoPath>obj\$(Configuration)\$(TargetFramework)\EndpointInfo</EndpointInfoPath>
    </PropertyGroup>
    <ItemGroup>
        <GeneratedJson Include="$(EndpointInfoPath)\*.json" />
    </ItemGroup>
    <Copy SourceFiles="@(GeneratedJson)" DestinationFolder="$(ProjectDir)" />
</Target>
Reasons:
  • Blacklisted phrase (1): I am trying to
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: littletree71