Skip to content

Commit 482a861

Browse files
[VMR] Codeflow 9ee9fa8-9ee9fa8
[[ commit created by automation ]]
1 parent 6463317 commit 482a861

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

src/BuiltInTools/dotnet-watch/dotnet-watch.csproj

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@
1515

1616
<!-- Avoid https://github.com/dotnet/arcade/issues/9305 -->
1717
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
18+
19+
<!--
20+
Disable CS9057 in source-only dev/ci builds. This is necessary because dotnet-watch distributes some ASP.NET Core
21+
analyzers. These analyzers get built with a dependency on the live version of Microsoft.CodeAnalysis. In a dev/ci
22+
build, the assembly version associated with Microsoft.CodeAnalysis in that case is 42.42.42.4242, set by Arcade in
23+
dev/ci builds. So when building dotnet-watch with its analyzer dependencies, it will cause CS9057 because the
24+
analyzer assembly version is not the same as the compiler assembly version being used by the sdk that the project
25+
is being built with. But this is fine because the analyzer is just being used here to distribute it with the tool.
26+
-->
27+
<NoWarn Condition="'$(DotNetBuildSourceOnly)' == 'true' and '$(OfficialBuild)' != 'true'">$(NoWarn);CS9057</NoWarn>
1828
</PropertyGroup>
1929

2030
<ItemGroup>

src/WebSdk/Web/Tasks/Microsoft.NET.Sdk.Web.Tasks.csproj

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@
1111

1212
<PropertyGroup>
1313
<TargetFrameworks>$(SdkTargetFramework);net472</TargetFrameworks>
14+
15+
<!--
16+
Disable CS9057 in source-only dev/ci builds. This is necessary because the SDK distributes Microsoft.AspNetCore.Analyzers
17+
with its Microsoft.NET.Sdk.Web.Tasks package. Microsoft.AspNetCore.Analyzers gets built with a dependency on the live
18+
version of Microsoft.CodeAnalysis. In a dev/ci build, the assembly version associated with Microsoft.CodeAnalysis in
19+
that case is 42.42.42.4242, set by Arcade in dev/ci builds. So when building Microsoft.NET.Sdk.Web.Tasks with its
20+
analyzer dependencies, it will cause CS9057 because the analyzer assembly version is not the same as the compiler
21+
assembly version being used by the sdk that the project is being built with. But this is fine because the analyzer
22+
is just being used here to distribute it with the Microsoft.NET.Sdk.Web.Tasks package.
23+
-->
24+
<NoWarn Condition="'$(DotNetBuildSourceOnly)' == 'true' and '$(OfficialBuild)' != 'true'">$(NoWarn);CS9057</NoWarn>
1425
</PropertyGroup>
1526

1627
<ItemGroup>

0 commit comments

Comments
 (0)