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

Readme Specifies Non-Optimal CsProj property for Dynamic Loading #1

Closed
Sewer56 opened this issue Feb 12, 2022 · 1 comment
Closed

Comments

@Sewer56
Copy link

Sewer56 commented Feb 12, 2022

In short:

In the usage section of your library, you specify the usage of the GenerateRuntimeConfigurationFiles to ensure that loadable assemblies are created. While this works, the advised property to set for end users is instead EnableDynamicLoading property.

vivaldi_zy6XQyuCOA

Or to quote Mr Vitek Karas, one of the .NET Runtime developers.

In the readme for this project there's a section about troubleshooting - specifically the case of a classlib which doesn't have .runtimeconfig.json by default. Starting with recent .NET Core 3.0 previews (8 for sure, probably earlier) the right way to mark a classlib as a component which will be dynamically loaded is to add <EnableDynamicLoading>true</EnableDynamicLoading> to the project.

Under the hood it does currently set the GenerateRuntimeConfigurationFiles but this may change in the future.

(original text)

A few years ago I made the same mistake too, albeit all of the new properties weren't yet fully documented then.

@Sewer56 Sewer56 changed the title Readme Specifies Incorrect CsProj property for Dynamic Loading Readme Specifies Non-Optimal CsProj property for Dynamic Loading Feb 12, 2022
@chyyran
Copy link
Member

chyyran commented Feb 15, 2022

Thanks for pointing this out. Fixed in 0a6bf78

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

No branches or pull requests

2 participants