|
| 1 | +<Project Sdk="Microsoft.Build.NoTargets"> |
| 2 | + |
| 3 | + <PropertyGroup> |
| 4 | + <TargetFramework>net472</TargetFramework> |
| 5 | + <IsPackable Condition="'$(OS)' == 'Windows_NT' and '$(Architecture)' == 'x64' and '$(PgoInstrument)' != 'true'">true</IsPackable> |
| 6 | + <BeforePack>$(BeforePack);GenerateLayout</BeforePack> |
| 7 | + <PackageDescription>Analyzers and generators from the runtime and SDK for VS insertion</PackageDescription> |
| 8 | + <NoWarn>$(NoWarn);NU5100;NU5109;NU5123</NoWarn> |
| 9 | + <SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking> |
| 10 | + <IsShippingPackage>false</IsShippingPackage> |
| 11 | + </PropertyGroup> |
| 12 | + |
| 13 | + <ItemGroup> |
| 14 | + <ProjectReference Include="$(RepoRoot)src\Microsoft.Net.Sdk.AnalyzerRedirecting\Microsoft.Net.Sdk.AnalyzerRedirecting.csproj" /> |
| 15 | + <ProjectReference Include="$(RepoRoot)src\Installer\redist-installer\redist-installer.proj" /> |
| 16 | + </ItemGroup> |
| 17 | + |
| 18 | + <!-- Shared infra to build and use the sdk-tasks --> |
| 19 | + <Import Project="$(RepoRoot)src\Tasks\sdk-tasks\sdk-tasks.InTree.targets" /> |
| 20 | + |
| 21 | + <Target Name="GenerateLayout" Condition="'$(IsPackable)' == 'true'" DependsOnTargets="ResolveProjectReferences"> |
| 22 | + <PropertyGroup> |
| 23 | + <SdkRuntimeAnalyzersSwrFile>$(ArtifactsNonShippingPackagesDir)VS.Redist.Common.Net.Core.SDK.RuntimeAnalyzers.swr</SdkRuntimeAnalyzersSwrFile> |
| 24 | + <RuntimeAnalyzersSourceRoot>$(ArtifactsBinDir)redist-installer\$(Configuration)\dotnet\</RuntimeAnalyzersSourceRoot> |
| 25 | + </PropertyGroup> |
| 26 | + |
| 27 | + <ItemGroup> |
| 28 | + <RuntimeAnalyzersContent Include="$(ArtifactsBinDir)Microsoft.Net.Sdk.AnalyzerRedirecting\$(Configuration)\net472\**\*.*" DeploymentSubpath="AnalyzerRedirecting" /> |
| 29 | + <RuntimeAnalyzersContent Include="$(RuntimeAnalyzersSourceRoot)packs\Microsoft.NetCore.App.Ref\*\analyzers\**\*.*" DeploymentSubpath="NetCoreAnalyzers" /> |
| 30 | + <RuntimeAnalyzersContent Include="$(RuntimeAnalyzersSourceRoot)packs\Microsoft.WindowsDesktop.App.Ref\*\analyzers\**\*.*" DeploymentSubpath="WindowsDesktopAnalyzers" /> |
| 31 | + <RuntimeAnalyzersContent Include="$(RuntimeAnalyzersSourceRoot)packs\Microsoft.AspNetCore.App.Ref\*\analyzers\**\*.*" DeploymentSubpath="AspNetCoreAnalyzers" /> |
| 32 | + <RuntimeAnalyzersContent Include="$(RuntimeAnalyzersSourceRoot)sdk\*\Sdks\Microsoft.NET.Sdk\analyzers\**\*.*" DeploymentSubpath="SDKAnalyzers" /> |
| 33 | + <RuntimeAnalyzersContent Include="$(RuntimeAnalyzersSourceRoot)sdk\*\Sdks\Microsoft.NET.Sdk.Web\analyzers\**\*.*" DeploymentSubpath="WebSDKAnalyzers" /> |
| 34 | + </ItemGroup> |
| 35 | + |
| 36 | + <Copy SourceFiles="@(RuntimeAnalyzersContent)" |
| 37 | + DestinationFiles="@(RuntimeAnalyzersContent->'$(OutputPath)\%(DeploymentSubpath)\%(RecursiveDir)%(Filename)%(Extension)')" |
| 38 | + UseHardlinksIfPossible="true" /> |
| 39 | + |
| 40 | + <GenerateRuntimeAnalyzersSWR RuntimeAnalyzersLayoutDirectory="$(OutputPath)" |
| 41 | + OutputFile="$(SdkRuntimeAnalyzersSwrFile)" /> |
| 42 | + |
| 43 | + <ItemGroup> |
| 44 | + <!-- Include the swr file in the nuget package for VS authoring --> |
| 45 | + <Content Include="$(SdkRuntimeAnalyzersSwrFile)" PackagePath="/" /> |
| 46 | + <Content Include="@(RuntimeAnalyzersContent)" PackagePath="/%(RuntimeAnalyzersContent.DeploymentSubpath)/%(RecursiveDir)%(Filename)%(Extension)" /> |
| 47 | + </ItemGroup> |
| 48 | + </Target> |
| 49 | + |
| 50 | +</Project> |
0 commit comments