Visual Studio Clean wiped contents of script source folder

Barry Briggs 1 Reputation point
2021-03-16T16:23:34.133+00:00

ASP.Net Core project, .NET 5. Have all my TS/JS in a folder called Scripts in wwwroot. Executing a "Clean" command on the solution wiped out all contents of the folder -- many days of work lost. In process of recovering but this seems like a bug or at least something VS should warn about. VS 16.9.0, W10.

Developer technologies Visual Studio Other
Community Center Not monitored
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anna Xiu-MSFT 31,056 Reputation points Microsoft External Staff
    2021-03-17T04:03:42.84+00:00

    Hi @Barry Briggs ,

    Welcome to Microsoft Q&A!

    The Clean will remove all intermediate and output files created by the build process, such as .obj files.

    If the source folder is removed, please check if you add a custom target to your .csproj file and it will lead to clean all contents of your folder.

    In addition, you can also try to disable some third-party extensions from Extensions > Manage Extensions > Installed > select and Disable, then, relaunch your Visual Studio to check if it persists.

    Sincerely,
    Anna

    • If the answer is helpful, please click "Accept Answer" and upvote it.
      Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.