Skip to content

dotnet clean (--all?) can always fail before a build is run for apps with a RuntimeIdentifier #30199

Open
@nagilson

Description

@nagilson

As reported by @pimbrouwers in: #29859
If you do something like dotnet new console -lang "F#" and add a RuntimeIdentifier to the project and try dotnet clean, it will fail every time until you run dotnet build, in which case it will work.

This is because clean only cleans the folder for the exact RID, Config, TFM, etc, and there is no runtime config assets.json as that is created by build but never cleaned up, clean only cleans the output directory, and relies on this file to do so. We would maybe like to have an error instead of crash, though we could also design a dotnet clean --all which would clean all output... though we are concerned about deleting people's files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-NetSDKgood first issueIssues that would be a good fit for someone new to the repository. Narrow in scope, well-defined.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions