Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET 8: Tidy required .json assets for apps #18597

Open
richlander opened this issue Jun 29, 2021 · 2 comments
Open

.NET 8: Tidy required .json assets for apps #18597

richlander opened this issue Jun 29, 2021 · 2 comments
Labels
untriaged Request triage from a team member
Milestone

Comments

@richlander
Copy link
Member

.NET apps have two .json files that are not important to be either loose assets or in existence at all in some scenarios.

Example:

root@d17c4ab3cf2c:/# dotnet new console -o app
The template "Console Application" was created successfully.

Processing post-creation actions...
Running 'dotnet restore' on app/app.csproj...
  Determining projects to restore...
  Restored /app/app.csproj (in 35 ms).
Restore succeeded.

root@d17c4ab3cf2c:/# cd app
root@d17c4ab3cf2c:/app# dotnet build
Microsoft (R) Build Engine version 17.0.0-preview-21302-02+018bed83d for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
  All projects are up-to-date for restore.
  You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview
  app -> /app/bin/Debug/net6.0/app.dll

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:00.58
root@d17c4ab3cf2c:/app# find . | grep Debug | grep .json
./bin/Debug/net6.0/app.runtimeconfig.json
./bin/Debug/net6.0/app.deps.json

Proposal:

  • Embed runtimeconfig.json for all apps, possibly in the app host.
  • Do not produce deps.json for RID-specific apps, at least by default.

This would result in .NET apps being two files by default (not counting the PDB). It would bring us much closer to the one-file experience we had with .NET Framework, by default. If folks wanted just one file, they could opt for framework-dependent single file.

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Request triage from a team member label Jun 29, 2021
@richlander richlander added this to the 7.0.1xx milestone Jun 29, 2021
@richlander richlander modified the milestones: 7.0.1xx, 8.0.1xx Jun 25, 2022
@richlander richlander changed the title Tidy required .json assets for apps .NET 8: Tidy required .json assets for apps Jun 25, 2022
@Nirmal4G
Copy link
Contributor

Nirmal4G commented Dec 4, 2022

Embed runtimeconfig.json for all apps, possibly in the app host.

Since the dotnet host loads both files, why not merge the schema into a single file and embed it in the App lib itself? We could call it app.run.json. If user wants to override then they can place the same file ouside with overrides and have those take effect.

@marcpopMSFT marcpopMSFT modified the milestones: 8.0.1xx, Backlog Sep 15, 2023
v-wuzhai pushed a commit that referenced this issue Apr 22, 2024
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
ViktorHofer added a commit that referenced this issue May 7, 2024
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

3 participants