Posts

Showing posts with the label Custom Build

Maintaining AssemblyInfo for multiple projects

Image
When you are developing an application or manly a NuGet package, you might want to keep the same AssemblyInfo for all your packages, which involves updating each project when you want to publish a new version of your package according to the SemVer convention Semantic Versioning 2.0.0 | Semantic Versioning . In order to make it easier, with the improvements of dotnet core and the new csproj syntax, which I strongly recommend, MSBuild 15 introduced a pretty cool feature: Solution-wide project properties with Directory.Build.props Customize your build - Visual Studio | Microsoft Docs . Basically, this allows you to define certain properties and use them in all your project in a centralised way, so you don't have to update your projects one by one. All you have to do is create a new text file named Directory.Build.props and place it where you have your solution file. Here is an example of the properties you can use: ‍<Project>   <PropertyGroup>     <Version