Skip to content

Remove duplicates From the TargetFrameworks while doing restore. #32205

@Anipik

Description

@Anipik

When we build a libraries project in VS, it tries to due a restore. In our new config system, we remove the oSGroup from tfms just before restore. So for projects with <TargetFrameworks>netcoreapp5.0-Windows_NT;netcoreapp5.0-Unix<TargetFrameworks>
ends with just

<TargetFrameworks>netcoreapp5.0;netcoreapp5.0</TargetFrameworks>

which is not a valid input for restore task. It wont effect the build in VS, but we should fix it becuase it would show as an error on the output pane in the vs and it would be required for enabling the restore on ref and srcs

The error looks like this

Error occurred while restoring NuGet packages: Invalid restore input. Duplicate frameworks found: 'netcoreapp5.0, netcoreapp5.0'. Input files: C:\git\runtime\src\libraries\System.IO.FileSystem\tests\System.IO.FileSystem.Tests.csproj.

cc @ViktorHofer @ericstj @safern @danmosemsft

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions