Skip to content

Restoring with invalid target framework says 'unsupported' instead of showing bad framework name #5413

@nguerrera

Description

@nguerrera

Given <TargetFramework>abc123</TargetFramework>, RestoreTask yields:

C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\Common7\IDE\CommonExtensions\Microsoft\NuGet\NuGet.targets(102,5): 
error : Invalid restore input. Invalid target framework 'unsupported'. Input files: D:\Temp\qwerty\qwerty.csproj. [D:\Temp\qwerty\qwerty.csproj]

It should indicate the badly spelled framework 'abc13' in the error message instead of 'unsupported'.

We tried to fix this by running our own check before restore in the SDK, but that breaks adding support for additional TFMs like uap using the MSBuild.Sdk.Extras package.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions