<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Dheeraj Awale</title>
    <description>The latest articles on DEV Community by Dheeraj Awale (@hridaymardam).</description>
    <link>https://dev.to/hridaymardam</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1179949%2Fa5441f10-a55f-4f03-89df-59443075d835.png</url>
      <title>DEV Community: Dheeraj Awale</title>
      <link>https://dev.to/hridaymardam</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hridaymardam"/>
    <language>en</language>
    <item>
      <title>Load assembly at runtime with .Net 6*</title>
      <dc:creator>Dheeraj Awale</dc:creator>
      <pubDate>Thu, 15 Feb 2024 11:15:13 +0000</pubDate>
      <link>https://dev.to/hridaymardam/load-assembly-at-runtime-with-net-6-2pn6</link>
      <guid>https://dev.to/hridaymardam/load-assembly-at-runtime-with-net-6-2pn6</guid>
      <description>&lt;p&gt;Back in the days of .Net framework it was straight forward to load assemblies at runtime using ‘System.Reflection’ library.&lt;br&gt;
When platform independent .Net Core was introduced, it came with lot of new approaches and designs that broke conventional implementations. Loading runtime assemblies was one of them.&lt;/p&gt;

&lt;p&gt;I spent good amount of time on figuring out a generic way of achieving this and implemented a reusable &amp;amp; simple open-source library. This library is tested on .Net 6, .Net 7 &amp;amp; .Net 8.&lt;br&gt;
Library location: &lt;a href="https://github.com/dheerajawale-svg/dynamic-dependency-loader"&gt;https://github.com/dheerajawale-svg/dynamic-dependency-loader&lt;/a&gt;&lt;br&gt;
Nuget package: &lt;a href="https://www.nuget.org/packages/DynamicDependencyLoader"&gt;https://www.nuget.org/packages/DynamicDependencyLoader&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Here is the explanation and reasoning of the library.
&lt;/h2&gt;

&lt;p&gt;If you are using .Net core (3.1, 6, 8 etc.) for development, you must have come across *.deps.json.&lt;/p&gt;

&lt;p&gt;There were reasons to get rid of the old ways to introduce *.deps.json.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Platform Independent deployment: New Self-contained deployment does not rely on any shared components to be present on the target system whether it is Linux or Windows or others. &lt;/li&gt;
&lt;li&gt;Efficient resource management: This file not only describes your dependencies packages but also helps to solve the dependency hell.&lt;/li&gt;
&lt;li&gt;Easier to manage: the deps.json file defines a list of dependencies that can be dynamically linked. Normally, this file is machine-generated, and can get really big and complicated for a real-world app. But it’s plaintext, so we can craft it with just an editor.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As mentioned above, .NET Core can be configured to dynamically load assemblies from multiple locations. &lt;br&gt;
These locations include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;App base directory (in the same folder as the entry point application, no config required)&lt;/li&gt;
&lt;li&gt;Package cache folders (NuGet restore cache or NuGet fallback folders)&lt;/li&gt;
&lt;li&gt;An optimized package cache or runtime packages store&lt;/li&gt;
&lt;li&gt;The servicing index (rarely used. For Windows Update purposes.)&lt;/li&gt;
&lt;li&gt;Shared framework (configured via runtimeconfig.json)&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webapi</category>
      <category>dotnetcore</category>
      <category>opensource</category>
      <category>assembly</category>
    </item>
  </channel>
</rss>
