VDimensions.MSBuild.Sdk.Defaults 0.7.30

dotnet add package VDimensions.MSBuild.Sdk.Defaults --version 0.7.30
                    
NuGet\Install-Package VDimensions.MSBuild.Sdk.Defaults -Version 0.7.30
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="VDimensions.MSBuild.Sdk.Defaults" Version="0.7.30">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="VDimensions.MSBuild.Sdk.Defaults" Version="0.7.30" />
                    
Directory.Packages.props
<PackageReference Include="VDimensions.MSBuild.Sdk.Defaults">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add VDimensions.MSBuild.Sdk.Defaults --version 0.7.30
                    
#r "nuget: VDimensions.MSBuild.Sdk.Defaults, 0.7.30"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package VDimensions.MSBuild.Sdk.Defaults@0.7.30
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=VDimensions.MSBuild.Sdk.Defaults&version=0.7.30
                    
Install as a Cake Addin
#tool nuget:?package=VDimensions.MSBuild.Sdk.Defaults&version=0.7.30
                    
Install as a Cake Tool

VDimensions.MSBuild.Sdk.Defaults

Introduces various defaults to MSBuild properties that are often originally unset. The defaults are described in the table below:

Property Default Value Condition
Configuration Debug is not set
Platform AnyCPU is not set
PlatformTarget AnyCPU is not set
OutputPath bin\$(Configuration) is not set
RootNamespace $(AssemblyName) is not set and $(AssemblyName) !== ''
AssemblyVersion $(Version) is not set and $(Version) !== ''
AssemblyFileVersion $(Version) is not set and $(Version) !== ''
AssemblyInformationalVersion $(Version) is not set and $(Version) !== ''
PackageVersion $(Version) is not set and $(Version) !== ''

Improved support of UNSAFE blocks trough MSBuild

I addition, the current package defines the UNSAFE preprocessor directive automatically in case the AllowUnsafeBlocks setting is enabled for the importing project, which MSBuild does not currently do by default.
This allows a developer to wrap unsafe code in #if UNSAFE/#endif preprocessor directives and play only with the AllowUnsafeBlocks flag in different build scenarios.

For example, if we want to disable unsafe code for .NETStandard1.0, we could add the following code to our project file:

<Choose>
  <When Condition=" '$(TargetFramework)' == 'netstandard1.0' ">
    <PropertyGroup>
      <AllowUnsafeBlocks></AllowUnsafeBlocks>
    </PropertyGroup>
  </When>
  <Otherwise>
    <PropertyGroup>
      <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    </PropertyGroup>
  </Otherwise>
</Choose>

As a result the UNSAFE symbol will not be added to the DefineConstants property when netstandard1.0 is being targeted, and any code inside an #if UNSAFE/#endif block will be skipped by the compiler for that particular platform.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.7.30 45 9/10/2026
0.7.26 88 9/7/2026
0.7.7 308 4/11/2026
0.7.6 279 4/11/2026
0.7.5 280 4/11/2026
0.6.12 944 2/26/2023
0.6.11 856 12/29/2022
0.6.10 826 11/9/2022
0.6.9 839 11/9/2022
0.6.8 814 11/9/2022
0.6.7 886 10/18/2022
0.6.6 897 10/18/2022
0.6.3 1,097 5/4/2021
0.6.2 822 5/3/2021
0.6.1 841 5/3/2021
0.6.0 818 5/3/2021
Loading failed