[Build] Moved NuGetLoader executables from lib\TFM to tools\TFM (fixes #1139)

This commit is contained in:
Virgile Bello 2021-09-01 21:40:53 +09:00
Родитель a0fdc3d7cc
Коммит de0a0cb6dd
40 изменённых файлов: 115 добавлений и 72 удалений

Просмотреть файл

@ -6,6 +6,6 @@
<!-- Defines the platform used by Stride - Values are Windows/Android/iOS...etc. -->
<StridePlatform Condition=" '$(StridePlatform)' == '' ">Windows</StridePlatform>
<StrideEditorTargetFrameworks>net5.0-windows</StrideEditorTargetFrameworks>
<StrideEditorTargetFrameworks>net5.0-windows7.0</StrideEditorTargetFrameworks>
</PropertyGroup>
</Project>

Просмотреть файл

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net5.0-windows7.0</TargetFramework>
<ApplicationIcon>Resources\GameIcon.ico</ApplicationIcon>
<OutputType>WinExe</OutputType>
<RootNamespace>SimpleAudio</RootNamespace>

Просмотреть файл

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net5.0-windows7.0</TargetFramework>
<ApplicationIcon>Resources\GameIcon.ico</ApplicationIcon>
<OutputType>WinExe</OutputType>
<RootNamespace>JumpyJet</RootNamespace>

Просмотреть файл

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net5.0-windows7.0</TargetFramework>
<ApplicationIcon>Resources\GameIcon.ico</ApplicationIcon>
<OutputType>WinExe</OutputType>
<RootNamespace>SpaceEscape</RootNamespace>

Просмотреть файл

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net5.0-windows7.0</TargetFramework>
<ApplicationIcon>Resources\GameIcon.ico</ApplicationIcon>
<OutputType>WinExe</OutputType>
<RootNamespace>AnimatedModel</RootNamespace>

Просмотреть файл

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net5.0-windows7.0</TargetFramework>
<ApplicationIcon>Resources\GameIcon.ico</ApplicationIcon>
<OutputType>WinExe</OutputType>
<RootNamespace>CustomEffect</RootNamespace>

Просмотреть файл

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net5.0-windows7.0</TargetFramework>
<ApplicationIcon>Resources\GameIcon.ico</ApplicationIcon>
<OutputType>WinExe</OutputType>
<RootNamespace>MaterialShader</RootNamespace>

Просмотреть файл

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net5.0-windows7.0</TargetFramework>
<ApplicationIcon>Resources\GameIcon.ico</ApplicationIcon>
<OutputType>WinExe</OutputType>
<RootNamespace>SpriteFonts</RootNamespace>

Просмотреть файл

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net5.0-windows7.0</TargetFramework>
<ApplicationIcon>Resources\GameIcon.ico</ApplicationIcon>
<OutputType>WinExe</OutputType>
<RootNamespace>SpriteStudioDemo</RootNamespace>

Просмотреть файл

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net5.0-windows7.0</TargetFramework>
<ApplicationIcon>Resources\GameIcon.ico</ApplicationIcon>
<OutputType>WinExe</OutputType>
<RootNamespace>GravitySensor</RootNamespace>

Просмотреть файл

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net5.0-windows7.0</TargetFramework>
<ApplicationIcon>Resources\GameIcon.ico</ApplicationIcon>
<OutputType>WinExe</OutputType>
<RootNamespace>TouchInputs</RootNamespace>

Просмотреть файл

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net5.0-windows7.0</TargetFramework>
<ApplicationIcon>Resources\GameIcon.ico</ApplicationIcon>
<OutputType>WinExe</OutputType>
<RootNamespace>ParticlesSample</RootNamespace>

Просмотреть файл

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net5.0-windows7.0</TargetFramework>
<ApplicationIcon>Resources\GameIcon.ico</ApplicationIcon>
<OutputType>WinExe</OutputType>
<RootNamespace>PhysicsSample</RootNamespace>

Просмотреть файл

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net5.0-windows7.0</TargetFramework>
<ApplicationIcon>Resources\GameIcon.ico</ApplicationIcon>
<OutputType>WinExe</OutputType>
<RootNamespace>FirstPersonShooter</RootNamespace>

Просмотреть файл

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net5.0-windows7.0</TargetFramework>
<ApplicationIcon>Resources\GameIcon.ico</ApplicationIcon>
<OutputType>WinExe</OutputType>
<RootNamespace>ThirdPersonPlatformer</RootNamespace>

Просмотреть файл

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net5.0-windows7.0</TargetFramework>
<ApplicationIcon>Resources\GameIcon.ico</ApplicationIcon>
<OutputType>WinExe</OutputType>
<RootNamespace>TopDownRPG</RootNamespace>

Просмотреть файл

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net5.0-windows7.0</TargetFramework>
<ApplicationIcon>Resources\GameIcon.ico</ApplicationIcon>
<OutputType>WinExe</OutputType>
<RootNamespace>VRSandbox</RootNamespace>

Просмотреть файл

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net5.0-windows7.0</TargetFramework>
<ApplicationIcon>Resources\GameIcon.ico</ApplicationIcon>
<OutputType>WinExe</OutputType>
<RootNamespace>CSharpBeginner.Windows</RootNamespace>

Просмотреть файл

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net5.0-windows7.0</TargetFramework>
<ApplicationIcon>Resources\GameIcon.ico</ApplicationIcon>
<OutputType>WinExe</OutputType>
<RootNamespace>GameMenu</RootNamespace>

Просмотреть файл

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net5.0-windows7.0</TargetFramework>
<ApplicationIcon>Resources\GameIcon.ico</ApplicationIcon>
<OutputType>WinExe</OutputType>
<RootNamespace>UIElementLink</RootNamespace>

Просмотреть файл

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net5.0-windows7.0</TargetFramework>
<ApplicationIcon>Resources\GameIcon.ico</ApplicationIcon>
<OutputType>WinExe</OutputType>
<RootNamespace>UIParticles</RootNamespace>

Просмотреть файл

@ -457,7 +457,7 @@ namespace Stride.Core.Assets.CompilerApp
var startInfo = new ProcessStartInfo
{
// Note: try to get exec server if it exists, otherwise use CompilerApp.exe
FileName = Path.ChangeExtension(typeof(PackageBuilder).Assembly.Location, ".exe"),
FileName = LoaderToolLocator.GetExecutable(typeof(PackageBuilder).Assembly.Location),
Arguments = arguments,
WorkingDirectory = Environment.CurrentDirectory,
CreateNoWindow = true,

Просмотреть файл

@ -26,6 +26,7 @@
<Compile Include="..\..\shared\SharedAssemblyInfo.cs">
<Link>Properties\SharedAssemblyInfo.cs</Link>
</Compile>
<Compile Include="..\..\shared\LoaderToolLocator\LoaderToolLocator.cs" Link="LoaderToolLocator.cs" />
<None Include="build\**\*.targets" PackagePath="build\" Pack="true" />
<None Include="build\**\*.targets" PackagePath="buildTransitive\" Pack="true" />
<None Include="..\..\..\deps\Stride.MSBuild.Tasks\bin\Release\**\*.*" PackagePath="tools\" Pack="true" />

Просмотреть файл

@ -108,8 +108,8 @@
<Target Name="_StridePrepareAssetCompiler">
<PropertyGroup>
<!-- First try NuGet layout, then git checkout -->
<StrideCompileAssetCommand Condition="'$(StrideCompileAssetCommand)' == '' And Exists('$(MSBuildThisFileDirectory)..\lib\net5.0-windows7.0\')">$(MSBuildThisFileDirectory)..\lib\net5.0-windows7.0\Stride.Core.Assets.CompilerApp.exe</StrideCompileAssetCommand>
<StrideCompileAssetCommand Condition="'$(StrideCompileAssetCommand)' == '' And Exists('$(MSBuildThisFileDirectory)..\Stride.Core.Assets.CompilerApp.csproj')">$(MSBuildThisFileDirectory)..\bin\$(Configuration)\net5.0-windows\Stride.Core.Assets.CompilerApp.exe</StrideCompileAssetCommand>
<StrideCompileAssetCommand Condition="'$(StrideCompileAssetCommand)' == '' And Exists('$(MSBuildThisFileDirectory)..\tools\net5.0-windows7.0\')">$(MSBuildThisFileDirectory)..\tools\net5.0-windows7.0\Stride.Core.Assets.CompilerApp.exe</StrideCompileAssetCommand>
<StrideCompileAssetCommand Condition="'$(StrideCompileAssetCommand)' == '' And Exists('$(MSBuildThisFileDirectory)..\Stride.Core.Assets.CompilerApp.csproj')">$(MSBuildThisFileDirectory)..\bin\$(Configuration)\net5.0-windows7.0\Stride.Core.Assets.CompilerApp.exe</StrideCompileAssetCommand>
</PropertyGroup>
<Error Condition="!Exists('$(StrideCompileAssetCommand)')" Text="Stride AssetCompiler could not be found (Command: &quot;$(StrideCompileAssetCommand)&quot;)"/>

Просмотреть файл

@ -134,7 +134,7 @@ namespace Stride.GameStudio
StartInfo =
{
// Make sure to use .exe rather than .dll (.NET Core)
FileName = Path.ChangeExtension(Assembly.GetExecutingAssembly().Location, ".exe"),
FileName = LoaderToolLocator.GetExecutable(Assembly.GetExecutingAssembly().Location),
Arguments = restartArguments,
}
};

Просмотреть файл

@ -54,6 +54,7 @@
<Compile Include="..\..\shared\SharedAssemblyInfo.cs">
<Link>Properties\SharedAssemblyInfo.cs</Link>
</Compile>
<Compile Include="..\..\shared\LoaderToolLocator\LoaderToolLocator.cs" Link="LoaderToolLocator.cs" />
<None Include="..\..\tools\Stride.PackageInstall\bin\$(Configuration)\*.*" PackagePath="tools\" Pack="true" />
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -9,8 +9,8 @@
<PropertyGroup>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<UseWPF Condition="$(TargetFramework.EndsWith('-windows'))">true</UseWPF>
<UseWindowsForms Condition="$(TargetFramework.EndsWith('-windows'))">true</UseWindowsForms>
<UseWPF Condition="$(TargetFramework.Contains('-windows'))">true</UseWPF>
<UseWindowsForms Condition="$(TargetFramework.Contains('-windows'))">true</UseWindowsForms>
<StrideAssemblyProcessor>true</StrideAssemblyProcessor>
<StrideAssemblyProcessorOptions>--auto-module-initializer</StrideAssemblyProcessorOptions>
<StridePlatformDependent>true</StridePlatformDependent>

Просмотреть файл

@ -6,8 +6,8 @@
</PropertyGroup>
<Import Project="..\..\targets\Stride.props" />
<PropertyGroup>
<UseWPF Condition="$(TargetFramework.EndsWith('-windows'))">true</UseWPF>
<UseWindowsForms Condition="$(TargetFramework.EndsWith('-windows'))">true</UseWindowsForms>
<UseWPF Condition="$(TargetFramework.Contains('-windows'))">true</UseWPF>
<UseWindowsForms Condition="$(TargetFramework.Contains('-windows'))">true</UseWindowsForms>
<StridePlatformDependent>true</StridePlatformDependent>
<StrideAssemblyProcessor>true</StrideAssemblyProcessor>
<StrideBuildTags>*</StrideBuildTags>
@ -23,8 +23,8 @@
<ItemGroup>
<ProjectReference Include="..\Stride.Games\Stride.Games.csproj" />
<PackageReference Include="SharpDX.RawInput" Version="4.2.0" Condition="$(TargetFramework.StartsWith('net4'))" />
<PackageReference Include="SharpDX.DirectInput" Version="4.2.0" Condition="$(TargetFramework.EndsWith('-windows'))" />
<PackageReference Include="SharpDX.XInput" Version="4.2.0" Condition="$(TargetFramework.EndsWith('-windows'))" />
<PackageReference Include="SharpDX.DirectInput" Version="4.2.0" Condition="$(TargetFramework.Contains('-windows'))" />
<PackageReference Include="SharpDX.XInput" Version="4.2.0" Condition="$(TargetFramework.Contains('-windows'))" />
</ItemGroup>
<Import Project="$(StrideSdkTargets)" />
</Project>

Просмотреть файл

@ -7,7 +7,7 @@
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net5.0-windows7.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>

Просмотреть файл

@ -39,15 +39,18 @@ namespace Stride.LauncherApp.ViewModels
Frameworks.Clear();
if (LocalPackage != null && InstallPath != null)
{
var libDirectory = Path.Combine(InstallPath, "lib");
var frameworks = Directory.EnumerateDirectories(libDirectory);
foreach (var frameworkPath in frameworks)
foreach (var toplevelFolder in new[] { "tools", "lib" })
{
var frameworkFolder = new DirectoryInfo(frameworkPath).Name;
if (File.Exists(Path.Combine(frameworkPath, "Stride.GameStudio.exe"))
|| File.Exists(Path.Combine(frameworkPath, "Xenko.GameStudio.exe")))
var libDirectory = Path.Combine(InstallPath, toplevelFolder);
var frameworks = Directory.EnumerateDirectories(libDirectory);
foreach (var frameworkPath in frameworks)
{
Frameworks.Add(frameworkFolder);
var frameworkFolder = new DirectoryInfo(frameworkPath).Name;
if (File.Exists(Path.Combine(frameworkPath, "Stride.GameStudio.exe"))
|| File.Exists(Path.Combine(frameworkPath, "Xenko.GameStudio.exe")))
{
Frameworks.Add(frameworkFolder);
}
}
}
@ -181,12 +184,15 @@ namespace Stride.LauncherApp.ViewModels
// First, try to use the selected framework
if (SelectedFramework != null)
{
var gameStudioDirectory = Path.Combine(InstallPath, "lib", SelectedFramework);
foreach (var gameStudioExecutable in new[] { "Stride.GameStudio.exe", "Xenko.GameStudio.exe" })
foreach (var toplevelFolder in new[] { "tools", "lib" })
{
var gameStudioPath = Path.Combine(gameStudioDirectory, gameStudioExecutable);
if (File.Exists(gameStudioPath))
return gameStudioPath;
var gameStudioDirectory = Path.Combine(InstallPath, toplevelFolder, SelectedFramework);
foreach (var gameStudioExecutable in new[] { "Stride.GameStudio.exe", "Xenko.GameStudio.exe" })
{
var gameStudioPath = Path.Combine(gameStudioDirectory, gameStudioExecutable);
if (File.Exists(gameStudioPath))
return gameStudioPath;
}
}
}

Просмотреть файл

@ -0,0 +1,49 @@
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net)
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
using System;
using System.IO;
namespace Stride.Core
{
/// <summary>
/// Helper class to find executable (usually in folder tools/TFM) from a .NET Core library (usually in folder lib/TFM).
/// This follow the layout generated by Stride.NuGetLoader that is shipped with every .exe project such as GameStudio, Asset Compiler, Connection router, etc.
/// </summary>
static class LoaderToolLocator
{
internal static string GetExecutable(string assemblyLocation)
{
// Already exe
if (Path.GetExtension(assemblyLocation).ToLowerInvariant() == ".exe")
return assemblyLocation;
// Same folder (dev or old layout in nuget package)
{
var exeLocation = Path.ChangeExtension(assemblyLocation, ".exe");
if (File.Exists(exeLocation))
return exeLocation;
}
// Remap lib\TFM to tools\TFM (nuget package)
var tfmPath = Path.GetDirectoryName(assemblyLocation);
if (tfmPath != null)
{
const string LibPath = "\\lib";
var parentPath = Path.GetDirectoryName(tfmPath);
if (parentPath.EndsWith(LibPath))
{
// Replace lib to tools
var tfm = tfmPath.Substring(parentPath.Length + 1);
var toolPath = $"{assemblyLocation.Substring(0, parentPath.Length - LibPath.Length)}\\tools";
var exeFile = Path.ChangeExtension(assemblyLocation.Substring(tfmPath.Length + 1), ".exe");
var exeLocation = $"{toolPath}\\{tfm}\\{exeFile}";
if (File.Exists(exeLocation))
return exeLocation;
}
}
throw new FileNotFoundException($"Could not find executable to start assembly [${assemblyLocation}]");
}
}
}

Просмотреть файл

@ -22,27 +22,13 @@
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<!-- Some targets so that referencing projects include a tools folder with executables-->
<PropertyGroup>
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);IncludeNuGetResolverAssemblies</TargetsForTfmSpecificBuildOutput>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.config</AllowedOutputExtensionsInPackageBuildOutputFolder>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.config;.loaderdata</AllowedOutputExtensionsInPackageBuildOutputFolder>
<UseWPF Condition="'$(StrideNuGetResolverUX)' == 'true'">true</UseWPF>
</PropertyGroup>
<Target Name="IncludeNuGetResolverAssemblies">
<ItemGroup>
<BuildOutputInPackage Include="$(OutputPath)NuGet*.dll" />
<BuildOutputInPackage Include="$(OutputPath)Newtonsoft.Json.dll" />
</ItemGroup>
</Target>
<!-- If .NET Core, we embed a loader which will resolve the nuget packages for us -->
<PropertyGroup>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.loaderdata</AllowedOutputExtensionsInPackageBuildOutputFolder>
<DefineConstants Condition="'$(StrideNuGetResolverUX)' == 'true'">STRIDE_NUGET_RESOLVER_UX;$(DefineConstants)</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('netcoreapp')) Or $(TargetFramework.StartsWith('net5'))">
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.loaderdata</AllowedOutputExtensionsInPackageBuildOutputFolder>
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);_StridePackageNuGetLoader</TargetsForTfmSpecificBuildOutput>
</PropertyGroup>
<Target Name="_StridePackageNuGetLoader">
<Target Name="_StridePackageNuGetLoader" AfterTargets="CopyFilesToOutputDirectory">
<PropertyGroup>
<_StrideNuGetLoaderWindowsDesktop Condition="'$(_MicrosoftNetSdkWindowsDesktop)' == 'true'">true</_StrideNuGetLoaderWindowsDesktop>
<_StrideNuGetLoaderApplicationIcon Condition="'$(ApplicationIcon)' != ''">$(MSBuildProjectDirectory)\$(ApplicationIcon)</_StrideNuGetLoaderApplicationIcon>
@ -52,12 +38,10 @@
<!-- Write a small data file containing package and version to use for loader (let's not rely on NuGet layout/files such as .nuspec file in case it changes in the future) -->
<WriteLinesToFile File="$(OutputPath)Stride.NuGetLoader.loaderdata" Lines="$(PackageId)/$(PackageVersion)" Overwrite="true" />
<ItemGroup>
<BuildOutputInPackage Include="$(OutputPath)Stride.NuGetLoader.loaderdata" />
<BuildOutputInPackage Include="$(SolutionDir)..\sources\tools\Stride.NuGetLoader\bin\$(Configuration)\$(AssemblyName)\$(TargetFramework)\*.*" />
<None Include="$(OutputPath)Stride.NuGetLoader.loaderdata" Pack="true" PackagePath="tools\$(TargetFramework)\" />
<None Include="$(SolutionDir)..\sources\tools\Stride.NuGetLoader\bin\$(Configuration)\$(AssemblyName)\$(TargetFramework)\*.*" Pack="true" PackagePath="tools\$(TargetFramework)\" />
<!-- Rename Stride.NuGetLoader.exe into the expected application name -->
<BuildOutputInPackage Update="@(BuildOutputInPackage->'%(Identity)')" Condition="'%(Filename)%(Extension)' == 'Stride.NuGetLoader.exe'">
<TargetPath>%(RecursiveDir)$(AssemblyName).exe</TargetPath>
</BuildOutputInPackage>
<None Update="@(BuildOutputInPackage->'%(Identity)')" Condition="'%(Filename)%(Extension)' == 'Stride.NuGetLoader.exe'" Pack="true" PackagePath="tools\$(TargetFramework)\$(AssemblyName).exe" />
</ItemGroup>
</Target>
</Project>

Просмотреть файл

@ -2,7 +2,7 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<StrideEditorTargetFramework>net5.0-windows</StrideEditorTargetFramework>
<StrideEditorTargetFramework>net5.0-windows7.0</StrideEditorTargetFramework>
</PropertyGroup>
</Project>

Просмотреть файл

@ -59,7 +59,7 @@
<PropertyGroup Condition=" '$(StrideRuntime)' == 'true' ">
<!-- Add net5.0 no matter what (needed for references) -->
<StrideRuntimeTargetFrameworks>net5.0</StrideRuntimeTargetFrameworks>
<StrideRuntimeTargetFrameworks Condition="$(_StridePlatforms.Contains(';Windows;')) And '$(StrideRuntimeWindowsNet5)' == 'true'">$(StrideRuntimeTargetFrameworks);net5.0-windows</StrideRuntimeTargetFrameworks>
<StrideRuntimeTargetFrameworks Condition="$(_StridePlatforms.Contains(';Windows;')) And '$(StrideRuntimeWindowsNet5)' == 'true'">$(StrideRuntimeTargetFrameworks);net5.0-windows7.0</StrideRuntimeTargetFrameworks>
<StrideRuntimeTargetFrameworks Condition="$(_StridePlatforms.Contains(';UWP;'))">$(StrideRuntimeTargetFrameworks);uap10.0.16299</StrideRuntimeTargetFrameworks>
<StrideRuntimeTargetFrameworks Condition="$(_StridePlatforms.Contains(';Android;'))">$(StrideRuntimeTargetFrameworks);monoandroid81</StrideRuntimeTargetFrameworks>
<StrideRuntimeTargetFrameworks Condition="$(_StridePlatforms.Contains(';iOS;'))">$(StrideRuntimeTargetFrameworks);xamarinios10</StrideRuntimeTargetFrameworks>

Просмотреть файл

@ -82,7 +82,7 @@
<PropertyGroup>
<StrideUI Condition="'$(StridePlatform)' == 'Windows' Or '$(StridePlatform)' == 'Linux' Or '$(StridePlatform)' == 'macOS'">SDL</StrideUI>
<StrideUI Condition="'$(StrideGraphicsApi)' == 'OpenGL'">$(StrideUI);OPENTK</StrideUI>
<StrideUI Condition="$(TargetFramework.EndsWith('-windows')) AND ('$(StrideGraphicsApi)' == 'Direct3D11' Or '$(StrideGraphicsApi)' == 'Direct3D12')">$(StrideUI);WINFORMS;WPF</StrideUI>
<StrideUI Condition="$(TargetFramework.Contains('-windows')) AND ('$(StrideGraphicsApi)' == 'Direct3D11' Or '$(StrideGraphicsApi)' == 'Direct3D12')">$(StrideUI);WINFORMS;WPF</StrideUI>
<DefineConstants Condition="$(StrideUI.Contains('SDL'))">$(DefineConstants);STRIDE_UI_SDL</DefineConstants>
<DefineConstants Condition="$(StrideUI.Contains('OPENTK'))">$(DefineConstants);STRIDE_UI_OPENTK</DefineConstants>

Просмотреть файл

@ -47,7 +47,7 @@ namespace Stride.ConnectionRouter
}
// Make sure to use .exe rather than .dll (.NET Core)
var defaultRouterAssemblyLocation = Path.ChangeExtension(typeof(Router).Assembly.Location, ".exe");
var defaultRouterAssemblyLocation = LoaderToolLocator.GetExecutable(typeof(Router).Assembly.Location);
if (defaultRouterAssemblyLocation == null)
{
throw new InvalidOperationException("Could not find Connection Router assembly location");

Просмотреть файл

@ -38,6 +38,7 @@
<Compile Include="..\..\shared\Process\AndroidDeviceEnumerator.cs">
<Link>AndroidDeviceEnumerator.cs</Link>
</Compile>
<Compile Include="..\..\shared\LoaderToolLocator\LoaderToolLocator.cs" Link="LoaderToolLocator.cs" />
<Compile Update="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>

Просмотреть файл

@ -4,7 +4,7 @@
<PropertyGroup>
<OutputType Condition="'$(OutputType)' == ''">Exe</OutputType>
<TargetFramework>net5.0-windows</TargetFramework>
<TargetFramework>net5.0-windows7.0</TargetFramework>
<UseWpf>true</UseWpf>
<UseWindowsForms>true</UseWindowsForms>
<IntermediateOutputPath>obj\$(Configuration)\$(StrideApplicationName)</IntermediateOutputPath>

Просмотреть файл

@ -94,7 +94,7 @@ namespace Stride.VisualStudio.Commands
return null;
var commandAssembly = stridePackageInfo.SdkPaths.First(x => Path.GetFileNameWithoutExtension(x) == "Stride.VisualStudio.Commands");
var commandExecutable = Path.ChangeExtension(commandAssembly, ".exe"); // .NET Core: .dll => .exe
var commandExecutable = LoaderToolLocator.GetExecutable(commandAssembly); // .NET Core: .dll => .exe
var startInfo = new ProcessStartInfo
{

Просмотреть файл

@ -88,6 +88,7 @@
<Compile Include="..\..\core\Stride.Core\Annotations\NotNullAttribute.cs" Link="Core\Annotations\NotNullAttribute.cs" />
<Compile Include="..\..\shared\AttachedChildProcessJob.cs" Link="Commands\AttachedChildProcessJob.cs" />
<Compile Include="..\..\shared\Stride.NuGetResolver\RestoreHelper.cs" Link="NuGet\RestoreHelper.cs" />
<Compile Include="..\..\shared\LoaderToolLocator\LoaderToolLocator.cs" Link="Core\LoaderToolLocator.cs" />
</ItemGroup>
<ItemGroup>
<Compile Update="MyControl.xaml.cs">