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
2 changes: 1 addition & 1 deletion .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.5
TEMPLATE_VERSION: 3.8.6

on:
push:
Expand Down
21 changes: 20 additions & 1 deletion CSharp/MonoGame.Templates.CSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
<NoWarn>NU5128</NoWarn>
</PropertyGroup>

<PropertyGroup>
<MonoGameVersion Condition="'$(MonoGameVersion)' == ''">$(Version)</MonoGameVersion>
</PropertyGroup>

<ItemGroup>
<Content Include="content\**\*" Exclude="content\**\.DS_Store;content\**\bin;content\**\obj" />
<Compile Remove="**\*" />
Expand All @@ -26,9 +30,24 @@

<Target Name="SetMGPackageReferenceVersions" BeforeTargets="CoreBuild">
<ItemGroup>
<MGProjects Include="**\*.csproj" />
<MGProjects Include="content\**\*.csproj" />
</ItemGroup>

<XmlPoke
XmlInputPath="%(MGProjects.Identity)"
Query="/Project/ItemGroup/PackageReference[starts-with(@Include, 'MonoGame.Framework')]/@Version"
Value="$(MonoGameVersion)" />

<XmlPoke
XmlInputPath="%(MGProjects.Identity)"
Query="/Project/ItemGroup/PackageReference[starts-with(@Include, 'MonoGame.Runtime')]/@Version"
Value="$(MonoGameVersion)" />

<XmlPoke
XmlInputPath="%(MGProjects.Identity)"
Query="/Project/ItemGroup/PackageReference[starts-with(@Include, 'MonoGame.Content')]/@Version"
Value="$(MonoGameVersion)" />

<ItemGroup>
<MGToolManifest Include="**\.config\dotnet-tools.json" />
</ItemGroup>
Expand Down