<?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: pupsette</title>
    <description>The latest articles on DEV Community by pupsette (@pupsette).</description>
    <link>https://dev.to/pupsette</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%2F314920%2F0136bfc1-bf41-4976-af91-5213942f3ba0.png</url>
      <title>DEV Community: pupsette</title>
      <link>https://dev.to/pupsette</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pupsette"/>
    <language>en</language>
    <item>
      <title>Embedding C# libraries as source code</title>
      <dc:creator>pupsette</dc:creator>
      <pubDate>Sat, 11 Jan 2020 21:45:25 +0000</pubDate>
      <link>https://dev.to/pupsette/embedding-c-libraries-as-source-code-25n1</link>
      <guid>https://dev.to/pupsette/embedding-c-libraries-as-source-code-25n1</guid>
      <description>&lt;p&gt;Hi,&lt;br&gt;
I stumbled upon conflicting dll dependencies several times now, and I was wondering how often others do experience the following case:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;There is .NET Lib 'A' (e.g.: well-known JSON.Net)&lt;/li&gt;
&lt;li&gt;There is .NET Lib 'B' using Lib 'A' (e.g.: Configuration Manager)&lt;/li&gt;
&lt;li&gt;There is .NET App 'C' using Lib 'A' and Lib 'B'&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The problem arises, when the used versions of Lib 'A' differ for Lib 'B' and the application in an incompatible way.&lt;/p&gt;

&lt;p&gt;There are ways to have two different versions of the same .NET library around, but I did not find this to be convenient/safe.&lt;/p&gt;

&lt;p&gt;My proposal for those problems: Why not share Lib 'A' as source code? Different versions of the source code would be compiled directly into Lib 'B' and the application.&lt;/p&gt;

&lt;p&gt;I did that for my project and wrote a &lt;a href="https://github.com/pupsette/CompactJson"&gt;compact JSON serializer&lt;/a&gt;. Nuget allows packaging sources, which are added to your C# project conveniently.&lt;/p&gt;

&lt;p&gt;I think, this is a nice and clean solution. But still I haven't found many others complaining about conflicting dll dependencies as much as I do. Also, I did not see &lt;em&gt;C# source code packages&lt;/em&gt; in general to become very popular. I was wondering, if I missed the down-side.&lt;/p&gt;

&lt;p&gt;So, I'm interested in your thoughts. Thanks!&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>dotnet</category>
      <category>json</category>
    </item>
  </channel>
</rss>
