Skip to content

Commit 727d75a

Browse files
committed
update to .NET 5 and official 64-bit
1 parent 40b7439 commit 727d75a

33 files changed

Lines changed: 192 additions & 341 deletions

build/common.targets

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<AssemblySearchPaths>$(AssemblySearchPaths);{GAC}</AssemblySearchPaths>
88

99
<!--set platform-->
10-
<DefineConstants Condition="$(OS) == 'Windows_NT'">$(DefineConstants);SMAPI_FOR_WINDOWS;SMAPI_FOR_XNA</DefineConstants>
10+
<DefineConstants Condition="$(OS) == 'Windows_NT'">$(DefineConstants);SMAPI_FOR_WINDOWS</DefineConstants>
1111
</PropertyGroup>
1212

1313
<!--find game folder-->
@@ -27,20 +27,31 @@
2727
<TranslationFiles Include="$(TargetDir)\i18n\*.json" />
2828
</ItemGroup>
2929

30-
<Copy SourceFiles="$(TargetDir)\$(TargetName).exe" DestinationFolder="$(GamePath)" />
30+
<!-- SMAPI -->
31+
<Copy SourceFiles="$(TargetDir)\$(TargetName).dll" DestinationFolder="$(GamePath)" />
32+
<Copy SourceFiles="$(TargetDir)\$(TargetName).exe" DestinationFolder="$(GamePath)" Condition="$(OS) == 'Windows_NT'" />
33+
<Copy SourceFiles="$(TargetDir)\$(TargetName)" DestinationFolder="$(GamePath)" Condition="$(OS) != 'Windows_NT'" />
3134
<Copy SourceFiles="$(TargetDir)\$(TargetName).pdb" DestinationFolder="$(GamePath)" />
3235
<Copy SourceFiles="$(TargetDir)\$(TargetName).xml" DestinationFolder="$(GamePath)" />
3336
<Copy SourceFiles="$(TargetDir)\SMAPI.config.json" DestinationFiles="$(GamePath)\smapi-internal\config.json" />
3437
<Copy SourceFiles="$(TargetDir)\SMAPI.metadata.json" DestinationFiles="$(GamePath)\smapi-internal\metadata.json" />
38+
<Copy SourceFiles="$(TargetDir)\Newtonsoft.Json.dll" DestinationFolder="$(GamePath)\smapi-internal" />
39+
<Copy SourceFiles="$(TargetDir)\TMXTile.dll" DestinationFolder="$(GamePath)\smapi-internal" />
40+
<Copy SourceFiles="@(TranslationFiles)" DestinationFolder="$(GamePath)\smapi-internal\i18n" />
41+
42+
<!-- Harmony + dependencies -->
3543
<Copy SourceFiles="$(TargetDir)\0Harmony.dll" DestinationFolder="$(GamePath)\smapi-internal" />
3644
<Copy SourceFiles="$(TargetDir)\0Harmony.xml" DestinationFolder="$(GamePath)\smapi-internal" />
3745
<Copy SourceFiles="$(TargetDir)\Mono.Cecil.dll" DestinationFolder="$(GamePath)\smapi-internal" />
3846
<Copy SourceFiles="$(TargetDir)\Mono.Cecil.Mdb.dll" DestinationFolder="$(GamePath)\smapi-internal" />
3947
<Copy SourceFiles="$(TargetDir)\Mono.Cecil.Pdb.dll" DestinationFolder="$(GamePath)\smapi-internal" />
4048
<Copy SourceFiles="$(TargetDir)\MonoMod.Common.dll" DestinationFolder="$(GamePath)\smapi-internal" />
41-
<Copy SourceFiles="$(TargetDir)\Newtonsoft.Json.dll" DestinationFolder="$(GamePath)\smapi-internal" />
42-
<Copy SourceFiles="$(TargetDir)\TMXTile.dll" DestinationFolder="$(GamePath)\smapi-internal" />
43-
<Copy SourceFiles="@(TranslationFiles)" DestinationFolder="$(GamePath)\smapi-internal\i18n" />
49+
50+
<!-- .NET dependencies -->
51+
<Copy SourceFiles="$(TargetDir)\System.Configuration.ConfigurationManager.dll" DestinationFolder="$(GamePath)\smapi-internal" />
52+
<Copy SourceFiles="$(TargetDir)\System.Management.dll" DestinationFolder="$(GamePath)\smapi-internal" Condition="$(OS) == 'Windows_NT'" />
53+
<Copy SourceFiles="$(TargetDir)\System.Runtime.Caching.dll" DestinationFolder="$(GamePath)\smapi-internal" />
54+
<Copy SourceFiles="$(TargetDir)\System.Security.Permissions.dll" DestinationFolder="$(GamePath)\smapi-internal" />
4455
</Target>
4556

4657
<Target Name="CopyDefaultMods" Condition="'$(MSBuildProjectName)' == 'SMAPI.Mods.ConsoleCommands' OR '$(MSBuildProjectName)' == 'SMAPI.Mods.ErrorHandler' OR '$(MSBuildProjectName)' == 'SMAPI.Mods.SaveBackup'">
@@ -54,13 +65,13 @@
5465
<Copy SourceFiles="@(TranslationFiles)" DestinationFolder="$(GamePath)\Mods\$(AssemblyName)\i18n" />
5566
</Target>
5667

57-
<Target Name="CopyToolkit" Condition="'$(MSBuildProjectName)' == 'SMAPI.Toolkit' AND $(TargetFramework) == 'net452'" AfterTargets="PostBuildEvent">
68+
<Target Name="CopyToolkit" Condition="'$(MSBuildProjectName)' == 'SMAPI.Toolkit'" AfterTargets="PostBuildEvent">
5869
<Copy SourceFiles="$(TargetDir)\$(TargetName).dll" DestinationFolder="$(GamePath)\smapi-internal" />
5970
<Copy SourceFiles="$(TargetDir)\$(TargetName).pdb" DestinationFolder="$(GamePath)\smapi-internal" />
6071
<Copy SourceFiles="$(TargetDir)\$(TargetName).xml" DestinationFolder="$(GamePath)\smapi-internal" />
6172
</Target>
6273

63-
<Target Name="CopyToolkitCoreInterfaces" Condition="'$(MSBuildProjectName)' == 'SMAPI.Toolkit.CoreInterfaces' AND $(TargetFramework) == 'net452'" AfterTargets="PostBuildEvent">
74+
<Target Name="CopyToolkitCoreInterfaces" Condition="'$(MSBuildProjectName)' == 'SMAPI.Toolkit.CoreInterfaces'" AfterTargets="PostBuildEvent">
6475
<Copy SourceFiles="$(TargetDir)\$(TargetName).dll" DestinationFolder="$(GamePath)\smapi-internal" />
6576
<Copy SourceFiles="$(TargetDir)\$(TargetName).pdb" DestinationFolder="$(GamePath)\smapi-internal" />
6677
<Copy SourceFiles="$(TargetDir)\$(TargetName).xml" DestinationFolder="$(GamePath)\smapi-internal" />

build/prepare-install-package.targets

Lines changed: 23 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<OutRootPath>$(SolutionDir)\..\bin</OutRootPath>
1515

1616
<SmapiBin>$(BuildRootPath)\SMAPI\bin\$(Configuration)</SmapiBin>
17-
<ToolkitBin>$(BuildRootPath)\SMAPI.Toolkit\bin\$(Configuration)\net452</ToolkitBin>
17+
<ToolkitBin>$(BuildRootPath)\SMAPI.Toolkit\bin\$(Configuration)\net5.0</ToolkitBin>
1818
<ConsoleCommandsBin>$(BuildRootPath)\SMAPI.Mods.ConsoleCommands\bin\$(Configuration)</ConsoleCommandsBin>
1919
<ErrorHandlerBin>$(BuildRootPath)\SMAPI.Mods.ErrorHandler\bin\$(Configuration)</ErrorHandlerBin>
2020
<SaveBackupBin>$(BuildRootPath)\SMAPI.Mods.SaveBackup\bin\$(Configuration)</SaveBackupBin>
@@ -35,12 +35,17 @@
3535
<Copy SourceFiles="$(TargetDir)\assets\unix-install.sh" DestinationFiles="$(PackagePath)\install on Linux.sh" />
3636
<Copy SourceFiles="$(TargetDir)\assets\unix-install.sh" DestinationFiles="$(PackagePath)\install on macOS.command" />
3737
<Copy SourceFiles="$(TargetDir)\assets\windows-install.bat" DestinationFiles="$(PackagePath)\install on Windows.bat" />
38-
<Copy SourceFiles="$(TargetDir)\assets\README.txt" DestinationFiles="$(PackagePath)\README.txt" />
39-
<Copy SourceFiles="$(TargetDir)\$(TargetName).exe" DestinationFiles="$(PackagePath)\internal\$(PlatformName)-install.exe" />
40-
<Copy Condition="$(PlatformName) == 'windows'" SourceFiles="$(TargetDir)\assets\windows-exe-config.xml" DestinationFiles="$(PackagePath)\internal\$(PlatformName)-install.exe.config" />
38+
<Copy SourceFiles="$(TargetDir)\assets\README.txt" DestinationFolder="$(PackagePath)" />
39+
<Copy SourceFiles="$(TargetDir)\$(TargetName).dll" DestinationFolder="$(PackagePath)\internal" />
40+
<Copy SourceFiles="$(TargetDir)\$(TargetName).exe" DestinationFiles="$(PackagePath)\internal\$(PlatformName)-install.exe" Condition="$(PlatformName) == 'windows'" />
41+
<Copy SourceFiles="$(TargetDir)\$(TargetName)" DestinationFiles="$(PackagePath)\internal\$(PlatformName)-install" Condition="$(PlatformName) != 'windows'" />
42+
<Copy SourceFiles="$(TargetDir)\$(TargetName).runtimeconfig.json" DestinationFolder="$(PackagePath)\internal" />
43+
<Copy SourceFiles="$(TargetDir)\assets\windows-exe-config.xml" DestinationFiles="$(PackagePath)\internal\$(PlatformName)-install.exe.config" Condition="$(PlatformName) == 'windows'" />
4144

4245
<!--copy bundle files-->
43-
<Copy SourceFiles="$(SmapiBin)\StardewModdingAPI.exe" DestinationFolder="$(PackagePath)\bundle" />
46+
<Copy SourceFiles="$(SmapiBin)\StardewModdingAPI.dll" DestinationFolder="$(PackagePath)\bundle" />
47+
<Copy SourceFiles="$(SmapiBin)\StardewModdingAPI.exe" DestinationFolder="$(PackagePath)\bundle" Condition="$(PlatformName) == 'windows'" />
48+
<Copy SourceFiles="$(SmapiBin)\StardewModdingAPI" DestinationFolder="$(PackagePath)\bundle" Condition="$(PlatformName) != 'windows'" />
4449
<Copy SourceFiles="$(SmapiBin)\StardewModdingAPI.pdb" DestinationFolder="$(PackagePath)\bundle" />
4550
<Copy SourceFiles="$(SmapiBin)\StardewModdingAPI.xml" DestinationFolder="$(PackagePath)\bundle" />
4651
<Copy SourceFiles="$(SmapiBin)\steam_appid.txt" DestinationFolder="$(PackagePath)\bundle" />
@@ -61,11 +66,16 @@
6166
<Copy SourceFiles="$(ToolkitBin)\SMAPI.Toolkit.CoreInterfaces.pdb" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
6267
<Copy SourceFiles="$(ToolkitBin)\SMAPI.Toolkit.CoreInterfaces.xml" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
6368
<Copy SourceFiles="@(TranslationFiles)" DestinationFolder="$(PackagePath)\bundle\smapi-internal\i18n" />
64-
<Copy Condition="$(PlatformName) == 'unix'" SourceFiles="$(TargetDir)\assets\unix-launcher.sh" DestinationFiles="$(PackagePath)\bundle\StardewModdingAPI" />
65-
<Copy Condition="$(PlatformName) == 'unix'" SourceFiles="$(SmapiBin)\System.Numerics.dll" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
69+
<Copy Condition="$(PlatformName) == 'unix'" SourceFiles="$(TargetDir)\assets\unix-launcher.sh" DestinationFolder="$(PackagePath)\bundle" />
6670
<Copy Condition="$(PlatformName) == 'unix'" SourceFiles="$(SmapiBin)\System.Runtime.Caching.dll" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
6771
<Copy Condition="$(PlatformName) == 'windows'" SourceFiles="$(TargetDir)\assets\windows-exe-config.xml" DestinationFiles="$(PackagePath)\bundle\StardewModdingAPI.exe.config" />
6872

73+
<!-- copy .NET dependencies -->
74+
<Copy SourceFiles="$(SmapiBin)\System.Configuration.ConfigurationManager.dll" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
75+
<Copy SourceFiles="$(SmapiBin)\System.Management.dll" DestinationFolder="$(PackagePath)\bundle\smapi-internal" Condition="$(PlatformName) == 'windows'" />
76+
<Copy SourceFiles="$(SmapiBin)\System.Runtime.Caching.dll" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
77+
<Copy SourceFiles="$(SmapiBin)\System.Security.Permissions.dll" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
78+
6979
<!--copy bundled mods-->
7080
<Copy SourceFiles="$(ConsoleCommandsBin)\ConsoleCommands.dll" DestinationFolder="$(PackagePath)\bundle\Mods\ConsoleCommands" />
7181
<Copy SourceFiles="$(ConsoleCommandsBin)\ConsoleCommands.pdb" DestinationFolder="$(PackagePath)\bundle\Mods\ConsoleCommands" />
@@ -78,63 +88,33 @@
7888
<Copy SourceFiles="$(SaveBackupBin)\SaveBackup.pdb" DestinationFolder="$(PackagePath)\bundle\Mods\SaveBackup" />
7989
<Copy SourceFiles="$(SaveBackupBin)\manifest.json" DestinationFolder="$(PackagePath)\bundle\Mods\SaveBackup" />
8090

81-
<!-- fix errors on Linux/macOS (sample: https://smapi.io/log/mMdFUpgB) -->
82-
<Copy Condition="$(PlatformName) == 'unix'" SourceFiles="$(TargetDir)\assets\System.Numerics.dll" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
83-
<Copy Condition="$(PlatformName) == 'unix'" SourceFiles="$(TargetDir)\assets\System.Runtime.Caching.dll" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
84-
8591
<!-- fix Linux/macOS permissions -->
86-
<Exec Condition="$(PlatformName) == 'unix'" Command="chmod 755 &quot;$(PackagePath)\install on Linux.sh&quot;" />
87-
<Exec Condition="$(PlatformName) == 'unix'" Command="chmod 755 &quot;$(PackagePath)\install on macOS.command&quot;" />
92+
<Exec Condition="$(PlatformName) == 'unix'" Command="chmod 755 &quot;$(PackagePath)/install on Linux.sh&quot;" />
93+
<Exec Condition="$(PlatformName) == 'unix'" Command="chmod 755 &quot;$(PackagePath)/install on macOS.command&quot;" />
94+
<Exec Condition="$(PlatformName) == 'unix'" Command="chmod 755 &quot;$(PackagePath)/bundle/unix-launcher.sh&quot;" />
8895

8996
<!-- finalise 'for developers' installer -->
9097
<ItemGroup>
9198
<PackageFiles Include="$(PackagePath)\**\*.*" />
9299
</ItemGroup>
93100
<Copy SourceFiles="@(PackageFiles)" DestinationFolder="$(PackageDevPath)\%(RecursiveDir)" />
94-
<ZipDirectory FromDirPath="$(PackageDevPath)\bundle" ToFilePath="$(PackageDevPath)\internal\$(PlatformName)-install.dat" />
101+
<ZipDirectory SourceDirectory="$(PackageDevPath)\bundle" DestinationFile="$(PackageDevPath)\internal\$(PlatformName)-install.dat" />
95102
<RemoveDir Directories="$(PackageDevPath)\bundle" />
96103

97104
<!-- finalise normal installer -->
98105
<ReplaceFileText FilePath="$(PackagePath)\bundle\smapi-internal\config.json" Search="&quot;DeveloperMode&quot;: true" Replace="&quot;DeveloperMode&quot;: false" />
99-
<ZipDirectory FromDirPath="$(PackagePath)\bundle" ToFilePath="$(PackagePath)\internal\$(PlatformName)-install.dat" />
106+
<ZipDirectory SourceDirectory="$(PackagePath)\bundle" DestinationFile="$(PackagePath)\internal\$(PlatformName)-install.dat" />
100107
<RemoveDir Directories="$(PackagePath)\bundle" />
101108
</Target>
102109

103-
<!-- Create a zip file with the contents of a given folder path. Derived from https://stackoverflow.com/a/38127938/262123. -->
104-
<UsingTask TaskName="ZipDirectory" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v12.0.dll">
105-
<ParameterGroup>
106-
<FromDirPath ParameterType="System.String" Required="true" />
107-
<ToFilePath ParameterType="System.String" Required="true" />
108-
</ParameterGroup>
109-
<Task>
110-
<Reference Include="System.IO.Compression.FileSystem" />
111-
<Using Namespace="System.IO.Compression" />
112-
<Code Type="Fragment" Language="cs">
113-
<![CDATA[
114-
try
115-
{
116-
ZipFile.CreateFromDirectory(FromDirPath, ToFilePath);
117-
return true;
118-
}
119-
catch(Exception ex)
120-
{
121-
Log.LogErrorFromException(ex);
122-
return false;
123-
}
124-
]]>
125-
</Code>
126-
</Task>
127-
</UsingTask>
128-
129110
<!-- Replace text in a file based on a regex pattern. Derived from https://stackoverflow.com/a/22571621/262123. -->
130-
<UsingTask TaskName="ReplaceFileText" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
111+
<UsingTask TaskName="ReplaceFileText" TaskFactory="RoslynCodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
131112
<ParameterGroup>
132113
<FilePath ParameterType="System.String" Required="true" />
133114
<Search ParameterType="System.String" Required="true" />
134115
<Replace ParameterType="System.String" Required="true" />
135116
</ParameterGroup>
136117
<Task>
137-
<Reference Include="System.Core" />
138118
<Using Namespace="System" />
139119
<Using Namespace="System.IO" />
140120
<Using Namespace="System.Text.RegularExpressions" />

docs/release-notes.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,22 @@
33
# Release notes
44
## Upcoming release
55
* For players:
6+
* Updated for Stardew Valley 1.5.5.
67
* Added `set_farm_type` [console command](https://stardewvalleywiki.com/Modding:Console_commands#Console_commands) to change the current farm type.
78

9+
* For mod authors:
10+
* Migrated to 64-bit MonoGame and .NET 5 on all platforms (see [migration guide for mod authors](https://stardewvalleywiki.com/Modding:Migrate_to_Stardew_Valley_1.5.5)).
11+
12+
**Update note for players with older systems:**
13+
The game now has two branches: the _main branch_ which you'll get by default, and an optional
14+
_compatibility branch_ for [older systems](https://www.stardewvalley.net/compatibility/). The two
15+
branches have identical content, but use [different technologies](https://stardewvalleywiki.com/Modding:Migrate_to_Stardew_Valley_1.5.5#Stardew_Valley_compatibility_branch).
16+
17+
Unfortunately **SMAPI only supports the main branch of the game**. There are formidable difficulties
18+
across all mods in supporting all three variations, the [Steam hardware stats](https://store.steampowered.com/hwsurvey)
19+
show that 99.69% of players have 64-bit, and 32-bit imposes significant restrictions on what mods
20+
can do.
21+
822
* For the web UI:
923
* Updated the JSON validator/schema for Content Patcher 1.24.0.
1024

docs/technical/mod-package.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@ when you compile it.
366366

367367
## Release notes
368368
## Upcoming release
369+
* Updated for Stardew Valley 1.5.5 and SMAPI 3.13.0. **The older versions are no longer supported.**
369370
* Improved analyzer performance by enabling parallel execution.
370371

371372
## 3.3.0

docs/technical/web.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ accordingly.
367367
Initial setup:
368368

369369
1. Create an Azure Blob storage account for uploaded files.
370-
2. Create an Azure App Services environment running the latest .NET Core on Linux or Windows.
370+
2. Create an Azure App Services environment running the latest .NET on Linux or Windows.
371371
3. Add these application settings in the new App Services environment:
372372

373373
property name | description

src/SMAPI.Installer/Framework/InstallerContext.cs

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
using System;
21
using System.IO;
3-
using Microsoft.Win32;
42
using StardewModdingAPI.Toolkit;
53
using StardewModdingAPI.Toolkit.Framework.GameScanning;
64
using StardewModdingAPI.Toolkit.Utilities;
@@ -13,9 +11,6 @@ internal class InstallerContext
1311
/*********
1412
** Fields
1513
*********/
16-
/// <summary>The <see cref="Environment.OSVersion"/> value that represents Windows 7.</summary>
17-
private readonly Version Windows7Version = new Version(6, 1);
18-
1914
/// <summary>The underlying toolkit game scanner.</summary>
2015
private readonly GameScanner GameScanner = new GameScanner();
2116

@@ -29,9 +24,6 @@ internal class InstallerContext
2924
/// <summary>The human-readable OS name and version.</summary>
3025
public string PlatformName { get; }
3126

32-
/// <summary>The name of the Stardew Valley executable.</summary>
33-
public string ExecutableName { get; }
34-
3527
/// <summary>Whether the installer is running on Windows.</summary>
3628
public bool IsWindows => this.Platform == Platform.Windows;
3729

@@ -47,7 +39,6 @@ public InstallerContext()
4739
{
4840
this.Platform = EnvironmentUtility.DetectPlatform();
4941
this.PlatformName = EnvironmentUtility.GetFriendlyPlatformName(this.Platform);
50-
this.ExecutableName = EnvironmentUtility.GetExecutableName(this.Platform);
5142
}
5243

5344
/// <summary>Get the installer's version number.</summary>
@@ -57,42 +48,6 @@ public ISemanticVersion GetInstallerVersion()
5748
return new SemanticVersion(raw);
5849
}
5950

60-
/// <summary>Get whether the current system has .NET Framework 4.5 or later installed. This only applies on Windows.</summary>
61-
/// <exception cref="NotSupportedException">The current platform is not Windows.</exception>
62-
public bool HasNetFramework45()
63-
{
64-
switch (this.Platform)
65-
{
66-
case Platform.Windows:
67-
using (RegistryKey versionKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32).OpenSubKey(@"SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full"))
68-
return versionKey?.GetValue("Release") != null; // .NET Framework 4.5+
69-
70-
default:
71-
throw new NotSupportedException("The installed .NET Framework version can only be checked on Windows.");
72-
}
73-
}
74-
75-
/// <summary>Get whether the current system has XNA Framework installed. This only applies on Windows.</summary>
76-
/// <exception cref="NotSupportedException">The current platform is not Windows.</exception>
77-
public bool HasXna()
78-
{
79-
switch (this.Platform)
80-
{
81-
case Platform.Windows:
82-
using (RegistryKey key = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32).OpenSubKey(@"SOFTWARE\Microsoft\XNA\Framework"))
83-
return key != null; // XNA Framework 4.0+
84-
85-
default:
86-
throw new NotSupportedException("The installed XNA Framework version can only be checked on Windows.");
87-
}
88-
}
89-
90-
/// <summary>Whether the current OS supports newer versions of .NET Framework.</summary>
91-
public bool CanInstallLatestNetFramework()
92-
{
93-
return Environment.OSVersion.Version >= this.Windows7Version; // Windows 7+
94-
}
95-
9651
/// <summary>Get whether a folder seems to contain the game files.</summary>
9752
/// <param name="dir">The folder to check.</param>
9853
public bool LooksLikeGameFolder(DirectoryInfo dir)

0 commit comments

Comments
 (0)