Skip to content

Clean target breaks on unknown TFM's #1556

@clairernovotny

Description

@clairernovotny

I just noticed that on a clean repo that uses my SDK Extras, without the project.assets.json, running msbuild /t:clean fails:

"C:\dev\UWPCommunityToolkit\UWP Community Toolkit.sln" (clean target) (1) ->
"C:\dev\UWPCommunityToolkit\Microsoft.Toolkit.Uwp.DeveloperTools\Microsoft.Toolkit.Uwp.DeveloperTools.csproj" (Clean target) (7) ->
  C:\Program Files\dotnet\sdk\2.0.0\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.TargetFrameworkInference.targets(96,5): error : The TargetFramework value 'uap10.0' was not recognized. It may be misspelled. If not, then the TargetFrameworkIdentifier and/or TargetFrameworkVersion prop erties must be specified explicitly. [C:\dev\UWPCommunityToolkit\Microsoft.Toolkit.Uwp.DeveloperTools\Microsoft.Toolkit.Uwp.DeveloperTools.cs proj]

To repro, clone https://github.com/Microsoft/UWPCommunityToolkit, checkout the dev branch and then try to run
Msbuild /t:clean

That’s it. This seems like a bug since in this state, the targets provided by my NuGet package won’t exist or be imported. Seems like this error check shouldn’t happen on Clean, but it should still nuke obj\TFM and bin\TFM directories?

Binlog:
log.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions