MSB4018: The task failed unexpectedly

jonny22

Member
Joined
May 14, 2022
Messages
23
Programming Experience
1-3
Hi, after reinstalling Visual Studio, I get the error in question by recompiling a program that I had previously written and that worked correctly.
At the same time it is also reported that the "AssemblyInfo.cs" file is not found
I tried to reset visual studio and update packages but i can't fix the problem, does anyone know how to fix it?
 
Possible, when VS goes awry with a project the first step should be Clean Solution from Build meny, then rebuild.

You could even delete the bin and obj folders when VS is not started, then open VS and rebuild the solution. obj is where VS puts temporary build files, bin contains build output. Except things you or the program may have put in output folder everything in bin+obj is generated based on project source files.
 
Hi, thanks for your feedback, I uninstalled VS using dedicated program uninstaller software, then re-downloaded VS installer and reinstalled, during the installation it asked what to install and I chose .NET for console applications, then next to the right there were other things to download on which there was no check, some it was clear they weren't needed others I wasn't sure, so I put the check on all and downloaded everything, then I restarted, and now it works and compile without the errors from before.
 
Back
Top Bottom