Skip to content

Commit

Permalink
Updated to net8
Browse files Browse the repository at this point in the history
  • Loading branch information
Apostolique committed Nov 22, 2023
1 parent a75acb2 commit b2523d8
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 28 deletions.
6 changes: 3 additions & 3 deletions Source/Full/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"request": "launch",
"preLaunchTask": "buildDesktopGL",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/Platforms/DesktopGL/bin/Debug/net6/GameName.dll",
"program": "${workspaceFolder}/Platforms/DesktopGL/bin/Debug/net8/GameName.dll",
"args": [],
"cwd": "${workspaceFolder}/Platforms/DesktopGL",
// For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window
Expand All @@ -23,7 +23,7 @@
"request": "launch",
"preLaunchTask": "buildWindowsDX",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/Platforms/WindowsDX/bin/Debug/net6-windows/GameName.dll",
"program": "${workspaceFolder}/Platforms/WindowsDX/bin/Debug/net8-windows/GameName.dll",
"args": [],
"cwd": "${workspaceFolder}/Platforms/WindowsDX",
// For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window
Expand All @@ -36,7 +36,7 @@
"request": "launch",
"preLaunchTask": "buildPipeline",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/Platforms/Pipeline/bin/Debug/net6/Pipeline.dll",
"program": "${workspaceFolder}/Platforms/Pipeline/bin/Debug/net8/Pipeline.dll",
"args": ["-i", "Game/Assets", "-r", "Platforms/Pipeline/bin", "-o", "Assets", "-l", "Game/Layer1"],
"cwd": "${workspaceFolder}",
// For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window
Expand Down
10 changes: 3 additions & 7 deletions Source/Full/Game/Layer1/GameRoot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
namespace GameProject {
public class GameRoot : Game {
public GameRoot() {
_graphics = new GraphicsDeviceManager(this);
_graphics.GraphicsProfile = GraphicsProfile.HiDef;
_graphics = new GraphicsDeviceManager(this) {
GraphicsProfile = GraphicsProfile.HiDef
};
IsMouseVisible = true;
Content.RootDirectory = "Content";

Expand Down Expand Up @@ -190,10 +191,5 @@ private void RestoreWindow() {
new KeyboardCondition(Keys.Enter)
);
ICondition _toggleBorderless = new KeyboardCondition(Keys.F11);

private static JsonSerializerOptions _options = new JsonSerializerOptions {
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
WriteIndented = true,
};
}
}
2 changes: 1 addition & 1 deletion Source/Full/Game/Layer1/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class Settings {
public bool IsBorderless { get; set; } = false;
}

[JsonSourceGenerationOptionsAttribute(
[JsonSourceGenerationOptions(
PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase,
WriteIndented = true)]
[JsonSerializable(typeof(Settings))]
Expand Down
4 changes: 2 additions & 2 deletions Source/Full/Platforms/DesktopGL/DesktopGL.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6</TargetFramework>
<TargetFramework>net8</TargetFramework>
<AssemblyName>GameName</AssemblyName>
<ApplicationIcon>Icon.ico</ApplicationIcon>
<ApplicationManifest>app.manifest</ApplicationManifest>
<MonoGamePlatform>DesktopGl</MonoGamePlatform>
<PublishTrimmed>true</PublishTrimmed>
<PublishReadyToRun>false</PublishReadyToRun>
<TieredCompilation>false</TieredCompilation>
<RuntimeIdentifiers>win10-x64;linux-x64;osx-x64</RuntimeIdentifiers>
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Source/Full/Platforms/Pipeline/Pipeline.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6</TargetFramework>
<TargetFramework>net8</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Source/Full/Platforms/WindowsDX/WindowsDX.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6-windows</TargetFramework>
<TargetFramework>net8-windows</TargetFramework>
<AssemblyName>GameName</AssemblyName>
<ApplicationIcon>Icon.ico</ApplicationIcon>
<ApplicationManifest>app.manifest</ApplicationManifest>
Expand Down
4 changes: 2 additions & 2 deletions Source/Simple/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"request": "launch",
"preLaunchTask": "buildDesktopGL",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/Platforms/DesktopGL/bin/Debug/net6/GameName.dll",
"program": "${workspaceFolder}/Platforms/DesktopGL/bin/Debug/net8/GameName.dll",
"args": [],
"cwd": "${workspaceFolder}/Platforms/DesktopGL",
// For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window
Expand All @@ -23,7 +23,7 @@
"request": "launch",
"preLaunchTask": "buildWindowsDX",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/Platforms/WindowsDX/bin/Debug/net6-windows/GameName.dll",
"program": "${workspaceFolder}/Platforms/WindowsDX/bin/Debug/net8-windows/GameName.dll",
"args": [],
"cwd": "${workspaceFolder}/Platforms/WindowsDX",
// For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window
Expand Down
10 changes: 3 additions & 7 deletions Source/Simple/Game/GameRoot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
namespace GameProject {
public class GameRoot : Game {
public GameRoot() {
_graphics = new GraphicsDeviceManager(this);
_graphics.GraphicsProfile = GraphicsProfile.HiDef;
_graphics = new GraphicsDeviceManager(this) {
GraphicsProfile = GraphicsProfile.HiDef
};
IsMouseVisible = true;
Content.RootDirectory = "Content";

Expand Down Expand Up @@ -190,10 +191,5 @@ private void RestoreWindow() {
new KeyboardCondition(Keys.Enter)
);
ICondition _toggleBorderless = new KeyboardCondition(Keys.F11);

private static JsonSerializerOptions _options = new JsonSerializerOptions {
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
WriteIndented = true,
};
}
}
2 changes: 1 addition & 1 deletion Source/Simple/Game/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class Settings {
public bool IsBorderless { get; set; } = false;
}

[JsonSourceGenerationOptionsAttribute(
[JsonSourceGenerationOptions(
PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase,
WriteIndented = true)]
[JsonSerializable(typeof(Settings))]
Expand Down
4 changes: 2 additions & 2 deletions Source/Simple/Platforms/DesktopGL/DesktopGL.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6</TargetFramework>
<TargetFramework>net8</TargetFramework>
<AssemblyName>GameName</AssemblyName>
<ApplicationIcon>Icon.ico</ApplicationIcon>
<ApplicationManifest>app.manifest</ApplicationManifest>
<MonoGamePlatform>DesktopGl</MonoGamePlatform>
<PublishTrimmed>true</PublishTrimmed>
<PublishReadyToRun>false</PublishReadyToRun>
<TieredCompilation>false</TieredCompilation>
<RuntimeIdentifiers>win10-x64;linux-x64;osx-x64</RuntimeIdentifiers>
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Source/Simple/Platforms/WindowsDX/WindowsDX.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6-windows</TargetFramework>
<TargetFramework>net8-windows</TargetFramework>
<AssemblyName>GameName</AssemblyName>
<ApplicationIcon>Icon.ico</ApplicationIcon>
<ApplicationManifest>app.manifest</ApplicationManifest>
Expand Down

0 comments on commit b2523d8

Please sign in to comment.