Skip to content

Commit 1e9a811

Browse files
Merge pull request unoplatform#9954 from Youssef1313/cleanup-build
build: Remove unnecessary roslyn-override.targets and fix related build warnings
2 parents 8ee4daf + 2ac0c13 commit 1e9a811

File tree

4 files changed

+16
-35
lines changed

4 files changed

+16
-35
lines changed

build/ci/.azure-devops-samplesapp-uitests-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
displayName: 'Build UI Tests'
3434
inputs:
3535
solution: src/SamplesApp/SamplesApp.UITests/SamplesApp.UITests.csproj
36-
msbuildArguments: /r /m /p:Configuration=Release /p:MicrosoftNetCompilerVersionOverride=4.0.1 /detailedsummary /m /bl:$(build.artifactstagingdirectory)\build.binlog
36+
msbuildArguments: /r /m /p:Configuration=Release /detailedsummary /m /bl:$(build.artifactstagingdirectory)\build.binlog
3737

3838
- task: CopyFiles@2
3939
displayName: 'Publish Wasm UITest binaries'

src/Common.targets

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,4 @@
2020
</PropertyGroup>
2121

2222
</Target>
23-
24-
<!-- Import the override as the nuget tooling in VS is skipping ItemGroup conditions for legacy projects -->
25-
<Import Project="roslyn-override.targets" Condition="'$(MicrosoftNetCompilerVersionOverride)'!=''"/>
26-
2723
</Project>

src/Directory.Build.targets

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,21 @@
131131
<MicrosoftNetCompilerVersionOverride>4.4.0-2.final</MicrosoftNetCompilerVersionOverride>
132132
</PropertyGroup>
133133

134-
<!-- Import the override as the nuget tooling in VS is skipping ItemGroup conditions for legacy projects -->
135-
<Import Project="roslyn-override.targets" Condition="'$(MicrosoftNetCompilerVersionOverride)'!=''"/>
134+
<PropertyGroup>
135+
<!--
136+
Disable shared compilation for the override to take place
137+
https://github.com/dotnet/roslyn/blob/315c2e149ba7889b0937d872274c33fcbfe9af5f/src/NuGet/Microsoft.Net.Compilers/build/Microsoft.Net.Compilers.props#L36
138+
-->
139+
<UseSharedCompilation>false</UseSharedCompilation>
140+
</PropertyGroup>
141+
142+
<ItemGroup>
143+
<!--This override is used to validate the use of specific version of the C# Compiler-->
144+
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="$(MicrosoftNetCompilerVersionOverride)">
145+
<PrivateAssets>all</PrivateAssets>
146+
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
147+
</PackageReference>
148+
</ItemGroup>
136149

137150
<Target Name="WorkaroundMissingWinAppSDKDLL"
138151
BeforeTargets="BinPlaceBootstrapDll">

src/roslyn-override.targets

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)