|
|
@@ -14,13 +14,27 @@ When you're ready to publish your game, create a release build from Visual Studi
|
|
|
|
|
|
Your project opens in Visual Studio.
|
|
|
|
|
|
-4. In Visual Studio, from the **Solution Configurations** drop-down menu, select **Release**.
|
|
|
+4. In Visual Studio, from the **Solution Explorer** right click your Windows project and select **Publish**
|
|
|
|
|
|
- 
|
|
|
+ 
|
|
|
|
|
|
-5. From the **Solution platforms** drop-down menu, select the platform you want to create a build for.
|
|
|
+5. Select the **Target** **Folder** in the publish window.
|
|
|
|
|
|
- 
|
|
|
+6. Select the **Specified target** **Folder** again.
|
|
|
+
|
|
|
+7. Confirm the output folder and Click **Finish**.
|
|
|
+
|
|
|
+8. You should now see the **Publish** view where you can manage the project export settings.
|
|
|
+
|
|
|
+ 
|
|
|
+
|
|
|
+9. Finally you can click publish and see your project in the output folder you selected at **step 6**
|
|
|
+
|
|
|
+ Optionally you can also include the .NET runtime in your exported game to reduce a dependancy on the user.
|
|
|
+
|
|
|
+ Select **Show all settings** -> **Deployment mode** -> **Self-contained** -> **Save**
|
|
|
+
|
|
|
+ 
|
|
|
|
|
|
>[!Note]
|
|
|
>
|
|
|
@@ -28,22 +42,39 @@ When you're ready to publish your game, create a release build from Visual Studi
|
|
|
>
|
|
|
>To build for Android or iOS, you need Xamarin, which is included with Visual Studio licenses. For instructions about how to install Xamarin with Visual Studio 2017, see [this MSDN page](https://docs.microsoft.com/en-us/visualstudio/cross-platform/setup-and-install).
|
|
|
|
|
|
-6. Under **Build**, select **Build solution**.
|
|
|
+10. Under **Build**, select **Publish Selection** and click the **Publish** button.
|
|
|
|
|
|
- 
|
|
|
+ 
|
|
|
|
|
|
- Visual Studio creates a release build in your project bin folder (eg *MyGame/Bin/MyPlatform/Release*).
|
|
|
+ Visual Studio creates a release build in your selected output folder.
|
|
|
|
|
|
> [!Tip]
|
|
|
> You might want to rename the **Release** folder to something more descriptive (such as the title of your game).
|
|
|
|
|
|
### To build using terminal instead of Visual Studio
|
|
|
|
|
|
- 1. You would need to install Visual Studio to get **Developer Command Prompt for Visual Studio (Version)**
|
|
|
- 2. In Developer Command Prompt for Visual Studio
|
|
|
- 3. ```console
|
|
|
- C:\User> msbuild PathToSln\NameOfProject.sln /p:Configuration=Release /p:OutputPath=YourPreferredPath
|
|
|
- ```
|
|
|
+ 1. Ensure the relevant .NET SDK is installed (Stride 4.2 is on .NET 8)
|
|
|
+ 2. open the folder of your project where the *.Windows.csproj file sits.
|
|
|
+
|
|
|
+ 
|
|
|
+
|
|
|
+ 3. Type `cmd` in the search bar to open the folder easily in terminal.
|
|
|
+
|
|
|
+ 
|
|
|
+
|
|
|
+ 4. finally publish with the command
|
|
|
+
|
|
|
+ ```
|
|
|
+ dotnet publish
|
|
|
+ ```
|
|
|
+
|
|
|
+ or the below to include the .NET runtime with your game
|
|
|
+
|
|
|
+ ```
|
|
|
+ dotnet publish -r win-x64 --self-contained true --framework net8.0-windows
|
|
|
+ ```
|
|
|
+
|
|
|
+ You can also append `--output <YOUR_EXPORT_FOLDER>` to specify where to export to.
|
|
|
|
|
|
## 2. Delete unnecessary files
|
|
|
|
|
|
@@ -65,7 +96,7 @@ After you create a release build, how you distribute it is up to you.
|
|
|
|
|
|
To run games made with Stride on Windows, users need:
|
|
|
|
|
|
-* .NET 8 SDK
|
|
|
+* .NET 8 SDK (Unless you published with **self-contained**)
|
|
|
|
|
|
* DirectX11 (included with Windows 10 and later), OpenGL, or Vulkan
|
|
|
|
|
|
@@ -76,3 +107,5 @@ To run games made with Stride on Windows, users need:
|
|
|
* [Add or remove a platform](../platforms/add-or-remove-a-platform.md)
|
|
|
* [Version control](version-control.md)
|
|
|
* [Project structure](project-structure.md)
|
|
|
+
|
|
|
+* [Microsoft documentation](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-publish)
|