dotnet / docs

This repository contains .NET Documentation.
https://learn.microsoft.com/dotnet
Creative Commons Attribution 4.0 International
4.29k stars 5.92k forks source link

dotnet clean is not deleting files in bin/debug/.netcore2.2 #17139

Closed RashmiSrinivas1 closed 4 years ago

RashmiSrinivas1 commented 4 years ago

Unable to delete files added using copyToOutputDirectory to PreserveLatest

I had a file with

    <EmbeddedResource Include="Test.xml" > 
    <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
   </EmbeddedResource>

and have now updated it not to contain

    <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

in the .csproj file.

When I try to run dotnet clean, the files which have been copied earlier still exists( Debug mode)

Recommended action

Category

Affected APIs

 "Not detectable via API analysis"

Issue metadata

gewarren commented 4 years ago

I don't think this is a breaking change. A breaking change is an intentional change in behavior from a previous version. But I'm not sure that it's a bug either, because the description of dotnet clean states that it only cleans the outputs created during the build, and test.xml isn't created during the build.

gewarren commented 4 years ago

I'm going to close this issue. If you still feel that there's a bug, please file an issue at https://github.com/dotnet/sdk/issues.