question

BrettOssman-6893 avatar image
0 Votes"
BrettOssman-6893 asked bhargaviannadevara-msft edited

Dynamic Assembly References at Runtime

UPDATE:
I found the ability to do assemblyBinding based on the framework version.
Now curious if there a way to specify a range of versions, rather than a specific one?

I had a case where I needed to reference specific assemblies at runtime. I added the following section to the app.config file. However, a client upgraded to a newer version of the CRL (4.8). Apparently, this caused a conflict with the config section. Is there a way to dynamically reference DLLs (assemblies) based on CLR version?

<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.SqlServer.Types" publicKeyToken="89845dcd8080cc91" culture="neutral"/>
<codeBase version="14.0.0.0" href="<interface path>/Microsoft/Version 14_0_0_0/Microsoft.SqlServer.Types.dll"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.ReportViewer.Common" publicKeyToken="89845dcd8080cc91" culture="neutral"/>
<codeBase version="15.0.0.0" href="<interface path>/Microsoft/Version 15_0_0_0/Microsoft.ReportViewer.Common.DLL"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.ReportViewer.ProcessingObjectModel" publicKeyToken="89845dcd8080cc91" culture="neutral"/>
<codeBase version="15.0.0.0" href="<interface path>/Microsoft/Version 15_0_0_0/Microsoft.ReportViewer.ProcessingObjectModel.dll"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.ReportViewer.WinForms" publicKeyToken="89845dcd8080cc91" culture="neutral"/>
<codeBase version="15.0.0.0" href="<interface path>/Microsoft/Version 15_0_0_0/Microsoft.ReportViewer.Winforms.DLL"/>
</dependentAssembly>
</assemblyBinding>
</runtime>

dotnet-runtime
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

What were the "edits" to this post?

0 Votes 0 ·

@BrettOssman-6893 Thanks for reaching out. Please note that the azure-app-configuration tag is applicable only to questions related to the Azure App Configuration service. We've adjusted the tags on the question since we want to make sure you get assistance from the right experts on this topic.

1 Vote 1 ·

0 Answers