Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Visual Studio Project Templates
env:
TEMPLATE_VERSION: 3.8.4
TEMPLATE_VERSION: 3.8.5

on:
push:
Expand All @@ -18,13 +18,13 @@ jobs:

steps:
- name: Checkout current repo
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
path: main
submodules: true

- name: Setup .NET 8.0.x & 9.0.x
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
8.0.x
Expand All @@ -35,7 +35,7 @@ jobs:
run: dotnet pack main/CSharp/MonoGame.Templates.CSharp.csproj -p:Configuration=Release /p:Version=${{ ENV.TEMPLATE_VERSION }}

- name: Upload Template Nugets
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: MonoGame.Templates.CSharp.${{ ENV.TEMPLATE_VERSION }}
path: 'Artifacts/MonoGame.Templates.CSharp/**/*.nupkg'
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,31 @@
"isRoot": true,
"tools": {
"dotnet-mgcb": {
"version": "3.8.4",
"version": "3.8.5",
"commands": [
"mgcb"
]
},
"dotnet-mgcb-editor": {
"version": "3.8.4",
"version": "3.8.5",
"commands": [
"mgcb-editor"
]
},
"dotnet-mgcb-editor-linux": {
"version": "3.8.4",
"version": "3.8.5",
"commands": [
"mgcb-editor-linux"
]
},
"dotnet-mgcb-editor-windows": {
"version": "3.8.4",
"version": "3.8.5",
"commands": [
"mgcb-editor-windows"
]
},
"dotnet-mgcb-editor-mac": {
"version": "3.8.4",
"version": "3.8.5",
"commands": [
"mgcb-editor-mac"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,31 @@
"isRoot": true,
"tools": {
"dotnet-mgcb": {
"version": "3.8.4",
"version": "3.8.5",
"commands": [
"mgcb"
]
},
"dotnet-mgcb-editor": {
"version": "3.8.4",
"version": "3.8.5",
"commands": [
"mgcb-editor"
]
},
"dotnet-mgcb-editor-linux": {
"version": "3.8.4",
"version": "3.8.5",
"commands": [
"mgcb-editor-linux"
]
},
"dotnet-mgcb-editor-windows": {
"version": "3.8.4",
"version": "3.8.5",
"commands": [
"mgcb-editor-windows"
]
},
"dotnet-mgcb-editor-mac": {
"version": "3.8.4",
"version": "3.8.5",
"commands": [
"mgcb-editor-mac"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,31 @@
"isRoot": true,
"tools": {
"dotnet-mgcb": {
"version": "3.8.4",
"version": "3.8.5",
"commands": [
"mgcb"
]
},
"dotnet-mgcb-editor": {
"version": "3.8.4",
"version": "3.8.5",
"commands": [
"mgcb-editor"
]
},
"dotnet-mgcb-editor-linux": {
"version": "3.8.4",
"version": "3.8.5",
"commands": [
"mgcb-editor-linux"
]
},
"dotnet-mgcb-editor-windows": {
"version": "3.8.4",
"version": "3.8.5",
"commands": [
"mgcb-editor-windows"
]
},
"dotnet-mgcb-editor-mac": {
"version": "3.8.4",
"version": "3.8.5",
"commands": [
"mgcb-editor-mac"
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-mgcb": {
"version": "3.8.5",
"commands": [
"mgcb"
]
},
"dotnet-mgcb-editor": {
"version": "3.8.5",
"commands": [
"mgcb-editor"
]
},
"dotnet-mgcb-editor-linux": {
"version": "3.8.5",
"commands": [
"mgcb-editor-linux"
]
},
"dotnet-mgcb-editor-windows": {
"version": "3.8.5",
"commands": [
"mgcb-editor-windows"
]
},
"dotnet-mgcb-editor-mac": {
"version": "3.8.5",
"commands": [
"mgcb-editor-mac"
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"author": "MonoGame Foundation",
"classifications": [
"MonoGame", "Games", "Desktop", "Windows", "Linux", "macOS"
],
"name": "MonoGame Cross-Platform Vulkan Desktop Application",
"groupIdentity": "MonoGame.Application.DesktopVK",
"identity": "MonoGame.Application.DesktopVK.CSharp",
"shortName": "mgdesktopvk",
"tags": {
"language": "C#",
"type": "project"
},
"primaryOutputs": [
{
"path": "MGNamespace.csproj"
}
],
"sourceName": "MGNamespace",
"preferNameDirectory": "true",
"description": "A MonoGame game project for Windows, Linux and macOS using Vulkan.",
"postActions": [
{
"description": "Restore NuGet packages required by this project.",
"manualInstructions": [
{
"text": "Run 'dotnet restore'"
}
],
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
"continueOnError": true
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "C#: MGNamespace Debug",
"type": "dotnet",
"request": "launch",
"projectPath": "${workspaceFolder}/MGNamespace.csproj"
}
],
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

#----------------------------- Global Properties ----------------------------#

/outputDir:bin/$(Platform)
/intermediateDir:obj/$(Platform)
/platform:DesktopGL
/config:
/profile:Reach
/compress:False

#-------------------------------- References --------------------------------#


#---------------------------------- Content ---------------------------------#

51 changes: 51 additions & 0 deletions CSharp/content/MonoGame.Application.DesktopVK.CSharp/Game1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;

namespace MGNamespace;

public class Game1 : Game
{
private GraphicsDeviceManager _graphics;
private SpriteBatch _spriteBatch;

public Game1()
{
_graphics = new GraphicsDeviceManager(this);
Content.RootDirectory = "Content";
IsMouseVisible = true;
}

protected override void Initialize()
{
// TODO: Add your initialization logic here

base.Initialize();
}

protected override void LoadContent()
{
_spriteBatch = new SpriteBatch(GraphicsDevice);

// TODO: use this.Content to load your game content here
}

protected override void Update(GameTime gameTime)
{
if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
Exit();

// TODO: Add your update logic here

base.Update(gameTime);
}

protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Clear(Color.CornflowerBlue);

// TODO: Add your drawing code here

base.Draw(gameTime);
}
}
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<RollForward>Major</RollForward>
<PublishReadyToRun>false</PublishReadyToRun>
<TieredCompilation>false</TieredCompilation>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
<ApplicationIcon>Icon.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<None Remove="Icon.ico" />
<None Remove="Icon.bmp" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Icon.ico">
<LogicalName>Icon.ico</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="Icon.bmp">
<LogicalName>Icon.bmp</LogicalName>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<PackageReference Include="MonoGame.Framework.Native" Version="3.8.5-preview.*" />
<PackageReference Include="MonoGame.Runtime.Windows.Vulkan" Version="3.8.5-preview.*" />
<PackageReference Include="MonoGame.Runtime.Mac.Vulkan" Version="3.8.5-preview.*" />
<PackageReference Include="MonoGame.Runtime.Linux.Vulkan" Version="3.8.5-preview.*" />
<PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.*" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
using var game = new MGNamespace.Game1();
game.Run();
43 changes: 43 additions & 0 deletions CSharp/content/MonoGame.Application.DesktopVK.CSharp/app.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="MGNamespace"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>

<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- A list of the Windows versions that this application has been tested on and is
is designed to work with. Uncomment the appropriate elements and Windows will
automatically selected the most compatible environment. -->

<!-- Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />

<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />

<!-- Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />

<!-- Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />

<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />

</application>
</compatibility>

<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">permonitorv2,permonitor</dpiAwareness>
</windowsSettings>
</application>

</assembly>
Loading