Forum Discussion
PieterClaassens
Jan 14, 2026Copper Contributor
MSB4184: The expression "[System.IO.Path]::GetDirectoryName('')" cannot be evaluate
Hi got this error now after I updated my VS IDE .... The path is not of a legal form. WinFormsSQLExamplePro C:\Program Files\dotnet\sdk\10.0.102\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Wind...
Harold-Picado
Jul 19, 2026Brass Contributor
Hi, It sounds like something may have changed with the SDK rather than your project itself, especially since it started immediately after updating Visual Studio.
One thing I'd check is whether the latest .NET SDK introduced a regression. You could also try clearing the bin and obj folders, repairing Visual Studio, or temporarily using an earlier SDK (if you have one installed) to see if the issue disappears.
Also, are you targeting WinForms on .NET 10, or an earlier .NET version? That might help narrow down whether it's an SDK-specific issue.