-
Notifications
You must be signed in to change notification settings - Fork 0
/
ApiCompat.csproj
50 lines (44 loc) · 2.92 KB
/
ApiCompat.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
38
39
40
41
42
43
44
45
46
47
48
49
50
<Project Sdk="Microsoft.NET.Sdk">
<!--This project is used to enforce API compatibility between the GA'ed libraries and the most recent version available on Nuget. The most recent
version is restored from Nuget via the package references below. The ApiCompatVerification target, specified below, is referenced in the
eng/Directory.Build.Data.targets file which causes this target to be executed for each csproj that has the EnableApiCompat parameter set to true.
The EnableApiCompat parameter defaults to the value of the IsShippingClientLibrary parameter, which is defined in the eng/Directory.Build.Data.props file.-->
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RunApiCompatForSrc>true</RunApiCompatForSrc>
<IntermediateOutputPath>$(IntermediateOutputPath)/$(TargetPackageName)</IntermediateOutputPath>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.DotNet.ApiCompat" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Azure.Core" />
<PackageReference Include="Azure.Data.AppConfiguration" />
<PackageReference Include="Azure.Identity" />
<PackageReference Include="Azure.Security.KeyVault.Certificates" />
<PackageReference Include="Azure.Security.KeyVault.Keys" />
<PackageReference Include="Azure.Security.KeyVault.Secrets" />
<PackageReference Include="Azure.Storage.Blobs" />
<PackageReference Include="Azure.Storage.Blobs.Batch" />
<PackageReference Include="Azure.Storage.Common" />
<PackageReference Include="Azure.Storage.Files.Shares" />
<PackageReference Include="Azure.Storage.Queues" />
<PackageReference Include="Microsoft.Extensions.Azure" />
</ItemGroup>
<Import Project="..\Packages.Data.props" />
<Target Name="ApiCompatVerification" DependsOnTargets="_ResolveResolvedMatchingContract;$(TargetsTriggeredByCompilation)">
</Target>
<Target Name="_ResolveResolvedMatchingContract" DependsOnTargets="ResolveReferences">
<PropertyGroup>
<TargetPackageDll Condition="'%(ResolvedCompileFileDefinitions.NuGetPackageId)' == '$(TargetPackageName)'" >%(ResolvedCompileFileDefinitions.Identity)</TargetPackageDll>
</PropertyGroup>
<ItemGroup>
<ResolvedMatchingContract Include="$(TargetPackageDll)" />
<_DependencyDirectories Include="$(TargetOutputPath)" />
<ReferencePath Remove="$(TargetPackageDll)" />
</ItemGroup>
<Error Condition="'@(ResolvedMatchingContract)' == ''"
Text="Unable to find dll for $(TargetPackageName). Make sure it is included in list of Package References if the ApiCompatVerification target (defined in eng/ApiCompat/ApiCompat.csproj) is intended to run for this package. If ApiCompatVerification should not be run, set the EnableApiCompat parameter to false in the csproj file." />
<Message Text="Running ApiCompatVerification against $(TargetPackageDll) using assemblies from $(TargetOutputPath)" Importance="High" />
</Target>
</Project>