Skip to content
Sven Hübner IT
  • Home
  • Blog

msbuild

  • Home
  • Blog
  • msbuild

Gotcha with .globalconfig and Visual Studio

Posted by By sven.huebner.it April 1, 2023Posted inBuild, General Development
VS will always apply a `.globalconfig`, not just when analyzers are activated like the CLI build does. Use a different name and explicit inclusion to get consistent behavior.
Read More

Advanced MSBuild: Auto-setup test projects

Posted by By sven.huebner.it December 24, 2022Posted inBuild, General Development
You can minimize the effort of creating new test projects according to your project's conventions by defining some global default MSBuild properties. A new test project csproj will then be a five-liner consisting only of the SDK and TFM.
Read More

Advanced MSBuild: The Right Way™ of writing .props files

Posted by By sven.huebner.it December 18, 2022Posted inBuild, General Development1 Comment
Following a couple of simple rules will give you robust project/props/targets files that will just work.
Read More

Advanced MSBuild: Adding a ProjectReference sibling project to a PackageReference project

Posted by By sven.huebner.it December 3, 2022Posted inBuild, General Development1 Comment
Speed up development of dependent nuget package chains by creating sibling projects that use ProjectReference instead of PackageReference for instantaneous feedback.
Read More

Advanced MSBuild: project file as single source of truth for build and runtime

Posted by By sven.huebner.it November 19, 2022Posted inBuild, General Development
It is possible to define build parameters in a way that is accessible at runtime by declaring custom AssemblyAttribute entries in your csproj file.
Read More

Advanced MSBuild: multi-API-version compatibility without code duplication

Posted by By sven.huebner.it November 5, 2022Posted inBuild, General Development
Maintain functionality against different versions of an external library without code duplication by using preprocessor directives.
Read More

Advanced MSBuild: changing the build output directory, completely

Posted by By sven.huebner.it October 29, 2022Posted inBuild
To fully change the build output folder of a project, you need to redefine three project properties.
Read More

Advanced MSBuild: Ignoring Bitness when building Plugins

Posted by By sven.huebner.it October 21, 2022Posted inBuild, Uncategorized
When developing plugins for an application that is shipped as both 32 and 64 bit, it may be possible to publish a single artifact working with both by building as AnyCpu, ignoring the MSB3270 warning.
Read More

Advanced MSBuild: Introduction

Posted by By sven.huebner.it October 15, 2022Posted inBuild
Knowing MSBuild can help you remove code duplication, enforce consistency in a large repo and improve developer experience.
Read More

Nuget Packaging Series 2: Beware of DLL version conflicts

Posted by By sven.huebner.it July 10, 2022Posted inBuild
Putting assemblies with different TFMs in the same nuget package can lead to runtime assembly loading errors because of transitive assembly reference version conflicts.
Read More

Posts pagination

1 2 Next page
Copyright 2025 — Sven Hübner IT. All rights reserved. Sinatra WordPress Theme
Scroll to Top