-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Use Roslyn from SDK always for SDK-based project builds #48028
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 16 commits
1d36c06
607133a
1707725
357097e
7e52b1b
a73f785
731050c
067d86a
1d401ec
577d565
ab396fb
c91bbd4
5b1d601
f3732fd
7a0a90f
e93a5db
54b5881
91b23da
4451c92
6c95106
47ce533
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -222,15 +222,15 @@ | |
| </PropertyGroup> | ||
| <PropertyGroup> | ||
| <!-- Dependencies from https://github.com/dotnet/roslyn --> | ||
| <MicrosoftNetCompilersToolsetVersion>5.0.0-1.25210.7</MicrosoftNetCompilersToolsetVersion> | ||
| <MicrosoftNetCompilersToolsetFrameworkPackageVersion>5.0.0-1.25210.7</MicrosoftNetCompilersToolsetFrameworkPackageVersion> | ||
| <MicrosoftCodeAnalysisPackageVersion>5.0.0-1.25210.7</MicrosoftCodeAnalysisPackageVersion> | ||
| <MicrosoftCodeAnalysisCSharpPackageVersion>5.0.0-1.25210.7</MicrosoftCodeAnalysisCSharpPackageVersion> | ||
| <MicrosoftCodeAnalysisCSharpCodeStylePackageVersion>5.0.0-1.25210.7</MicrosoftCodeAnalysisCSharpCodeStylePackageVersion> | ||
| <MicrosoftCodeAnalysisCSharpFeaturesPackageVersion>5.0.0-1.25210.7</MicrosoftCodeAnalysisCSharpFeaturesPackageVersion> | ||
| <MicrosoftCodeAnalysisWorkspacesCommonPackageVersion>5.0.0-1.25210.7</MicrosoftCodeAnalysisWorkspacesCommonPackageVersion> | ||
| <MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion>5.0.0-1.25210.7</MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion> | ||
| <MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>5.0.0-1.25210.7</MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion> | ||
| <MicrosoftNetCompilersToolsetVersion>4.14.0-3.25210.1</MicrosoftNetCompilersToolsetVersion> | ||
|
||
| <MicrosoftNetCompilersToolsetFrameworkPackageVersion>4.14.0-3.25210.1</MicrosoftNetCompilersToolsetFrameworkPackageVersion> | ||
| <MicrosoftCodeAnalysisPackageVersion>4.14.0-3.25210.1</MicrosoftCodeAnalysisPackageVersion> | ||
| <MicrosoftCodeAnalysisCSharpPackageVersion>4.14.0-3.25210.1</MicrosoftCodeAnalysisCSharpPackageVersion> | ||
| <MicrosoftCodeAnalysisCSharpCodeStylePackageVersion>4.14.0-3.25210.1</MicrosoftCodeAnalysisCSharpCodeStylePackageVersion> | ||
| <MicrosoftCodeAnalysisCSharpFeaturesPackageVersion>4.14.0-3.25210.1</MicrosoftCodeAnalysisCSharpFeaturesPackageVersion> | ||
| <MicrosoftCodeAnalysisWorkspacesCommonPackageVersion>4.14.0-3.25210.1</MicrosoftCodeAnalysisWorkspacesCommonPackageVersion> | ||
| <MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion>4.14.0-3.25210.1</MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion> | ||
| <MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion>4.14.0-3.25210.1</MicrosoftCodeAnalysisCSharpWorkspacesPackageVersion> | ||
| </PropertyGroup> | ||
| <PropertyGroup> | ||
| <!-- Dependencies from https://github.com/aspnet/AspNetCore --> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -299,4 +299,45 @@ Copyright (c) .NET Foundation. All rights reserved. | |
| <IsNetCoreAppTargetingLatestTFM Condition="'$(IsNetCoreAppTargetingLatestTFM)' == '' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and '$(_TargetFrameworkVersionWithoutV)' == '$(NETCoreAppMaximumVersion)'">true</IsNetCoreAppTargetingLatestTFM> | ||
| </PropertyGroup> | ||
|
|
||
| <!-- | ||
| Use Roslyn deployed with SDK for builds of SDK-style projects (regardless of whether the initiator is `dotnet` or `msbuild`). | ||
| See https://github.com/dotnet/sdk/blob/main/documentation/general/decouple-vs-and-net-sdk.md. | ||
| --> | ||
| <Choose> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider just making these conditions on the property directly rather than using choose, so you don't have to duplicate the property groups.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That would mean needing to duplicate the conditions though and I think that would be less readable. |
||
| <!-- RoslynCompilerType specified by user, do not overwrite it. --> | ||
| <When Condition="'$(RoslynCompilerType)' != ''"></When> | ||
|
|
||
| <!-- BuildWithNetFrameworkHostedCompiler specified by user to opt into downloading compiler framework toolset package. --> | ||
| <When Condition="'$(BuildWithNetFrameworkHostedCompiler)' == 'true'"> | ||
| <PropertyGroup><RoslynCompilerType>FrameworkPackage</RoslynCompilerType></PropertyGroup> | ||
| </When> | ||
|
|
||
| <!-- On core MSBuild or if we have path to dotnet host, use Core compiler type. --> | ||
| <When Condition="'$(MSBuildRuntimeType)' == 'Core' or '$(DOTNET_HOST_PATH)' != '' or '$(DOTNET_EXPERIMENTAL_HOST_PATH)' != ''"> | ||
| <PropertyGroup><RoslynCompilerType>Core</RoslynCompilerType></PropertyGroup> | ||
| </When> | ||
|
|
||
| <!-- Automatically opt users into using the toolset package if they are running an MSBuild other than what this SDK was built against. | ||
| This is to reduce 'tearing'/dependency mismatch, but as always users can override this behavior by disabling the hosted compiler flag. --> | ||
| <When Condition="'$(MSBuildRuntimeType)' == 'Full' | ||
| and '$(BuildWithNetFrameworkHostedCompiler)' == '' | ||
| and '$(_IsDisjointMSBuildVersion)' == 'true' | ||
| and ('$(MSBuildProjectExtension)' == '.csproj' | ||
| or '$(MSBuildProjectExtension)' == '.vbproj')"> | ||
| <PropertyGroup><RoslynCompilerType>FrameworkPackage</RoslynCompilerType></PropertyGroup> | ||
| </When> | ||
|
|
||
| <!-- Otherwise we must be on full MSBuild, so choose Framework compiler type. --> | ||
| <Otherwise> | ||
| <PropertyGroup><RoslynCompilerType>Framework</RoslynCompilerType></PropertyGroup> | ||
| </Otherwise> | ||
| </Choose> | ||
|
|
||
| <PropertyGroup Condition="'$(RoslynCompilerType)' == 'Core'"> | ||
| <RoslynTargetsPath Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MSBuildThisFileDirectory)..\..\..\Roslyn</RoslynTargetsPath> | ||
| <RoslynTargetsPath Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MSBuildThisFileDirectory)..\..\..\Roslyn\binfx</RoslynTargetsPath> | ||
jjonescz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| <CSharpCoreTargetsPath>$(MSBuildThisFileDirectory)..\..\..\Roslyn\Microsoft.CSharp.Core.targets</CSharpCoreTargetsPath> | ||
| <VisualBasicCoreTargetsPath>$(MSBuildThisFileDirectory)..\..\..\Roslyn\Microsoft.VisualBasic.Core.targets</VisualBasicCoreTargetsPath> | ||
| </PropertyGroup> | ||
|
|
||
| </Project> | ||
jjonescz marked this conversation as resolved.
Show resolved
Hide resolved
|
Uh oh!
There was an error while loading. Please reload this page.