Skip to content

Conversation

elinor-fung
Copy link
Member

Resolves #117682

cc @dotnet/appmodel @AaronRobinsonMSFT

@elinor-fung elinor-fung added this to the 10.0.0 milestone Jul 24, 2025
@Copilot Copilot AI review requested due to automatic review settings July 24, 2025 19:33
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a LocalPath property to both RuntimeFile and ResourceAssembly classes to support writing and reading additional path information in deps.json files. The LocalPath represents a path relative to the app/component root, while the existing Path property may be relative to different contexts like NuGet package roots.

Key changes:

  • Extended constructors to accept optional localPath parameter with backward compatibility
  • Updated JSON serialization/deserialization to handle the new localPath property
  • Comprehensive test coverage for both portable and non-portable scenarios

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
RuntimeFile.cs Added LocalPath property and constructor overload with documentation
ResourceAssembly.cs Added LocalPath property and constructor overload with documentation
DependencyContextWriter.cs Updated JSON writer to serialize LocalPath when present
DependencyContextJsonReader.cs Updated JSON reader to deserialize LocalPath and create objects with new constructor
DependencyContextStrings.cs Added LocalPathPropertyName constant
Microsoft.Extensions.DependencyModel.cs Updated reference assembly with new public API surface
DependencyContextJsonWriterTests.cs Refactored and expanded tests to cover LocalPath scenarios
DependencyContextJsonReaderTest.cs Added tests for reading LocalPath from JSON

Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-dependencymodel
See info in area-owners.md if you want to be subscribed.

@elinor-fung elinor-fung merged commit 09aa370 into dotnet:main Jul 25, 2025
87 checks passed
@elinor-fung elinor-fung deleted the depsJson-localPath branch July 25, 2025 17:43
@github-actions github-actions bot locked and limited conversation to collaborators Aug 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[API Proposal]: Add LocalPath property to RuntimeFile and ResourceAssembly in Microsoft.Extensions.DependencyModel
2 participants