Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error Could not find a part of the path when build the testing .net core application

Tags:

c#

build

I have a testing (unit testing and integration testing) app in .net core 5,, Another explanation that I can say is that in my solution I have 3 Project , 1 for App and 2 other for testing when I build my project I get this error

when I build my project I get this error

Error Could not find a part of the path 'C:\testProject\obj\Debug\net6.0\testProject.GeneratedMSBuildEditorConfig.editorconfig'. testProject C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.Managed.Core.targets 190

Why I get this error? How can I solve this error? Thank a bunch

like image 614
md ni Avatar asked Nov 20 '25 08:11

md ni


1 Answers

The issue is that the path is very long. You can fix it by enabling "long path support". https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry

like image 182
Martin Krastev Avatar answered Nov 22 '25 20:11

Martin Krastev