Skip to content

Add proposal for apps resolving a deployed shared set of dependencies#371

Open
elinor-fung wants to merge 2 commits into
dotnet:mainfrom
elinor-fung:shared-dependencies-set
Open

Add proposal for apps resolving a deployed shared set of dependencies#371
elinor-fung wants to merge 2 commits into
dotnet:mainfrom
elinor-fung:shared-dependencies-set

Conversation

@elinor-fung

@elinor-fung elinor-fung commented Jun 29, 2026

Copy link
Copy Markdown
Member

- The host merges each shared set's `deps.json` into the app's dependencies at startup. The shared set is treated as part of the app, so it resolves with the same priority as assets directly in the app's `deps.json` (that is, before frameworks). This is similar to an [additional `deps.json` via `--additional-deps`/`DOTNET_ADDITIONAL_DEPS`](https://github.com/dotnet/runtime/blob/main/docs/design/features/additional-deps.md).
- The assets in a shared set's `deps.json` are resolved relative to that `deps.json`'s folder (`/opt/AppSuite.Shared/` in the above example). The presence of `sharedDependencies` does not trigger file existence checks at startup. This differs from `--additional-deps`/`DOTNET_ADDITIONAL_DEPS`, which resolves an additional deps file's assets relative to the app directory and enables those file existence checks.

### Developer experience

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I just kind of put something that somewhat made sense to me here. Happy to pull in whatever experience others folks think makes more sense.

@marcpopMSFT

Copy link
Copy Markdown
Member

CC @nkolev92 @aortiz-msft as the External feature from NuGet fits with this feature.

<!-- SharedDependencyLocation metadata (no copy-local + emits the entry) -->
<ItemGroup>
<ProjectReference Include="../AppSuite.Shared/AppSuite.Shared.csproj"
SharedDependencyLocation="/opt/AppSuite.Shared/" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If we had External=True from nuget, would I assume you wouldn't use SharedDependencyLocation on any packagereference?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

That seems like it would fit. What is the mechanism for run time resolution for External=True? Is there a doc around that feature we can link to?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I asked @nkolev92 offline if he could add more details and share any specs they might have with you. We should update this design to include an example using that new feature once we have the details.

Comment thread proposed/shared-dependencies-across-applications.md Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants