Skip to content

[Breaking change]: .User file is now imported in outer builds #38792

@maridematte

Description

@maridematte

Description

Previously the SDK only imported the .user file configurations in inner builds during a cross targeted build. With dotnet/msbuild#9444 it will now also be imported on outer builds, and it may cause breaks when building projects locally.

Version

.NET 8 GA

Previous behavior

When adding a .user file for extra local configurations in builds in cross targeted builds, it only imported in inner builds. If the user defined frameworks with <TargetFramework> it would import the .user file normally. If <TargetFrameworks> (note the 's' in the end) the .user file would be imported for every internal build for each framework (even if just one was defined), but not for the outer build, which runs certain targets again.

New behavior

When using the <TargetFrameworks> tag to define targeted frame works, the build will not import the .user file on all internal builds and on the outer build.

Type of breaking change

  • Binary incompatible: Existing binaries may encounter a breaking change in behavior, such as failure to load or execute, and if so, require recompilation.
  • Source incompatible: When recompiled using the new SDK or component or to target the new runtime, existing source code may require source changes to compile successfully.
  • Behavioral change: Existing binaries may behave differently at run time.

Reason for change

The .user config file being imported in the outer build was an expected behavior in MSBuild that was not happening.

Recommended action

This change should not affect any deployments or CIs, just local builds. Review the configurations that are expected on the outer build if the extra configurations change how it is processed.

Feature area

SDK

Affected APIs

No response


Associated WorkItem - 206395

Metadata

Metadata

Assignees

Labels

🏁 Release: .NET 8Work items for the .NET 8 release📌 seQUESTeredIdentifies that an issue has been imported into Quest.breaking-changeIndicates a .NET Core breaking changein-prThis issue will be closed (fixed) by an active pull request.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions