question

BarryBriggs-8818 avatar image
0 Votes"
BarryBriggs-8818 asked ·

Visual Studio Clean wiped contents of script source folder

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.

vs-generalvs-msbuild
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

AnnaXiu-MSFT avatar image
0 Votes"
AnnaXiu-MSFT answered ·

Hi @BarryBriggs-8818 ,

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.



· 4 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks Anna, appreciate the prompt response. To be clear I haven't changed the .csproj file nor do I have any extensions installed beyond those which are installed by default. I've been using Visual Studio since it came out in '97 and Microsoft compilers and tools long before that...I had a wwwroot/Scripts folder with many subfolders. The Scripts folder was not removed but everything -- subfolders and files -- beneath was removed. Seems like a bug, although I'm a little reticent to try and replicate it.

Thanks again for the response.

0 Votes 0 ·

Hi @BarryBriggs-8818, can you tell me how you execute a “Clean” command on the solution?

0 Votes 0 ·

Yep, right click on solution name and click "Clear" :-)

0 Votes 0 ·
Show more comments