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

Feature Request: Add a dotnet root path property to the runtimeconfig.json file. #102329

Closed
BillArmstrong opened this issue May 16, 2024 · 3 comments

Comments

@BillArmstrong
Copy link

We have developed an application that has multiple DotNet console applications that reside in multiple folders. We want our application to be deployed with minimal system changes or prerequisites. As such we publish each of our projects with the "--self-contained true" option. As a result, our deployment package is larger than we would like.

To minimize the size of our deployment package, I've changed the publish option to "--self-contained false" on each application and included the dotnet runtime binaries in a "runtime" folder at the root of our installation package. I need all of the applications to load the runtime from that location.

I know that I can set the DOTNET_ROOT environment variable to accomplish this, but I don't want to make any global system changes. It would be great if we could add the dotnet root folder as a relative path in the runtimeconfig.json file of each application.

The approach that I'm currently taking is to create my own host executable in C++ that will load the hostfxr.dll file in our runtime folder and make the hostfxr_main_startupinfo call needed to execute our application. Being able to specify the root path in the config file would have saved me from having to do this.

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label May 16, 2024
Copy link
Contributor

Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov
See info in area-owners.md if you want to be subscribed.

@vitek-karas
Copy link
Member

This has been discussed several times, and there's some good ideas for a solution, just nothing implemented yet.
Very similar proposal: #64430
Broader design discussion: #71282

@agocke
Copy link
Member

agocke commented May 17, 2024

Closing as duplicate.

@agocke agocke closed this as not planned Won't fix, can't repro, duplicate, stale May 17, 2024
@dotnet-policy-service dotnet-policy-service bot removed the untriaged New issue has not been triaged by the area owner label May 17, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jun 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

No branches or pull requests

3 participants