Skip to content

Commit ea44850

Browse files
committed
Dependencies: Remove Microsoft.CodeAnalysis.CSharp dependency from Umbraco.Infrastructure (#20481)
* Remove Microsoft.CodeAnalysis.CSharp from Infrastructure project This was only needed for runtime compilation and thus is no longer needed in Infrastructure. It also caused dependency problems with EF Core Design in previous versions. * Disable CPM for UI project to better reflect consumers This will ensure that we face any potential dependency issues consumers are also likely to run into. * Add `Microsoft.CodeAnalysis.CSharp` reference to `Umbraco.Cms.DevelopmentMode.Backoffice`
1 parent 8be2d77 commit ea44850

File tree

4 files changed

+5
-19
lines changed

4 files changed

+5
-19
lines changed

Directory.Packages.props

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,9 @@
1414
<ItemGroup>
1515
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="10.0.0-rc.1.25451.107" />
1616
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.14.0" />
17-
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="4.14.0" />
18-
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.14.0" />
19-
<PackageVersion Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="4.14.0" />
20-
<PackageVersion Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="4.14.0" />
2117
<PackageVersion Include="Microsoft.Data.Sqlite" Version="10.0.0-rc.1.25451.107" />
2218
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.0-rc.1.25451.107" />
2319
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.0-rc.1.25451.107" />
24-
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.0-rc.1.25451.107" />
2520
<PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="10.0.0-rc.1.25451.107" />
2621
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="10.0.0-rc.1.25451.107" />
2722
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="10.0.0-rc.1.25451.107" />

src/Umbraco.Cms.DevelopmentMode.Backoffice/Umbraco.Cms.DevelopmentMode.Backoffice.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88

99
<ItemGroup>
1010
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" />
11+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" />
1112
</ItemGroup>
1213

1314
<ItemGroup>
1415
<ProjectReference Include="..\Umbraco.Web.Common\Umbraco.Web.Common.csproj" />
1516
</ItemGroup>
16-
17+
1718
</Project>

src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
<PackageReference Include="HtmlAgilityPack" />
4141
<PackageReference Include="MailKit" />
4242
<PackageReference Include="Markdown" />
43-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" />
4443
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" />
4544
<PackageReference Include="Microsoft.Extensions.Configuration.Json" />
4645
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />

src/Umbraco.Web.UI/Umbraco.Web.UI.csproj

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<EnablePackageValidation>false</EnablePackageValidation>
66
<!-- Disable compression for static files, because MapStaticAssets() is not used anyway (yet) -->
77
<CompressionEnabled>false</CompressionEnabled>
8+
<ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
89
</PropertyGroup>
910

1011
<PropertyGroup>
@@ -24,23 +25,13 @@
2425

2526
<ItemGroup>
2627
<!-- Add design/build time support for EF Core migrations -->
27-
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" PrivateAssets="all" />
28-
<!-- Explicit transitive references to avoid warnings on build - see https://github.com/dotnet/efcore/issues/35143-->
29-
<PackageReference Include="Microsoft.CodeAnalysis.Common" />
30-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" />
31-
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common" />
32-
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" />
33-
</ItemGroup>
34-
35-
<ItemGroup>
36-
<!-- Hide the content files that come from the Microsoft.CodeAnalysis.Workspaces.Common package. -->
37-
<Content Update="$(NuGetPackageRoot)\microsoft.codeanalysis.workspaces.msbuild\**\**" Visible="false" />
28+
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" PrivateAssets="all" Version="10.0.0-rc.1.25451.107" />
3829
</ItemGroup>
3930

4031
<ItemGroup>
4132
<!-- Ensure the AppLocalIcu setting is the same as the referenced ICU package version and changes are also done to the template project! -->
4233
<!-- Opt-in to app-local ICU to ensure consistent globalization APIs across different platforms -->
43-
<PackageReference Include="Microsoft.ICU.ICU4C.Runtime" VersionOverride="72.1.0.3" />
34+
<PackageReference Include="Microsoft.ICU.ICU4C.Runtime" Version="72.1.0.3" />
4435
<RuntimeHostConfigurationOption Include="System.Globalization.AppLocalIcu" Value="72.1.0.3" Condition="$(RuntimeIdentifier.StartsWith('linux')) or $(RuntimeIdentifier.StartsWith('win')) or ('$(RuntimeIdentifier)' == '' and !$([MSBuild]::IsOSPlatform('osx')))" />
4536
</ItemGroup>
4637

0 commit comments

Comments
 (0)