dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.44k stars 4.76k forks source link

"you must install or update .net to run this application" localization or personnalization improvements #110013

Open julienGrd opened 5 days ago

julienGrd commented 5 days ago

Hello guys, i developed a .net 9.0 winform app, published in framework dependant and targeting win-x64.

First time a user will run this app, he will have the message "you must install or update .net to run this application" to install the framework, which is good.

Problem, my app is deployed in french market, most of the user don't speak english and it seem they are scared of this message and some of them refused to go further thinking its a virus or something like that.

I was wondering if some personnalization of this window was possible, for example use the system language will be better, and even more, have the ability to decide itself which message show in the window so it could be personnalize, for example by overriding some entries in runtimeconfig.json or things like that. Overriding the logo would be nice too.

What do you think about that ? Is it something you are thinking or can be added in your roadmap ?

thanks !

dotnet-policy-service[bot] commented 5 days ago

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

dotnet-policy-service[bot] commented 5 days ago

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

colejohnson66 commented 4 days ago

Could you publish as self-contained instead?

julienGrd commented 4 days ago

Could you publish as self-contained instead?

not really, its not the idea. Actually this winform app is deployed on server environnement to be use as an installer/configurer for a asp .net server app (in .net 9.0 also)

So the idea was more to have the .net installed on the machine because the webapp will need too, otherwise i also have to make my webapp self-contained. all of this will increase a lot the size of my app (of the two apps actually).

agocke commented 3 days ago

Right now I think your options are limited to writing a custom host: https://learn.microsoft.com/en-us/dotnet/core/tutorials/netcore-hosting

However, this has come up as an issue before. @elinor-fung @vitek-karas do you know if there is an existing tracking issue?

vitek-karas commented 3 days ago

There's been something similar for self-contained: https://github.com/dotnet/runtime/issues/50081 Potentially also https://github.com/dotnet/runtime/issues/3687 - but that should not be an issue for most apps anymore.

Localization of the host has been discussed before, my understanding is that for now we decided not to do it. The proposed "Use the host's OS language" might be problematic for size - it would require the apphost to carry localization for all languages and then at runtime pick the right one.

This is also somewhat of a slippery slope - we add localization, customized messages, icons... what next? The more scalable solution would be a good example for this scenario which uses a custom host. With nethost and hostfxr the actual functional code in the custom host is about 1 page of C++, I could see us simplifying that even more by adding more helpers to nethost.