✅ please help idk what to do or what i did
Severity Code Description Project File Line Suppression State
Error Project "C:{file directory}\Directory.Build.targets" was not imported by "C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.targets" at (51,3), due to the file being invalid. ConsoleApp5 C:{file directory}\Directory.Build.targets 51
what did i do? what should i do its an error i cant code anything
what did i do? what should i do its an error i cant code anything
20 Replies
im repairing visual studio ill be be back soon and check if it worked, or even finished
it didnt
someone help
Severity Code Description Project File Line Suppression State
Error MSB4024 The imported project file "C:{directory name}\Directory.Build.targets" could not be loaded. Root element is missing. ConsoleApp5 C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.targets 51
Delete
bin
and obj
folders and rebuild the project?wdym rebulding the project
how do i do that
Just build the project
Compile it
rebuild {projectname}
??
that?
Yeah
did not work
Did you remove the
bin
and obj
folders beforehand?i now have BOTH errors
yes
this error is cross VS
i cant run anything
Does it also happen when you use the CLI?
CLI?
Command Line Inteface
dotnet build
command for example
Or dotnet run
That's, of course, assuming your project uses modern version of .NET and not some ancient .NET Framework 4.6 or something6.0
its a completely new project
all projects are voided and cannot be run, even ones that i did before
CLI should work, then
same errors
my Directory.Build.targets is empty for some reason
anyone?
My google-fu suggests complete reinstall of the SDK
but its certainly no guarantees. Might try repairing first
i repaired
didnt work
how do i reinstall the SDK?
PLEASE SOMEONE HELP
PLEASEEE
fixed it
deleted the file and it SOMEHOW worked
if it works dont ask questions