DEV Community

Mikey Was Here... AKA Schmidty
Mikey Was Here... AKA Schmidty

Posted on

Automate those pesky copyright dates in your csproj files.

Just add this bit of xml to somewhere near the top of the csproj file.

<PropertyGroup>
    <!-- dynamic -->
    <Year>$([System.DateTime]::Now.Year.ToString())</Year>
</PropertyGroup>
Enter fullscreen mode Exit fullscreen mode

In the section where the Copyright tag is change that to

<PropertyGroup>
    <Copyright>Company Name (c) $(Year) All Rights Reserved</Copyright>
Enter fullscreen mode Exit fullscreen mode

There you go - no more annoying check ins to update the copyright date, ever.

Easy Peasy

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.

Top comments (0)

AWS GenAI LIVE image

How is generative AI increasing efficiency?

Join AWS GenAI LIVE! to find out how gen AI is reshaping productivity, streamlining processes, and driving innovation.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay