forked from dotnet/sdk
/
Microsoft.NET.Sdk.Razor.SourceGenerators.csproj
40 lines (32 loc) · 2.05 KB
/
Microsoft.NET.Sdk.Razor.SourceGenerators.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
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<StrongNameKeyId>MicrosoftAspNetCore</StrongNameKeyId>
<!-- This is not a package, it is part of Razor SDK. -->
<IsPackable>false</IsPackable>
<IsShipping>false</IsShipping>
<NoWarn>RS2008</NoWarn>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup>
<!-- Use a pinned version of the compiler unless building from source. This avoids issues where the source generator is unable to launch in VS because the compiler versions is older than the one in the SDK. -->
<RSG_MicrosoftCodeAnalysisCSharpPackageVersion Condition="'$(DotNetBuildFromSource)' != 'true'">$(MicrosoftCodeAnalysisCSharpAnalyzerPinnedVersionPackageVersion)</RSG_MicrosoftCodeAnalysisCSharpPackageVersion>
<RSG_MicrosoftCodeAnalysisCSharpPackageVersion Condition="'$(DotNetBuildFromSource)' == 'true'">$(MicrosoftCodeAnalysisCSharpPackageVersion)</RSG_MicrosoftCodeAnalysisCSharpPackageVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="$(RSG_MicrosoftCodeAnalysisCSharpPackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Razor.SourceGenerator.Tooling.Internal" Version="$(MicrosoftAspNetCoreRazorSourceGeneratorToolingInternalPackageVersion)" GeneratePathProperty="true" />
</ItemGroup>
<ItemGroup>
<None Update="RazorSourceGenerator.razorencconfig" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<!-- See https://github.com/dotnet/roslyn/discussions/47517#discussioncomment-64145 -->
<PropertyGroup>
<GetTargetPathDependsOn>$(GetTargetPathDependsOn);GetDependencyTargetPaths</GetTargetPathDependsOn>
</PropertyGroup>
<Target Name="GetDependencyTargetPaths">
<ItemGroup>
<TargetPathWithTargetPlatformMoniker Include="$(PkgMicrosoft_AspNetCore_Razor_SourceGenerator_Tooling_Internal)\lib\netstandard2.0\Microsoft.AspNetCore.Razor.SourceGenerator.Tooling.Internal.dll" IncludeRuntimeDependency="false" />
</ItemGroup>
</Target>
</Project>