Skip to content

[Placeholder] Change in deps.json impacting single file applications #20376

@marcpopMSFT

Description

@marcpopMSFT

PublishDepsFilePath behavior changed due to single file application support

Version introduced

.NET Core SDK 5.0.100

Old behavior

The MSBuild PublishDepsFilePath property would be the path to the app's deps.json path in the output directory for non single-file applications, and it would be a path in the intermediate directory for single file apps.

New behavior

The PublishDepsFilePath is empty for single file applications and a new IntermediateDepsFilePath specifies the deps.json location in the intermediate directory. Additionally, for non single-file applications, the deps.json file may not be copied to the output directory (the path specified by PublishDepsFilePath) until later in the build.

Reason for change

Partly this was due a refactoring of the publish logic in order to support improved single file apps in .NET 5.

Additionally, the PublishDepsFilePath property is empty for single file apps to help guard against targets that are supposed to rewrite the deps.json file doing so after the deps.json has already been bundled, thus silently not affecting the app.

Recommended action

Targets that rewrite the deps.json file should generally do so using the IntermediateDepsFilePath property.

More details

Discussion of these changes can be found in the following PRs:

dotnet/sdk#11462
dotnet/sdk#11527


Issue metadata

  • Issue type: breaking-change

Metadata

Metadata

Assignees

Labels

🏁 Release: .NET 5Work items for the .NET 5 releasebreaking-changeIndicates a .NET Core breaking change

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions