-
Notifications
You must be signed in to change notification settings - Fork 166
/
Directory.Build.targets
103 lines (96 loc) · 7.51 KB
/
Directory.Build.targets
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.354" Condition="'$(IsTestGenerationSrcProject)' != 'false'">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<AdditionalFiles Include="$(RepoEngPath)\stylecop.json">
<Visible>false</Visible>
</AdditionalFiles>
</ItemGroup>
<ItemGroup Condition="$(IncludeSharedSourceInLocalBuild) == 'true'">
<!-- Need to list out each include individually to support the new project which includes one of these files by name -->
<Compile Include="$(AzureCoreSharedSources)Multipart/MultipartContent.cs" LinkBase="Shared/Core/Multipart" />
<Compile Include="$(AzureCoreSharedSources)Multipart/MultipartFormDataContent.cs" LinkBase="Shared/Core/Multipart" />
<Compile Include="$(AzureCoreSharedSources)AppContextSwitchHelper.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)AsyncLockWithValue.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)CallerShouldAuditAttribute.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)ClientDiagnostics.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)DiagnosticScope.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)DiagnosticScopeFactory.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)FixedDelayWithNoJitterStrategy.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)FormUrlEncodedContent.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)ForwardsClientCallsAttribute.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)HttpMessageSanitizer.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)HttpPipelineExtensions.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)IOperationSource.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)IUtf8JsonSerializable.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)IXmlSerializable.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)NextLinkOperationImplementation.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)NoValueResponseOfT.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)OperationFinalStateVia.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)OperationInternal.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)OperationInternalBase.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)OperationInternalOfT.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)OperationPoller.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)Page.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)PageableHelpers.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)ProtocolOperation.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)ProtocolOperationHelpers.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)RawRequestUriBuilder.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)RequestHeaderExtensions.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)RequestUriBuilderExtensions.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)ResponseHeadersExtensions.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)ResponseWithHeaders.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)ResponseWithHeadersOfTHeaders.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)ResponseWithHeadersOfTOfTHeaders.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)SequentialDelayStrategy.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)StringRequestContent.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)TaskExtensions.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)TypeFormatters.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)VoidValue.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)XElementExtensions.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)XmlWriterContent.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)XmlWriterExtensions.cs" LinkBase="Shared/Core" />
<Compile Include="$(AzureCoreSharedSources)TrimmingAttribute.cs" LinkBase="Shared/Core" />
<Compile Include="$(MSBuildThisFileDirectory)/src/assets/Generator.Shared/**/*.cs" Link="Shared/AutoRest/%(RecursiveDir)/%(Filename)%(Extension)" />
</ItemGroup>
<ItemGroup Condition="'$(IncludeManagementSharedCode)' == 'true'">
<Compile Include="$(MSBuildThisFileDirectory)/src/assets/Management.Shared/**/*.cs" Link="Shared/Management/%(RecursiveDir)/%(Filename)%(Extension)" />
</ItemGroup>
<ItemGroup Condition="'$(IsTestGenerationSrcProject)' == 'true'">
<!-- Include analyzers so that we see issues in this repo before we do a regen preview-->
<PackageReference Include="Azure.ClientSdk.Analyzers" />
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" />
<PackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" />
</ItemGroup>
<ItemGroup Condition="'$(IsMgmtLibrary)' == 'true' and '$(IsTestGenerationSrcProject)' == 'true'">
<PackageReference Include="Azure.Core" />
<PackageReference Include="System.Text.Json" />
<PackageReference Include="System.ClientModel" />
<PackageReference Include="Azure.ResourceManager" />
<!-- TODO: Review these file references-->
<Compile Include="$(AzureCoreSharedSources)AzureResourceProviderNamespaceAttribute.cs" LinkBase="Shared" />
<!-- Include management shared code-->
<Compile Include="$(MSBuildThisFileDirectory)/src/assets/Management.Shared/**/*.cs" Link="Shared/Management/%(RecursiveDir)/%(Filename)%(Extension)" />
</ItemGroup>
<ItemGroup Condition ="'$(IsMgmtLibrary)' == 'true' and '$(IsTestGenerationTestProject)' == 'true'">
<PackageReference Include="Azure.Identity" />
<PackageReference Include="NUnit" />
<PackageReference Include="NUnit3TestAdapter" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="Moq" />
</ItemGroup>
<Target Name="_ValidateSourceFileNames"
BeforeTargets="CoreBuild">
<ItemGroup>
<!-- Prevent https://github.com/Azure/azure-sdk-for-net/issues/17164 from becoming an issue further in the build process -->
<_ContainsCurlyBraces Include="@(Compile)" Condition="$([MSBuild]::ValueOrDefault('%(Directory)%(Filename)', '').Contains('{')) or $([MSBuild]::ValueOrDefault('%(Directory)%(Filename)', '').Contains('}'))" />
</ItemGroup>
<Error
Text="File name '%(_ContainsCurlyBraces.FullPath)' cannot contain { or }; use OfT instead of {T} and disable SA1649 for the declaration, or elide {T} from file name entirely."
Condition="'@(_ContainsCurlyBraces)' != ''" />
</Target>
<Import Project="$(CentralPackagesFile)" Condition="'$(ShouldUseCentralVersions)' == 'true'" />
<Import Project="eng\Versioning.targets" />
</Project>