Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This article describes the MSB4252 error code.
Message text
MSB4252: Project 'project-name' with global properties ('property-list') is building project 'project-dependency-name' with global properties ('property-list') with the ('target-name') target(s) but the build result for the built project is not in the engine cache. In isolated builds this could mean one of the following: - the reference was called with a target which is not specified in the ProjectReferenceTargets item in project 'project-name' - the reference was called with global properties that do not match the static graph inferred nodes - the reference was not explicitly specified as a ProjectReference item in project 'project-name'
Description
Isolated mode, enabled by the -isolateProjects
switch, enforces strict isolation between project builds. It only applies to graph builds.
This error occurs when you're doing a graph build in isolated mode, but a situation was encountered that couldn't be resolved under the constraints of isolated mode. Isolated mode relies on being able to traverse the project dependencies statically, before the build starts. However, certain constructs that are allowed in MSBuild project files violate this constraint, and if they're encountered, this error is given.
Resolution
Not all projects support isolated mode. The error text gives several conditions that, if present, mean a project can't be built in isolated mode. If you encounter this error and don't require isolated mode, remove the -isolateProjects
command-line option.
If the projects mentioned in the error message are under your control, determine which of the mentioned cases are relevant to your situation, and make appropriate changes to the references to avoid the violations.
Applies to
All versions of MSBuild