Skip to content

Commit

Permalink
Added net46 target
Browse files Browse the repository at this point in the history
  • Loading branch information
CodySchrank committed Mar 6, 2018
1 parent 246ca0d commit f8efe52
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions Source/MTT/ConvertMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -364,12 +364,13 @@ private string Find(string query, ModelFile file) {

private bool isWindows() {
#if NET46
return Enviroment.OSVerison.Version.Major == "6.2" || Enviroment.OSVerison.Version.Major == "6.3"; //doesn't detect all windows but blame net46
return Environment.OSVersion.Version.Major == 6.2 || Environment.OSVersion.Version.Major == 6.3; //doesn't detect all windows but blame net46
#else
return GetOSPlatform() == OSPlatform.Windows;
#endif
}


#if !NET46
private OSPlatform GetOSPlatform() {
OSPlatform osPlatform = OSPlatform.Create("Other Platform");
// Check if it's windows
Expand All @@ -383,6 +384,7 @@ private OSPlatform GetOSPlatform() {
osPlatform = isLinux ? OSPlatform.Linux : osPlatform;
return osPlatform;
}
#endif
}

}
2 changes: 1 addition & 1 deletion Source/MTT/MTT.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard1.6;net471</TargetFrameworks>
<TargetFrameworks>netstandard1.6;net46;net471</TargetFrameworks>
<!-- makes this sample work when compiling on macOS and Linux because .NET Framework is not available -->
<TargetFrameworks Condition="$(OS) != 'Windows_NT'">netstandard1.6</TargetFrameworks>
<PackageOutputPath>$(MSBuildThisFileDirectory)..\..\artifacts\</PackageOutputPath>
Expand Down

0 comments on commit f8efe52

Please sign in to comment.