-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
CliExampleWithFactory.csproj
37 lines (29 loc) · 1.65 KB
/
CliExampleWithFactory.csproj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\src\Swashbuckle.AspNetCore.SwaggerGen\Swashbuckle.AspNetCore.SwaggerGen.csproj" />
<ProjectReference Include="..\..\..\src\Swashbuckle.AspNetCore.SwaggerUI\Swashbuckle.AspNetCore.SwaggerUI.csproj" />
<ProjectReference Include="..\..\..\src\Swashbuckle.AspNetCore.Swagger\Swashbuckle.AspNetCore.Swagger.csproj" />
<ProjectReference Include="..\..\..\src\Swashbuckle.AspNetCore.Cli\Swashbuckle.AspNetCore.Cli.csproj" />
</ItemGroup>
<!--
NOTE: In practice, you would install the CLI as a .NET Core Global Tool (i.e. dotnet tool install Swashbuckle.AspNetCore.Cli)
and incorporate it into your build process using the commented out target below
-->
<!--
<Target Name="SwaggerToFile" AfterTargets="AfterBuild">
<Exec Command="dotnet swagger tofile --host http://example.com --output wwwroot/api-docs/v1/swagger.json "$(TargetPath)" v1" />
</Target>
-->
<!--
HOWEVER ... This example invokes the CLI DLL directly so that its source code can be tested during the Swashbuckle build process
-->
<Target Name="SwaggerToFile" AfterTargets="AfterBuild">
<Exec Command="dotnet $(SolutionDir)src\Swashbuckle.AspNetCore.Cli\bin\$(Configuration)\$(TargetFramework)\dotnet-swagger.dll tofile --host http://example.com --output wwwroot/api-docs/v1/swagger.json $(OutputPath)$(AssemblyName).dll v1" />
</Target>
</Project>