Visual Studio command created code that had a Virus
In Visual Studio(I found out there are two versions, its named “Visual Studio Code”), in the terminal, I entered the command: “dotnet new console -o ./CsharpProjects/TestProject” as required by a course I am doing. It created some folders and code files, when typing “dotnet build” it was loading for a while and then my Norton Security gave me an alert saying it blocked a file called TestProject.dll. The TestProject.dll file had a threat called “Win32:TrojanX-gen [Trj]” and that it was a Trojan Horse. Now the file is gone and running “dotnet build” gives the error: CSC : error CS2012: Cannot open ‘C:\Users\Kenne\OneDrive\Desktop\CsharpProjects\TestProject\obj\Debug\net9.0\refint\TestProject.dll’ for writing — ‘Access to the path ‘C:\Users\Kenne\OneDrive\Desktop\CsharpProjects\TestProject\obj\Debug\net9.0\refint\TestProject.dll’ is denied.’
Is there a way to run the command dotnet build without that file? Or is it possible to get a version of that file that does not contain a Trojan Horse? since the file already exists I cannot re-enter “dotnet new console -o ./CsharpProjects/TestProject”
Read more here: Source link
