Building SEMusicBoxMaker

# Building SEMusicBoxMaker

This page explains how to compile SEMusicBoxMaker into a single Windows executable.

## Recommended command

From the project folder:

«`powershell
cd N:MODSSE1SEMusicBoxMaker
«`

Publish a self-contained single-file Windows EXE:

«`powershell
dotnet publish .srcNordVader.SpaceEngineers.MusicBoxMakerNordVader.SpaceEngineers.MusicBoxMaker.csproj `
-c Release `
-r win-x64 `
—self-contained true `
-p:PublishSingleFile=true `
-p:IncludeNativeLibrariesForSelfExtract=true `
-p:EnableCompressionInSingleFile=true `
-p:DebugType=None `
-p:DebugSymbols=false `
-o .publishSEMusicBoxMaker-win-x64
«`

The output will be in:

«`text
N:MODSSE1SEMusicBoxMakerpublishSEMusicBoxMaker-win-x64
«`

The executable will be named similar to:

«`text
NordVader.SpaceEngineers.MusicBoxMaker.exe
«`

You can rename it to:

«`text
SEMusicBoxMaker.exe
«`

## Smaller build

This variant is smaller, but requires the user to have the correct .NET Runtime installed:

«`powershell
dotnet publish .srcNordVader.SpaceEngineers.MusicBoxMakerNordVader.SpaceEngineers.MusicBoxMaker.csproj `
-c Release `
-r win-x64 `
—self-contained false `
-p:PublishSingleFile=true `
-p:DebugType=None `
-p:DebugSymbols=false `
-o .publishSEMusicBoxMaker-win-x64-small
«`

For public distribution, use the self-contained version.

## Notes

Do not hardcode single-file publish settings into the project file unless you are sure you want them for every Release build.

Keeping the settings in the publish command avoids breaking Debug builds in Visual Studio.