From fe5501e5b748cb1ed132938dc62f6bb3c213d311 Mon Sep 17 00:00:00 2001 From: Virgile Bello Date: Wed, 11 Nov 2020 11:32:10 +0100 Subject: [PATCH] [Build] Switch to .NET 5.0 (fixes #912) --- build/Stride.Launcher.Build.props | 2 +- .../Stride.Core.Assets.CompilerApp.targets | 5 +++-- .../Stride.Core.Assets.CompilerApp/global.json | 2 +- .../PackageSessionPublicHelper.cs | 2 +- .../assets/Stride.Core.Packages/NugetStore.cs | 17 ----------------- .../Stride.Core.Packages.csproj | 4 ++-- .../Stride.Core.Design.csproj | 2 +- .../TypeConverters/Half2Converter.cs | 1 + .../TypeConverters/Half3Converter.cs | 1 + .../TypeConverters/Half4Converter.cs | 1 + .../TypeConverters/HalfConverter.cs | 1 + sources/core/Stride.Core/Stride.Core.csproj | 1 + .../editor/Stride.Assets.Presentation/Module.cs | 2 +- .../Stride.Assets.Presentation.csproj | 1 + .../$ProjectName$.csproj.t4 | 2 +- .../$ProjectName$.csproj.t4 | 2 +- .../Stride.GameStudio/Stride.GameStudio.csproj | 3 ++- sources/editor/Stride.GameStudio/global.json | 2 +- sources/engine/Stride.Assets/StrideConfig.cs | 4 ++-- sources/engine/Stride.Games/Stride.Games.csproj | 2 +- sources/engine/Stride.Input/IGamePadDevice.cs | 4 ++-- sources/engine/Stride.Input/IMouseDevice.cs | 4 ++-- sources/engine/Stride.Input/Stride.Input.csproj | 4 ++-- .../VirtualButton/VirtualButton.Pointer.cs | 2 +- sources/launcher/Stride.Launcher/Launcher.cs | 2 -- .../PublishProfiles/FolderProfile.pubxml | 2 +- .../Services/LauncherSettings.cs | 2 +- .../Stride.Launcher/Stride.Launcher.csproj | 2 +- .../Stride.Launcher/Stride.Launcher.nuspec | 2 +- .../NuGetAssemblyResolver.cs | 15 +++++++++++++++ .../SplashScreenWindow.xaml.cs | 1 - .../Stride.NuGetResolver.projitems | 2 +- sources/targets/Stride.Core.Cpp.props | 6 +++--- ...tride.Core.PostSettings.Dependencies.targets | 5 ++++- .../Stride.Core.TargetFrameworks.Editor.props | 2 +- sources/targets/Stride.Core.props | 9 +++++---- sources/targets/Stride.props | 2 +- .../Stride.NuGetLoader.csproj | 6 +++--- .../Commands/StrideCommandsProxy.cs | 4 ++-- .../Stride.VisualStudio.Package.csproj | 2 +- 40 files changed, 71 insertions(+), 64 deletions(-) diff --git a/build/Stride.Launcher.Build.props b/build/Stride.Launcher.Build.props index 8a1f01383a..c7da94432d 100644 --- a/build/Stride.Launcher.Build.props +++ b/build/Stride.Launcher.Build.props @@ -6,6 +6,6 @@ Windows - netcoreapp3.1 + net5.0-windows diff --git a/sources/assets/Stride.Core.Assets.CompilerApp/build/Stride.Core.Assets.CompilerApp.targets b/sources/assets/Stride.Core.Assets.CompilerApp/build/Stride.Core.Assets.CompilerApp.targets index 5151c98eb4..53bf66adcd 100644 --- a/sources/assets/Stride.Core.Assets.CompilerApp/build/Stride.Core.Assets.CompilerApp.targets +++ b/sources/assets/Stride.Core.Assets.CompilerApp/build/Stride.Core.Assets.CompilerApp.targets @@ -113,11 +113,12 @@ $(MSBuildThisFileDirectory)..\bin\$(Configuration) - netcoreapp3.1 + net5.0-windows7.0 + net5.0-windows7.0 net472 - netcoreapp3.1 + net5.0-windows7.0 net472 $(StrideCompileAssetCommandPath)\$(StrideCompileAssetTargetFramework)\Stride.Core.Assets.CompilerApp.exe diff --git a/sources/assets/Stride.Core.Assets.CompilerApp/global.json b/sources/assets/Stride.Core.Assets.CompilerApp/global.json index 0737ffaceb..2675d76597 100644 --- a/sources/assets/Stride.Core.Assets.CompilerApp/global.json +++ b/sources/assets/Stride.Core.Assets.CompilerApp/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "3.1.100", + "version": "5.0.100", "rollForward": "latestFeature", "allowPrerelease": false } diff --git a/sources/assets/Stride.Core.Assets/PackageSessionPublicHelper.cs b/sources/assets/Stride.Core.Assets/PackageSessionPublicHelper.cs index 2662559d31..b708d2ba1d 100644 --- a/sources/assets/Stride.Core.Assets/PackageSessionPublicHelper.cs +++ b/sources/assets/Stride.Core.Assets/PackageSessionPublicHelper.cs @@ -33,7 +33,7 @@ public static void FindAndSetMSBuildVersion() if (MSBuildInstance == null && Interlocked.Increment(ref MSBuildLocatorCount) == 1) { // Detect either .NET Core SDK or Visual Studio depending on current runtime - var isNETCore = RuntimeInformation.FrameworkDescription.StartsWith(".NET Core"); + var isNETCore = !RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework"); MSBuildInstance = MSBuildLocator.QueryVisualStudioInstances().FirstOrDefault(x => isNETCore ? x.DiscoveryType == DiscoveryType.DotNetSdk && x.Version.Major >= 3 : (x.DiscoveryType == DiscoveryType.VisualStudioSetup || x.DiscoveryType == DiscoveryType.DeveloperConsole) && x.Version.Major >= 16); diff --git a/sources/assets/Stride.Core.Packages/NugetStore.cs b/sources/assets/Stride.Core.Packages/NugetStore.cs index 223f3ac30c..166eb556c6 100644 --- a/sources/assets/Stride.Core.Packages/NugetStore.cs +++ b/sources/assets/Stride.Core.Packages/NugetStore.cs @@ -85,23 +85,6 @@ public NugetStore(string oldRootDirectory) sourceRepositoryProvider = new NugetSourceRepositoryProvider(packageSourceProvider, this); } - /// - /// Increase nuget HTTP timeout from 100 sec to something much higher (workaround for https://github.com/NuGet/Home/issues/8120). - /// - /// - /// This needs to be called before any NuGet function is called, otherwise it will lead to a FieldAccessException (HttpSourceRequest already initialized). - /// - public static void RemoveHttpTimeout() - { - // Workaround for https://github.com/NuGet/Home/issues/8120 - // set timeout to something much higher than 100 sec - var defaultRequestTimeoutField = typeof(HttpSourceRequest).GetField(nameof(HttpSourceRequest.DefaultRequestTimeout), BindingFlags.Static | BindingFlags.Public); - if (defaultRequestTimeoutField != null) - { - defaultRequestTimeoutField.SetValue(null, TimeSpan.FromMinutes(60)); - } - } - private static void RemoveSources(ISettings settings, string prefixName) { var packageSources = settings.GetSection("packageSources"); diff --git a/sources/assets/Stride.Core.Packages/Stride.Core.Packages.csproj b/sources/assets/Stride.Core.Packages/Stride.Core.Packages.csproj index b49a8103b8..eccc809a72 100644 --- a/sources/assets/Stride.Core.Packages/Stride.Core.Packages.csproj +++ b/sources/assets/Stride.Core.Packages/Stride.Core.Packages.csproj @@ -8,8 +8,8 @@ --auto-module-initializer --serialization - - + + diff --git a/sources/core/Stride.Core.Design/Stride.Core.Design.csproj b/sources/core/Stride.Core.Design/Stride.Core.Design.csproj index df1650bc13..bb0fb49410 100644 --- a/sources/core/Stride.Core.Design/Stride.Core.Design.csproj +++ b/sources/core/Stride.Core.Design/Stride.Core.Design.csproj @@ -29,7 +29,7 @@ - + diff --git a/sources/core/Stride.Core.Design/TypeConverters/Half2Converter.cs b/sources/core/Stride.Core.Design/TypeConverters/Half2Converter.cs index f9f0b70ad5..887f63d46e 100644 --- a/sources/core/Stride.Core.Design/TypeConverters/Half2Converter.cs +++ b/sources/core/Stride.Core.Design/TypeConverters/Half2Converter.cs @@ -52,6 +52,7 @@ using System.Reflection; using Stride.Core.Annotations; using Stride.Core.Mathematics; +using Half = Stride.Core.Mathematics.Half; namespace Stride.Core.TypeConverters { diff --git a/sources/core/Stride.Core.Design/TypeConverters/Half3Converter.cs b/sources/core/Stride.Core.Design/TypeConverters/Half3Converter.cs index f70aea0679..6d2b67d38f 100644 --- a/sources/core/Stride.Core.Design/TypeConverters/Half3Converter.cs +++ b/sources/core/Stride.Core.Design/TypeConverters/Half3Converter.cs @@ -52,6 +52,7 @@ using System.Reflection; using Stride.Core.Annotations; using Stride.Core.Mathematics; +using Half = Stride.Core.Mathematics.Half; namespace Stride.Core.TypeConverters { diff --git a/sources/core/Stride.Core.Design/TypeConverters/Half4Converter.cs b/sources/core/Stride.Core.Design/TypeConverters/Half4Converter.cs index 84ea0ae89c..3c16c6f90d 100644 --- a/sources/core/Stride.Core.Design/TypeConverters/Half4Converter.cs +++ b/sources/core/Stride.Core.Design/TypeConverters/Half4Converter.cs @@ -52,6 +52,7 @@ using System.Reflection; using Stride.Core.Annotations; using Stride.Core.Mathematics; +using Half = Stride.Core.Mathematics.Half; namespace Stride.Core.TypeConverters { diff --git a/sources/core/Stride.Core.Design/TypeConverters/HalfConverter.cs b/sources/core/Stride.Core.Design/TypeConverters/HalfConverter.cs index 96f93b2ee0..5cb2e5eff4 100644 --- a/sources/core/Stride.Core.Design/TypeConverters/HalfConverter.cs +++ b/sources/core/Stride.Core.Design/TypeConverters/HalfConverter.cs @@ -50,6 +50,7 @@ using System.Globalization; using Stride.Core.Mathematics; +using Half = Stride.Core.Mathematics.Half; namespace Stride.Core.TypeConverters { diff --git a/sources/core/Stride.Core/Stride.Core.csproj b/sources/core/Stride.Core/Stride.Core.csproj index 7bd7e6af0d..ac3a8a6138 100644 --- a/sources/core/Stride.Core/Stride.Core.csproj +++ b/sources/core/Stride.Core/Stride.Core.csproj @@ -1,6 +1,7 @@ true + true diff --git a/sources/editor/Stride.Assets.Presentation/Module.cs b/sources/editor/Stride.Assets.Presentation/Module.cs index ca71528127..72009453d0 100644 --- a/sources/editor/Stride.Assets.Presentation/Module.cs +++ b/sources/editor/Stride.Assets.Presentation/Module.cs @@ -16,7 +16,7 @@ namespace Stride.Assets.Presentation { internal class Module { - [ModuleInitializer] + [Core.ModuleInitializer] public static void Initialize() { RuntimeHelpers.RunModuleConstructor(typeof(SpriteFontAsset).Module.ModuleHandle); diff --git a/sources/editor/Stride.Assets.Presentation/Stride.Assets.Presentation.csproj b/sources/editor/Stride.Assets.Presentation/Stride.Assets.Presentation.csproj index d0df379589..fc8182e8f7 100644 --- a/sources/editor/Stride.Assets.Presentation/Stride.Assets.Presentation.csproj +++ b/sources/editor/Stride.Assets.Presentation/Stride.Assets.Presentation.csproj @@ -16,6 +16,7 @@ false net462 netcoreapp3.1 + netcoreapp3.1 diff --git a/sources/editor/Stride.Assets.Presentation/Templates/Core/ProjectExecutable.Linux/$ProjectName$.csproj.t4 b/sources/editor/Stride.Assets.Presentation/Templates/Core/ProjectExecutable.Linux/$ProjectName$.csproj.t4 index 62ca2232ef..463d9b2e2d 100644 --- a/sources/editor/Stride.Assets.Presentation/Templates/Core/ProjectExecutable.Linux/$ProjectName$.csproj.t4 +++ b/sources/editor/Stride.Assets.Presentation/Templates/Core/ProjectExecutable.Linux/$ProjectName$.csproj.t4 @@ -2,7 +2,7 @@ - netcoreapp2.1 + net5.0 linux-x64 Resources\Icon.ico WinExe diff --git a/sources/editor/Stride.Assets.Presentation/Templates/Core/ProjectExecutable.macOS/$ProjectName$.csproj.t4 b/sources/editor/Stride.Assets.Presentation/Templates/Core/ProjectExecutable.macOS/$ProjectName$.csproj.t4 index 61d27b82b7..ac7afd1234 100644 --- a/sources/editor/Stride.Assets.Presentation/Templates/Core/ProjectExecutable.macOS/$ProjectName$.csproj.t4 +++ b/sources/editor/Stride.Assets.Presentation/Templates/Core/ProjectExecutable.macOS/$ProjectName$.csproj.t4 @@ -2,7 +2,7 @@ - netcoreapp2.1 + net5.0 osx-x64 Resources\Icon.ico WinExe diff --git a/sources/editor/Stride.GameStudio/Stride.GameStudio.csproj b/sources/editor/Stride.GameStudio/Stride.GameStudio.csproj index c31afb89f1..ebfce07518 100644 --- a/sources/editor/Stride.GameStudio/Stride.GameStudio.csproj +++ b/sources/editor/Stride.GameStudio/Stride.GameStudio.csproj @@ -1,4 +1,4 @@ - + @@ -40,6 +40,7 @@ ..\..\..\deps\AssemblyProcessor\net472\Stride.Core.AssemblyProcessor.exe + ..\..\..\deps\AssemblyProcessor\netstandard2.0\Stride.Core.AssemblyProcessor.dll ..\..\..\deps\AssemblyProcessor\netstandard2.0\Stride.Core.AssemblyProcessor.dll diff --git a/sources/editor/Stride.GameStudio/global.json b/sources/editor/Stride.GameStudio/global.json index 0737ffaceb..2675d76597 100644 --- a/sources/editor/Stride.GameStudio/global.json +++ b/sources/editor/Stride.GameStudio/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "3.1.100", + "version": "5.0.100", "rollForward": "latestFeature", "allowPrerelease": false } diff --git a/sources/engine/Stride.Assets/StrideConfig.cs b/sources/engine/Stride.Assets/StrideConfig.cs index d2206917b0..b849a1c20f 100644 --- a/sources/engine/Stride.Assets/StrideConfig.cs +++ b/sources/engine/Stride.Assets/StrideConfig.cs @@ -135,7 +135,7 @@ internal static void RegisterSolutionPlatforms() { Name = PlatformType.Linux.ToString(), IsAvailable = true, - TargetFramework = "netcoreapp2.1", + TargetFramework = "net5.0", RuntimeIdentifier = "linux-x64", Type = PlatformType.Linux, }; @@ -148,7 +148,7 @@ internal static void RegisterSolutionPlatforms() { Name = PlatformType.macOS.ToString(), IsAvailable = true, - TargetFramework = "netcoreapp2.1", + TargetFramework = "net5.0", RuntimeIdentifier = "osx-x64", Type = PlatformType.macOS, }; diff --git a/sources/engine/Stride.Games/Stride.Games.csproj b/sources/engine/Stride.Games/Stride.Games.csproj index 809ca22cfd..ab75fc9e10 100644 --- a/sources/engine/Stride.Games/Stride.Games.csproj +++ b/sources/engine/Stride.Games/Stride.Games.csproj @@ -2,7 +2,7 @@ true true - true + true true true diff --git a/sources/engine/Stride.Input/IGamePadDevice.cs b/sources/engine/Stride.Input/IGamePadDevice.cs index 9214c643c7..869c26c6b4 100644 --- a/sources/engine/Stride.Input/IGamePadDevice.cs +++ b/sources/engine/Stride.Input/IGamePadDevice.cs @@ -2,7 +2,7 @@ // Distributed under the MIT license. See the LICENSE.md file in the project root for more information. using System; -using Stride.Core.Collections; +using System.Collections.Generic; namespace Stride.Input { @@ -65,4 +65,4 @@ public interface IGamePadDevice : IInputDevice /// Currently vibration is only supported on windows for XInput devices and UWP supported gamepads void SetVibration(float smallLeft, float smallRight, float largeLeft, float largeRight); } -} \ No newline at end of file +} diff --git a/sources/engine/Stride.Input/IMouseDevice.cs b/sources/engine/Stride.Input/IMouseDevice.cs index e08b2fabe4..f935b8ccf6 100644 --- a/sources/engine/Stride.Input/IMouseDevice.cs +++ b/sources/engine/Stride.Input/IMouseDevice.cs @@ -1,7 +1,7 @@ // Copyright (c) Stride contributors (https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp) // Distributed under the MIT license. See the LICENSE.md file in the project root for more information. -using Stride.Core.Collections; +using System.Collections.Generic; using Stride.Core.Mathematics; namespace Stride.Input @@ -58,4 +58,4 @@ public interface IMouseDevice : IPointerDevice /// void SetPosition(Vector2 normalizedPosition); } -} \ No newline at end of file +} diff --git a/sources/engine/Stride.Input/Stride.Input.csproj b/sources/engine/Stride.Input/Stride.Input.csproj index 96942368e2..2ba667ad23 100644 --- a/sources/engine/Stride.Input/Stride.Input.csproj +++ b/sources/engine/Stride.Input/Stride.Input.csproj @@ -1,8 +1,8 @@ - + true true - true + true true diff --git a/sources/engine/Stride.Input/VirtualButton/VirtualButton.Pointer.cs b/sources/engine/Stride.Input/VirtualButton/VirtualButton.Pointer.cs index f700903a4b..0741162fdb 100644 --- a/sources/engine/Stride.Input/VirtualButton/VirtualButton.Pointer.cs +++ b/sources/engine/Stride.Input/VirtualButton/VirtualButton.Pointer.cs @@ -1,7 +1,7 @@ // Copyright (c) Stride contributors (https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp) // Distributed under the MIT license. See the LICENSE.md file in the project root for more information. using System; -using Stride.Core.Collections; +using System.Collections.Generic; namespace Stride.Input { diff --git a/sources/launcher/Stride.Launcher/Launcher.cs b/sources/launcher/Stride.Launcher/Launcher.cs index cc861459a6..becf253b54 100644 --- a/sources/launcher/Stride.Launcher/Launcher.cs +++ b/sources/launcher/Stride.Launcher/Launcher.cs @@ -65,8 +65,6 @@ internal static string GetExecutablePath() [NotNull] internal static NugetStore InitializeNugetStore() { - NugetStore.RemoveHttpTimeout(); - var thisExeDirectory = new UFile(Assembly.GetEntryAssembly().Location).GetFullDirectory().ToWindowsPath(); var store = new NugetStore(thisExeDirectory); return store; diff --git a/sources/launcher/Stride.Launcher/Properties/PublishProfiles/FolderProfile.pubxml b/sources/launcher/Stride.Launcher/Properties/PublishProfiles/FolderProfile.pubxml index 6d740f80bf..51663c4d8a 100644 --- a/sources/launcher/Stride.Launcher/Properties/PublishProfiles/FolderProfile.pubxml +++ b/sources/launcher/Stride.Launcher/Properties/PublishProfiles/FolderProfile.pubxml @@ -8,7 +8,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. Any CPU bin\Release\publish\ FileSystem - netcoreapp3.1 + net5.0-windows true win-x64 True diff --git a/sources/launcher/Stride.Launcher/Services/LauncherSettings.cs b/sources/launcher/Stride.Launcher/Services/LauncherSettings.cs index 728bc326dd..10b268ad8a 100644 --- a/sources/launcher/Stride.Launcher/Services/LauncherSettings.cs +++ b/sources/launcher/Stride.Launcher/Services/LauncherSettings.cs @@ -15,7 +15,7 @@ public static class LauncherSettings private static readonly SettingsKey CloseLauncherAutomaticallyKey = new SettingsKey("Internal/Launcher/CloseLauncherAutomatically", SettingsContainer, false); private static readonly SettingsKey ActiveVersionKey = new SettingsKey("Internal/Launcher/ActiveVersion", SettingsContainer, ""); - private static readonly SettingsKey PreferredFrameworkKey = new SettingsKey("Internal/Launcher/PreferredFramework", SettingsContainer, "netcoreapp3.1"); + private static readonly SettingsKey PreferredFrameworkKey = new SettingsKey("Internal/Launcher/PreferredFramework", SettingsContainer, "net5.0"); private static readonly SettingsKey CurrentTabKey = new SettingsKey("Internal/Launcher/CurrentTabSessions", SettingsContainer, 0); private static readonly SettingsKey> DeveloperVersionsKey = new SettingsKey>("Internal/Launcher/DeveloperVersions", SettingsContainer, () => new List()); diff --git a/sources/launcher/Stride.Launcher/Stride.Launcher.csproj b/sources/launcher/Stride.Launcher/Stride.Launcher.csproj index c084e3c4ae..12528066dc 100644 --- a/sources/launcher/Stride.Launcher/Stride.Launcher.csproj +++ b/sources/launcher/Stride.Launcher/Stride.Launcher.csproj @@ -7,7 +7,7 @@ WinExe - netcoreapp3.1 + net5.0-windows win-x64 false false diff --git a/sources/launcher/Stride.Launcher/Stride.Launcher.nuspec b/sources/launcher/Stride.Launcher/Stride.Launcher.nuspec index 1b9adc9a1d..e535830f56 100644 --- a/sources/launcher/Stride.Launcher/Stride.Launcher.nuspec +++ b/sources/launcher/Stride.Launcher/Stride.Launcher.nuspec @@ -2,7 +2,7 @@ Stride.Launcher - 5.0.3 + 5.0.4 Stride Stride https://stride3d.net/license.txt diff --git a/sources/shared/Stride.NuGetResolver/NuGetAssemblyResolver.cs b/sources/shared/Stride.NuGetResolver/NuGetAssemblyResolver.cs index 5a20e40c14..289235e28e 100644 --- a/sources/shared/Stride.NuGetResolver/NuGetAssemblyResolver.cs +++ b/sources/shared/Stride.NuGetResolver/NuGetAssemblyResolver.cs @@ -7,6 +7,7 @@ using System.Linq; using System.Reflection; using System.Runtime.Versioning; +using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; using Newtonsoft.Json.Linq; @@ -128,6 +129,20 @@ internal static void SetupNuGet(string packageName, string packageVersion) .FrameworkName ?? ".NETFramework,Version=v4.7.2"; var nugetFramework = NuGetFramework.ParseFrameworkName(framework, DefaultFrameworkNameProvider.Instance); +#if NETCOREAPP + // Add TargetPlatform to net5.0 TFM (i.e. net5.0 to net5.0-windows7.0) + var platform = Assembly.GetEntryAssembly()?.GetCustomAttribute()?.PlatformName ?? string.Empty; + if (framework.StartsWith(FrameworkConstants.FrameworkIdentifiers.NetCoreApp) && platform != string.Empty) + { + var platformParseResult = Regex.Match(platform, @"([a-zA-Z]+)(\d+.*)"); + if (platformParseResult.Success && Version.TryParse(platformParseResult.Groups[2].Value, out var platformVersion)) + { + var platformName = platformParseResult.Groups[1].Value; + nugetFramework = new NuGetFramework(nugetFramework.Framework, nugetFramework.Version, platformName, platformVersion); + } + } +#endif + // Only allow this specific version var versionRange = new VersionRange(new NuGetVersion(packageVersion), true, new NuGetVersion(packageVersion), true); var (request, result) = RestoreHelper.Restore(logger, nugetFramework, "win", packageName, versionRange); diff --git a/sources/shared/Stride.NuGetResolver/SplashScreenWindow.xaml.cs b/sources/shared/Stride.NuGetResolver/SplashScreenWindow.xaml.cs index e54cf81d73..6898cbaf51 100644 --- a/sources/shared/Stride.NuGetResolver/SplashScreenWindow.xaml.cs +++ b/sources/shared/Stride.NuGetResolver/SplashScreenWindow.xaml.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.IO; using System.Linq; -using System.Runtime.InteropServices.WindowsRuntime; using System.Windows; using System.Windows.Controls; using System.Windows.Input; diff --git a/sources/shared/Stride.NuGetResolver/Stride.NuGetResolver.projitems b/sources/shared/Stride.NuGetResolver/Stride.NuGetResolver.projitems index 40fc23d133..dceff1ebf5 100644 --- a/sources/shared/Stride.NuGetResolver/Stride.NuGetResolver.projitems +++ b/sources/shared/Stride.NuGetResolver/Stride.NuGetResolver.projitems @@ -38,7 +38,7 @@ $(AllowedOutputExtensionsInPackageBuildOutputFolder);.loaderdata STRIDE_NUGET_RESOLVER_UX;$(DefineConstants) - + $(AllowedOutputExtensionsInPackageBuildOutputFolder);.loaderdata $(TargetsForTfmSpecificBuildOutput);_StridePackageNuGetLoader diff --git a/sources/targets/Stride.Core.Cpp.props b/sources/targets/Stride.Core.Cpp.props index bb73885566..ad18af9227 100644 --- a/sources/targets/Stride.Core.Cpp.props +++ b/sources/targets/Stride.Core.Cpp.props @@ -9,12 +9,12 @@ v4.7.2 true - - netcoreapp3.1 + + net5.0 NetCore - + Library diff --git a/sources/targets/Stride.Core.PostSettings.Dependencies.targets b/sources/targets/Stride.Core.PostSettings.Dependencies.targets index 8b7d53ab38..6f50b47f95 100644 --- a/sources/targets/Stride.Core.PostSettings.Dependencies.targets +++ b/sources/targets/Stride.Core.PostSettings.Dependencies.targets @@ -102,7 +102,10 @@ <_StrideAppendRuntimeIdentifier Condition="'$(RuntimeIdentifier)' != '' and '$(_UsingDefaultRuntimeIdentifier)' != 'true'">true - <_StridePackagePathLibrary Condition="'$(_StrideAppendRuntimeIdentifier)' != 'true'">lib\$(TargetFramework) + <_StridePackageLibraryTargetFramework>$(TargetFramework) + + <_StridePackageLibraryTargetFramework Condition="$(TargetFramework.EndsWith('-windows')) And '$(_StrideAppendRuntimeIdentifier)' != 'true'">$(_StridePackageLibraryTargetFramework)7.0 + <_StridePackagePathLibrary Condition="'$(_StrideAppendRuntimeIdentifier)' != 'true'">lib\$(_StridePackageLibraryTargetFramework) <_StridePackagePathLibrary Condition="'$(_StrideAppendRuntimeIdentifier)' == 'true'">runtimes\$(RuntimeIdentifier)\lib\$(TargetFramework) diff --git a/sources/targets/Stride.Core.TargetFrameworks.Editor.props b/sources/targets/Stride.Core.TargetFrameworks.Editor.props index aa9c9d016e..27a22d4584 100644 --- a/sources/targets/Stride.Core.TargetFrameworks.Editor.props +++ b/sources/targets/Stride.Core.TargetFrameworks.Editor.props @@ -2,7 +2,7 @@ - net472 + net5.0-windows $(StrideEditorTargetFrameworks.Split(';', StringSplitOptions.RemoveEmptyEntries)[0]) diff --git a/sources/targets/Stride.Core.props b/sources/targets/Stride.Core.props index 5b0b611a8a..035b2eb4e4 100644 --- a/sources/targets/Stride.Core.props +++ b/sources/targets/Stride.Core.props @@ -55,19 +55,20 @@ netstandard2.0 $(StrideRuntimeTargetFrameworks);net461 - $(StrideRuntimeTargetFrameworks);netcoreapp3.0 + $(StrideRuntimeTargetFrameworks);net5.0 + $(StrideRuntimeTargetFrameworks);net5.0-windows $(StrideRuntimeTargetFrameworks);uap10.0.16299 $(StrideRuntimeTargetFrameworks);monoandroid81 $(StrideRuntimeTargetFrameworks);xamarinios10 - $(StrideRuntimeIdentifiers);win + $(StrideRuntimeIdentifiers);win $(StrideRuntimeIdentifiers);linux $(StrideRuntimeIdentifiers);osx win - any + any ;$(StrideRuntimeIdentifiers); @@ -255,7 +256,7 @@ - + STRIDE_RUNTIME_CORECLR diff --git a/sources/targets/Stride.props b/sources/targets/Stride.props index 1521cfceed..77d1683e26 100644 --- a/sources/targets/Stride.props +++ b/sources/targets/Stride.props @@ -86,7 +86,7 @@ SDL $(StrideUI);OPENTK - $(StrideUI);WINFORMS;WPF + $(StrideUI);WINFORMS;WPF $(DefineConstants);STRIDE_UI_SDL $(DefineConstants);STRIDE_UI_OPENTK diff --git a/sources/tools/Stride.NuGetLoader/Stride.NuGetLoader.csproj b/sources/tools/Stride.NuGetLoader/Stride.NuGetLoader.csproj index d73547327c..8bae1cfaaa 100644 --- a/sources/tools/Stride.NuGetLoader/Stride.NuGetLoader.csproj +++ b/sources/tools/Stride.NuGetLoader/Stride.NuGetLoader.csproj @@ -1,10 +1,10 @@ - + Exe - netcoreapp3.1 + net5.0-windows true true obj\$(Configuration)\$(StrideApplicationName) @@ -18,7 +18,7 @@ - + diff --git a/sources/tools/Stride.VisualStudio.Package/Commands/StrideCommandsProxy.cs b/sources/tools/Stride.VisualStudio.Package/Commands/StrideCommandsProxy.cs index c8da4d7287..3d4c227cac 100644 --- a/sources/tools/Stride.VisualStudio.Package/Commands/StrideCommandsProxy.cs +++ b/sources/tools/Stride.VisualStudio.Package/Commands/StrideCommandsProxy.cs @@ -171,9 +171,9 @@ internal static async Task FindStrideSdkDir(string solution, string // Try to find the package with the expected version if (packageInfo.ExpectedVersion != null && packageInfo.ExpectedVersion >= MinimumVersion) { - // Try both netcoreapp3.1 and net472 + // Try both net5.0 and net472 var success = false; - foreach (var framework in new[] { ".NETCoreApp,Version=v3.1", ".NETFramework,Version=v4.7.2" }) + foreach (var framework in new[] { ".NET,Version=v5.0", ".NETFramework,Version=v4.7.2" }) { var logger = new Logger(); var solutionRoot = Path.GetDirectoryName(solution); diff --git a/sources/tools/Stride.VisualStudio.Package/Stride.VisualStudio.Package.csproj b/sources/tools/Stride.VisualStudio.Package/Stride.VisualStudio.Package.csproj index 2367772f6d..084f96cb0b 100644 --- a/sources/tools/Stride.VisualStudio.Package/Stride.VisualStudio.Package.csproj +++ b/sources/tools/Stride.VisualStudio.Package/Stride.VisualStudio.Package.csproj @@ -37,7 +37,7 @@ - +