Skip to content

Conversation

@ViktorHofer
Copy link
Member

@ViktorHofer ViktorHofer commented Apr 20, 2023

The .NETStandard1.x dependency graph is extremely big and results in dependency scan utilities flagging the brought in packages (in case of vulnerabilities). All the .NETStandard1.x packages except for Microsoft.NETCore.Platforms haven't shipped for years anymore and are considered deprecated.

Provide an opt-in target that can be enabled either per project or per repository (usually the later). Tested this in dotnet/format and want to enable it in other repositories when cleaning up the repository's dependency graph, i.e. in #13210

Example output:

C:\git\format>Build.cmd /bl /p:FlagNetStandard1XDependencies=true
C:\git\format\tests\dotnet-format.UnitTests.csproj(95,5): error : The following .NET Standard 1.x packages are referenced and must be removed:
C:\git\format\tests\dotnet-format.UnitTests.csproj(95,5): error : - System.Collections
C:\git\format\tests\dotnet-format.UnitTests.csproj(95,5): error : - System.Diagnostics.Debug
C:\git\format\tests\dotnet-format.UnitTests.csproj(95,5): error : - System.Globalization
C:\git\format\tests\dotnet-format.UnitTests.csproj(95,5): error : - System.IO
C:\git\format\tests\dotnet-format.UnitTests.csproj(95,5): error : - System.Linq
C:\git\format\tests\dotnet-format.UnitTests.csproj(95,5): error : - System.Linq.Expressions
C:\git\format\tests\dotnet-format.UnitTests.csproj(95,5): error : - System.ObjectModel
C:\git\format\tests\dotnet-format.UnitTests.csproj(95,5): error : - System.Reflection
C:\git\format\tests\dotnet-format.UnitTests.csproj(95,5): error : - System.Reflection.Extensions
C:\git\format\tests\dotnet-format.UnitTests.csproj(95,5): error : - System.Reflection.Primitives
C:\git\format\tests\dotnet-format.UnitTests.csproj(95,5): error : - System.Resources.ResourceManager
C:\git\format\tests\dotnet-format.UnitTests.csproj(95,5): error : - System.Runtime
C:\git\format\tests\dotnet-format.UnitTests.csproj(95,5): error : - System.Runtime.Extensions
C:\git\format\tests\dotnet-format.UnitTests.csproj(95,5): error : - System.Runtime.Handles
C:\git\format\tests\dotnet-format.UnitTests.csproj(95,5): error : - System.Runtime.InteropServices
C:\git\format\tests\dotnet-format.UnitTests.csproj(95,5): error : - System.Text.Encoding
C:\git\format\tests\dotnet-format.UnitTests.csproj(95,5): error : - System.Threading
C:\git\format\tests\dotnet-format.UnitTests.csproj(95,5): error : - System.Threading.Tasks
C:\git\format\tests\dotnet-format.UnitTests.csproj(95,5): error : Consult the project.assets.json files to find the parent dependency.

To double check:

The .NETStandard1.x dependency graph is extremely big and results in dependency scan utilities flagging the brought in packages (in case of vulnerabilities). All the .NETStandard1.x packages except for Microsoft.NETCore.Platforms haven't shipped for years anymore and are considered deprecated.

Provide an opt-in target that can be enabled either per project or per repository (usually the later).
@ViktorHofer ViktorHofer requested review from ericstj and mmitche April 20, 2023 09:53
@ViktorHofer ViktorHofer self-assigned this Apr 20, 2023
@mmitche mmitche enabled auto-merge (squash) April 20, 2023 16:33
@mmitche mmitche disabled auto-merge April 20, 2023 16:33
@mmitche mmitche merged commit 6f1a917 into main Apr 20, 2023
@ViktorHofer ViktorHofer deleted the ViktorHofer-patch-1 branch April 20, 2023 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants