<?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: Mikey Was Here... AKA Schmidty</title>
    <description>The latest articles on DEV Community by Mikey Was Here... AKA Schmidty (@michaelrschmidt).</description>
    <link>https://dev.to/michaelrschmidt</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%2F400549%2F16a7ae67-209d-4e38-be27-3a30fb9d282e.jpg</url>
      <title>DEV Community: Mikey Was Here... AKA Schmidty</title>
      <link>https://dev.to/michaelrschmidt</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/michaelrschmidt"/>
    <language>en</language>
    <item>
      <title>Automate those pesky copyright dates in your csproj files.</title>
      <dc:creator>Mikey Was Here... AKA Schmidty</dc:creator>
      <pubDate>Wed, 10 Jan 2024 19:06:05 +0000</pubDate>
      <link>https://dev.to/michaelrschmidt/automate-those-pesky-copyright-dates-in-your-csproj-files-8dj</link>
      <guid>https://dev.to/michaelrschmidt/automate-those-pesky-copyright-dates-in-your-csproj-files-8dj</guid>
      <description>&lt;p&gt;Just add this bit of xml to somewhere near the top of the csproj file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;PropertyGroup&amp;gt;&lt;/span&gt;
    &lt;span class="c"&gt;&amp;lt;!-- dynamic --&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;Year&amp;gt;&lt;/span&gt;$([System.DateTime]::Now.Year.ToString())&lt;span class="nt"&gt;&amp;lt;/Year&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/PropertyGroup&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the section where the Copyright tag is change that to&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;PropertyGroup&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;Copyright&amp;gt;&lt;/span&gt;Company Name (c) $(Year) All Rights Reserved&lt;span class="nt"&gt;&amp;lt;/Copyright&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There you go - no more annoying check ins to update the copyright date, ever.&lt;/p&gt;

&lt;p&gt;Easy Peasy&lt;/p&gt;

&lt;p&gt;I am not a lawyer. I do not play a lawyer on the Internet or anywhere for that matter. This notice may not be the exact notice you need to be legally covered.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Automate the authors of a Nuget package during the build process.</title>
      <dc:creator>Mikey Was Here... AKA Schmidty</dc:creator>
      <pubDate>Wed, 10 Jan 2024 18:56:56 +0000</pubDate>
      <link>https://dev.to/michaelrschmidt/automate-the-authors-of-a-nuget-package-during-the-build-process-5cnp</link>
      <guid>https://dev.to/michaelrschmidt/automate-the-authors-of-a-nuget-package-during-the-build-process-5cnp</guid>
      <description>&lt;p&gt;It's very simple.&lt;/p&gt;

&lt;p&gt;create a get_authors.sh (Mine is in the root but could also be a folder for build scripts. That's probably where I will put it when I create an example to go with this post.&lt;/p&gt;

&lt;p&gt;One line of code in get_authors.sh script file - I tried to put the code in the csproj but because of the percent symbol it was easier to put it in a script.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git log &lt;span class="nt"&gt;--format&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'%ae'&lt;/span&gt; | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-v&lt;/span&gt; noreply | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-v&lt;/span&gt; outlift | &lt;span class="nb"&gt;sort&lt;/span&gt; &lt;span class="nt"&gt;-u&lt;/span&gt; | &lt;span class="nb"&gt;tr&lt;/span&gt; &lt;span class="s1"&gt;'\n'&lt;/span&gt; &lt;span class="s1"&gt;', '&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;then add this fragment to your csproj file somewhere near the top&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;    &lt;span class="nt"&gt;&amp;lt;Target&lt;/span&gt; &lt;span class="na"&gt;Name=&lt;/span&gt;&lt;span class="s"&gt;"SetAuthors"&lt;/span&gt; &lt;span class="na"&gt;BeforeTargets=&lt;/span&gt;&lt;span class="s"&gt;"InitializeSourceControlInformation"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;Exec&lt;/span&gt; &lt;span class="na"&gt;Command=&lt;/span&gt;&lt;span class="s"&gt;"bash ../get_authors.sh"&lt;/span&gt; &lt;span class="na"&gt;ConsoleToMSBuild=&lt;/span&gt;&lt;span class="s"&gt;"True"&lt;/span&gt; &lt;span class="na"&gt;IgnoreExitCode=&lt;/span&gt;&lt;span class="s"&gt;"False"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;Output&lt;/span&gt; &lt;span class="na"&gt;PropertyName=&lt;/span&gt;&lt;span class="s"&gt;"Authors"&lt;/span&gt; &lt;span class="na"&gt;TaskParameter=&lt;/span&gt;&lt;span class="s"&gt;"ConsoleOutput"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/Exec&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/Target&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the section where the Authors tag is change that to&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;    &lt;span class="nt"&gt;&amp;lt;PropertyGroup&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;Authors&amp;gt;&lt;/span&gt;$(Authors)&lt;span class="nt"&gt;&amp;lt;/Authors&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the Nuget package Authors value is always up to date.&lt;/p&gt;

&lt;p&gt;Easy peasy.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
