-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected warning/error MSB3202 #9986
Comments
I am also running into this issue. Turning off the "Don't call MSBuild if a project appears to be up to date" option is not an option for us. Our solution has 491 projects in it. If this option is turned off, it takes several minutes to build if no changes are made at all. Is this issue caused by a long path problem? If so, we can investigate on renaming our projects if necessary. But if LongPathsEnabled is set to 1 in the registry, there should be no issue at all. |
@drewnoakes @melytc any further thoughts or updates here? Been running into the same thing. |
There's no update here and we can't give any timeline, sorry. Any update will be posted here directly. |
@drewnoakes thanks for the update. Just wanted to check, is there any sense of what might be causing this? In particular if there's a specific length at which project file paths start becoming problematic. |
Could folks who also hit this please verify that all the workarounds listed in the issue actually prevent the error? They seem to all be tweaks to unrelated features, so I'm surprised that they'd all work as described. Maybe the problem is intermittent and some of them don't actually help. Narrowing the list down could help. That said the MSB3202 diagnostic is coming from MSBuild directly. VS uses the .NET Framework version of MSBuild, whereas Understanding if the error occurs in a VS Developer Prompt command line build would be helpful. |
@drewnoakes I can confirm setting the number of parallel project builds to 1 fixes the issue. There are several .NET Framework projects in the solution, so I can't test out with If it's any help, this error only gets logged for ~8 or so projects (out of a ~500 project solution) which seem to all have longer paths. |
Facing the same issue on MacOs and rider as well. Moving the entire directory to a simpler path solves the issue |
For some more info, this error usually seems to stem from a specific group of projects as well. The projects which throw this error (i.e. the referencing projects, not the referenced projects) all seem to be .NET Framework projects with non-SDK style .csproj files. |
That is not the case with me. Other than C++ projects, all projects are SDK-style. 1/2 of them target net48 and 1/2 target net6 (multitargeting with a single project file is not an option for us). Though it seems the ones that fail the most often with this issue are net48 targeted projects. |
From looking some more, this seems to be invoked from the _GetProjectReferenceTargetFrameworkProperties target |
There's enough signal that this isn't VS-specific, so I'm going to move this to MSBuild for further investigation. |
@drewnoakes Can you please provide a link to the issue under MSBuild so those of us interested can follow it? |
Can you elaborate on this? My read is that all of the failures are in VS. I suspect the workarounds listed are pushing more of the build out-of-proc and thus avoiding the The overall "VS should support long paths" issue is https://developercommunity.visualstudio.com/idea/351628/allow-building-running-and-debugging-a-net-applica.html. Unfortunately, I suspect the most expedient option in these cases is to shorten your paths. |
@PondPackMan2023 the issue was transferred across repos, so this is still the one to track.
I can't see how changing the degree of parallelism would be related to anything in VS, but perhaps it's changing where the build occurs, as you say. If you think any fix here would be on the project system side, please transfer back and provide some guidance, as it's not clear what we could do here. Maybe the issue needs to go to VS platform, who schedule the builds (and aren't on GitHub). |
Same issue on VS 2022 ver.17.9.6 |
Attachment
ProjectNotFound.zip
Visual Studio Version
Visual Studio 2022 (17.7.6)
Summary
..\Microsoft.Common.CurrentVersion.targets(1797,5): warning MSB3202: The project file "xxx.csproj" was not found.
Steps to Reproduce
CompanyName.OrganizationName.PackageName.Hardware
projectClass1.cs
in the projectExpected Behavior
Actual Behavior
User Impact
Notes
dotnet build
ormsbuild
command to build the project with the same steps, no warning/error MS3202 is shownMaximum number of parallel project builds
to 1, no warning/error MS3202 is shown in Visual StudioBuildInParallel
inCompanyName.OrganizationName.PackageName.Hardware
project, no warning/error MS3202 is shown in Visual StudioDon't call MSBuild if a project appears to be up to date
, no warning/error MS3202 is shown in Visual StudioDisableFastUpToDateCheck
inCompanyName.OrganizationName.PackageName.Network.Builder
andCompanyName.OrganizationName.PackageName.Network.Communication.IO
projects, no warning/error MS3202 is shown in Visual StudioLongPathsEnabled = 1
in registry does not helpThe text was updated successfully, but these errors were encountered: