Skip to content

Commit

Permalink
Use cross-genned assemblies in CLI (dotnet#17317)
Browse files Browse the repository at this point in the history
* Use cross-genned assemblies in CLI
* Address feedback from peer review
* Fix typo
  • Loading branch information
captainsafia committed May 3, 2021
1 parent 43c12fe commit 7d4e2bb
Showing 1 changed file with 17 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,26 @@ Copyright (c) .NET Foundation. All rights reserved.
<EditorConfigFiles Include="$(RazorEncConfigFile)" Condition="'$(DesignTimeBuild)' == 'true' AND '$(BuildingInsideVisualStudio)' == 'true'"/>
</ItemGroup>

<!-- Configure analyzers -->
<!-- Assemblies in the SDK are cross-genned to improve performance. However, these
cross-genned assemblies cannot be loaded into 32-bit VS. To work around these, we load
the binaries that are not cross-genned (those in the source-generators directory) when
building in VS. However, we want to continue to leverage the cross-genned assemblies in
environments where it makes sense so we load them in the CLI and elsewhere.
For more info, see https://github.com/dotnet/aspnetcore/issues/32296. -->
<PropertyGroup>
<_RazorCompilerBinaryPath Condition="'$(MSBuildRuntimeType)' != 'Core'">$(_RazorSdkSourceGeneratorDirectoryRoot)</_RazorCompilerBinaryPath>
<_RazorCompilerBinaryPath Condition="'$(MSBuildRuntimeType)' == 'Core'">$(_RazorSdkToolsDirectoryRoot)</_RazorCompilerBinaryPath>
</PropertyGroup>

<ItemGroup>
<_RazorAnalyzer Include="$(_RazorSdkSourceGeneratorDirectoryRoot)Microsoft.AspNetCore.Mvc.Razor.Extensions.dll" />
<_RazorAnalyzer Include="$(_RazorSdkSourceGeneratorDirectoryRoot)Microsoft.AspNetCore.Razor.Language.dll" />
<_RazorAnalyzer Include="$(_RazorSdkSourceGeneratorDirectoryRoot)Microsoft.CodeAnalysis.Razor.dll" />
<_RazorAnalyzer Include="$(_RazorCompilerBinaryPath)Microsoft.AspNetCore.Mvc.Razor.Extensions.dll" />
<_RazorAnalyzer Include="$(_RazorCompilerBinaryPath)Microsoft.AspNetCore.Razor.Language.dll" />
<_RazorAnalyzer Include="$(_RazorCompilerBinaryPath)Microsoft.CodeAnalysis.Razor.dll" />
<_RazorAnalyzer Include="$(_RazorSdkSourceGeneratorDirectoryRoot)Microsoft.NET.Sdk.Razor.SourceGenerators.dll" />
</ItemGroup>

<!-- Configure analyzers -->
<ItemGroup>
<Analyzer Include="@(_RazorAnalyzer)" />

<RazorComponentWithTargetPath
Expand Down

0 comments on commit 7d4e2bb

Please sign in to comment.