-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWorkleap.Extensions.OpenAPI.csproj
More file actions
67 lines (57 loc) · 3.76 KB
/
Copy pathWorkleap.Extensions.OpenAPI.csproj
File metadata and controls
67 lines (57 loc) · 3.76 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<IsPackable>true</IsPackable>
<PackageReadmeFile>README.md</PackageReadmeFile>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>../Workleap.Extensions.OpenAPI.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore" Version="10.2.1" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\README.md" Link="README.md" Pack="true" PackagePath="\" />
</ItemGroup>
<ItemGroup>
<!-- Exposes internal symbols to test projects and mocking libraries -->
<InternalsVisibleTo Include="Workleap.Extensions.OpenAPI.Tests,PublicKey=002400000480000094000000060200000024000052534131000400000100010025301ce547647ab5ac9264ade0f9cdc0252796a257095add4791b0232c1def21bb9e0c87d218713f918565b23394362dbcb058e210c853a24ec33e6925ebedf654a0d65efb3828c855ff21eaaa67aeb9b24b81b8baff582a03df6ab04424c7e53cacbfe84d2765ce840389f900c55824d037d2c5b6b330ac0188a06ef6869dba" />
<InternalsVisibleTo Include="DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Workleap.Extensions.OpenAPI.Analyzers\Workleap.Extensions.OpenAPI.Analyzers.csproj" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\Shared\HttpResultsStatusCodeTypeHelpers.cs">
<Link>Shared\HttpResultsStatusCodeTypeHelpers.cs</Link>
</Compile>
</ItemGroup>
<PropertyGroup>
<!--
Here we use some advanced MSBuild to embed our Roslyn analyzers into the generated package.
The idea is to only insert the analyzers DLL into the corresponding analyzers directory (analyzers\dotnet\cs) of the NuGet package, during the packing phase.
Here is the official documentation about this process: https://learn.microsoft.com/en-us/nuget/reference/msbuild-targets#targetsfortfmspecificcontentinpackage
This technique was originally found here: https://stackoverflow.com/q/40396161/825695
Microsoft does something similar with several packages, including the source generators embed in Microsoft.Extensions.Logging.Abstractions.
However their MSBuild engineering is way more complicated and reused through the entire .NET runtime monorepo. We don't want that kind of complexity here.
-->
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage</TargetsForTfmSpecificBuildOutput>
</PropertyGroup>
<Target Name="CopyProjectReferencesToPackage" DependsOnTargets="BuildOnlySettings;ResolveReferences">
<ItemGroup>
<_OurPrivateAssetsFiles Include="@(ReferenceCopyLocalPaths->WithMetadataValue('ReferenceSourceTarget', 'ProjectReference')->WithMetadataValue('PrivateAssets', 'All'))" />
<_OurRoslynAnalyzersDlls Include="@(_OurPrivateAssetsFiles)" Condition=" '%(Filename)' == 'Workleap.Extensions.OpenAPI.Analyzers' And '%(Extension)' == '.dll' " />
</ItemGroup>
<ItemGroup>
<TfmSpecificPackageFile Include="@(_OurRoslynAnalyzersDlls)" PackagePath="analyzers\dotnet\cs" />
</ItemGroup>
</Target>
</Project>