Unturned.MSBuild 1.0.0-test4

This is a prerelease version of Unturned.MSBuild.
dotnet add package Unturned.MSBuild --version 1.0.0-test4
                    
NuGet\Install-Package Unturned.MSBuild -Version 1.0.0-test4
                    
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="Unturned.MSBuild" Version="1.0.0-test4">
  <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="Unturned.MSBuild" Version="1.0.0-test4" />
                    
Directory.Packages.props
<PackageReference Include="Unturned.MSBuild">
  <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 Unturned.MSBuild --version 1.0.0-test4
                    
#r "nuget: Unturned.MSBuild, 1.0.0-test4"
                    
#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 Unturned.MSBuild@1.0.0-test4
                    
#: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=Unturned.MSBuild&version=1.0.0-test4&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Unturned.MSBuild&version=1.0.0-test4&prerelease
                    
Install as a Cake Tool

A build-only package to add references for the Unturned, Unity, and RocketMod/LDM libraries.

Features

  • Easily reference Unturned and LDM (RocketMod) libraries.
  • Optionally copy them to your project directory allowing someone to work on the project without Unturned installed, and keep them updated simply by building the project while having Unturned installed.
  • Copies documentation from Unity installation if found.
  • Adds default global usings to improve development experience.
  • Adds #define constants for the current version of Unity.
  • Installs Microsoft.Build.CopyOnWrite to add CoW support to MSBuild for file systems that support it.
  • Directly references the game using the <Reference> item, doesn't actually contain the Unturned assemblies.

Usage


<ItemGroup>

    
    <PackageReference Include="Unturned.MSBuild" Version="1.0.0" PrivateAssets="all" />

</ItemGroup>

<ItemGroup>

    
    <UnturnedReference Include="Assembly-CSharp" />
    <UnturnedReference Include="SDG.NetTransport" />
    <UnturnedReference Include="com.rlabrecque.steamworks.net" />
    <UnturnedReference Include="UnityEngine" />
    <UnturnedReference Include="UnityEngine.CoreModule" />
    <UnturnedReference Include="UnityEngine.PhysicsModule" />
    
    
    <RocketReference Include="Rocket.API" />
    <RocketReference Include="Rocket.Core" />
    <RocketReference Include="Rocket.Unturned" />

</ItemGroup>

<PropertyGroup>

    
    <CopyUnturnedReferencesToProject>True</CopyUnturnedReferencesToProject>
    
    
    <DeleteUnusedUnturnedReferences>True</DeleteUnusedUnturnedReferences>

</PropertyGroup>

Properties

The following properties can be added to a <PropertyGroup> to modify this package's behavior.

Property Default Value Description
UnityVersion 2021.3.29f1 The version of UnityEngine to pull documentation from.
UnturnedBuild Server Whether to reference U3DS: Server, or Unturned: Client.
UnturnedReferencesCopyOutput $(MSBuildStartupDirectory)/Libraries When reference copying to project is enabled, the location where they're copied to.
CopyUnturnedReferencesToOutput False If UnturnedReferences should be copied to the output directory.
CopyUnturnedReferencesToProject False If UnturnedReferences should be copied to the repository to use as a fallback reference.
DeleteUnusedUnturnedReferences False If files in UnturnedReferencesCopyOutput that aren't referenced and are present in the game should be removed.
AddUnturnedGlobalUsings True Adds global usings for various commonly used types (see below).
UnturnedReferenceDebugLog False Logs where the package is looking for Unity and Unturned to the build output.
UnityInstallDir* OS-dependent Overrides the path of the Unity installation used to find documentation.
UnturnedInstallDir* OS-dependent Overrides the path of the referenced Unturned installation.

* If this value doesn't exist it will fallback to the default value.

Note: this library also disables AppendRuntimeIdentifierToOutputPath and AppendTargetFrameworkToOutputPath if they haven't been explicitly set (unless targeting multiple frameworks).

Items

The following items can be included in an <ItemGroup> to add references.

Item Description
UnturnedReference Adds a reference to an assembly in the Unturned_Data/Managed folder
RocketReference Adds a reference to an assembly in the Extras/Rocket.Unturned folder

Usage of the libraries referenced by this package are subject to Unturned's EULA, https://store.steampowered.com/eula/304930_eula_1, Unity's reference-only license, https://unity.com/legal/licenses/unity-reference-only-license, and any licenses of third-party libraries used by Unturned.

The content of this package (build files, etc) is licensed under the MIT license.

The shape of the MSBuild Logo used in the package image is property of Microsoft.

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
1.0.0-test4 21 8/25/2025
1.0.0-test3 138 6/29/2025
1.0.0-test2 166 4/28/2025
1.0.0-test1 148 4/28/2025