mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-09-21 06:25:20 +00:00
Merge pull request #1087 from epsitec-sa/bug/#1084
Bug/#1084 - Visual studio loading issue
This commit is contained in:
8
Directory.Packages.props
Normal file
8
Directory.Packages.props
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
|
||||
<!-- This file prevents unintended imports of unrelated MSBuild files -->
|
||||
<!-- Uncomment to include parent Directory.Packages.props file -->
|
||||
<!--<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Packages.props', '$(MSBuildThisFileDirectory)../'))" />-->
|
||||
|
||||
</Project>
|
||||
@@ -145,7 +145,7 @@
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("Exception while executing OnAppReadyCallback. Stopping...\n" + ex);
|
||||
this.Stop();
|
||||
_ = this.Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
<ElectronSplashScreen>wwwroot\assets\img\about@2x.png</ElectronSplashScreen>
|
||||
<License>MIT</License>
|
||||
<ElectronSingleInstance>false</ElectronSingleInstance>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<ElectronBuilderVersion>26.0</ElectronBuilderVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
|
||||
@@ -4,9 +4,12 @@
|
||||
<PropertyGroup Label="ElectronNetCommon">
|
||||
<ElectronVersion>30.4.0</ElectronVersion>
|
||||
<ElectronBuilderVersion>26.0</ElectronBuilderVersion>
|
||||
<!-- Default to the host SDK's RID (e.g. linux-x64, win-x64, osx-arm64) when none is passed,
|
||||
so `dotnet build/publish` without -r targets the current OS. -->
|
||||
<RuntimeIdentifier Condition="'$(RuntimeIdentifier)' == ''">$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)</RuntimeIdentifier>
|
||||
<!-- Ensure runtime identifier can be overloaded -->
|
||||
<ElectronRuntimeIdentifier Condition="'$(RuntimeIdentifier)' == ''" />
|
||||
<!-- Using dotnet cli, itself builded with core runtime, we can access a self contained property with the runtime identifier -->
|
||||
<ElectronRuntimeIdentifier Condition="'$(ElectronRuntimeIdentifier)' == '' AND '$(MSBuildRuntimeType)' == 'Core'">$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)</ElectronRuntimeIdentifier>
|
||||
<!-- Otherwhise Full target framework is only available on Windows systems -->
|
||||
<ElectronRuntimeIdentifier Condition="'$(ElectronRuntimeIdentifier)' == '' AND '$(MSBuildRuntimeType)' == 'Full'">win-$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString().ToLower())</ElectronRuntimeIdentifier>
|
||||
<ElectronSingleInstance>true</ElectronSingleInstance>
|
||||
<ElectronSplashScreen></ElectronSplashScreen>
|
||||
<ElectronIcon></ElectronIcon>
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
<!-- Electron Builder uses title for the installation dir on Linux, but it should not have spaces -->
|
||||
<LinuxPrefix>linux</LinuxPrefix>
|
||||
<ElectronTitle>$(Title)</ElectronTitle>
|
||||
<ElectronTitle Condition="'$(RuntimeIdentifier.StartsWith($(LinuxPrefix)))' == 'true'">$(Title.Replace(' ', '-'))</ElectronTitle>
|
||||
<ElectronTitle Condition="'$(ElectronRuntimeIdentifier.StartsWith($(LinuxPrefix)))' == 'true'">$(Title.Replace(' ', '-'))</ElectronTitle>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -365,18 +365,18 @@
|
||||
<Target Name="ElectronCheckVersionMismatch">
|
||||
|
||||
<PropertyGroup>
|
||||
<ElectronArch Condition="'$(RuntimeIdentifier)' == 'win-x64'">x64</ElectronArch>
|
||||
<ElectronArch Condition="'$(RuntimeIdentifier)' == 'win-x86'">ia32</ElectronArch>
|
||||
<ElectronArch Condition="'$(RuntimeIdentifier)' == 'win-arm64'">arm64</ElectronArch>
|
||||
<ElectronArch Condition="'$(RuntimeIdentifier)' == 'linux-x64'">x64</ElectronArch>
|
||||
<ElectronArch Condition="'$(RuntimeIdentifier)' == 'linux-arm'">armv7l</ElectronArch>
|
||||
<ElectronArch Condition="'$(RuntimeIdentifier)' == 'linux-arm64'">arm64</ElectronArch>
|
||||
<ElectronArch Condition="'$(RuntimeIdentifier)' == 'osx-x64'">x64</ElectronArch>
|
||||
<ElectronArch Condition="'$(RuntimeIdentifier)' == 'osx-arm64'">arm64</ElectronArch>
|
||||
<ElectronArch Condition="'$(ElectronRuntimeIdentifier)' == 'win-x64'">x64</ElectronArch>
|
||||
<ElectronArch Condition="'$(ElectronRuntimeIdentifier)' == 'win-x86'">ia32</ElectronArch>
|
||||
<ElectronArch Condition="'$(ElectronRuntimeIdentifier)' == 'win-arm64'">arm64</ElectronArch>
|
||||
<ElectronArch Condition="'$(ElectronRuntimeIdentifier)' == 'linux-x64'">x64</ElectronArch>
|
||||
<ElectronArch Condition="'$(ElectronRuntimeIdentifier)' == 'linux-arm'">armv7l</ElectronArch>
|
||||
<ElectronArch Condition="'$(ElectronRuntimeIdentifier)' == 'linux-arm64'">arm64</ElectronArch>
|
||||
<ElectronArch Condition="'$(ElectronRuntimeIdentifier)' == 'osx-x64'">x64</ElectronArch>
|
||||
<ElectronArch Condition="'$(ElectronRuntimeIdentifier)' == 'osx-arm64'">arm64</ElectronArch>
|
||||
|
||||
<ElectronPlatform Condition="'$(RuntimeIdentifier)' == 'win-x64' OR '$(RuntimeIdentifier)' == 'win-x86' OR '$(RuntimeIdentifier)' == 'win-arm64'">win</ElectronPlatform>
|
||||
<ElectronPlatform Condition="'$(RuntimeIdentifier)' == 'linux-x64' OR '$(RuntimeIdentifier)' == 'linux-arm' OR '$(RuntimeIdentifier)' == 'linux-arm64'">linux</ElectronPlatform>
|
||||
<ElectronPlatform Condition="'$(RuntimeIdentifier)' == 'osx-x64' OR '$(RuntimeIdentifier)' == 'osx-arm64'">mac</ElectronPlatform>
|
||||
<ElectronPlatform Condition="'$(ElectronRuntimeIdentifier)' == 'win-x64' OR '$(ElectronRuntimeIdentifier)' == 'win-x86' OR '$(ElectronRuntimeIdentifier)' == 'win-arm64'">win</ElectronPlatform>
|
||||
<ElectronPlatform Condition="'$(ElectronRuntimeIdentifier)' == 'linux-x64' OR '$(ElectronRuntimeIdentifier)' == 'linux-arm' OR '$(ElectronRuntimeIdentifier)' == 'linux-arm64'">linux</ElectronPlatform>
|
||||
<ElectronPlatform Condition="'$(ElectronRuntimeIdentifier)' == 'osx-x64' OR '$(ElectronRuntimeIdentifier)' == 'osx-arm64'">mac</ElectronPlatform>
|
||||
|
||||
<!-- npm uses different OS names than Electron -->
|
||||
<NpmOs Condition="'$(ElectronPlatform)' == 'win'">win32</NpmOs>
|
||||
@@ -385,7 +385,7 @@
|
||||
|
||||
<!-- npm CPU is same as ElectronArch except for linux-arm -->
|
||||
<NpmCpu>$(ElectronArch)</NpmCpu>
|
||||
<NpmCpu Condition="'$(RuntimeIdentifier)' == 'linux-arm'">arm</NpmCpu>
|
||||
<NpmCpu Condition="'$(ElectronRuntimeIdentifier)' == 'linux-arm'">arm</NpmCpu>
|
||||
|
||||
<_CurrentOSPlatform Condition="$([MSBuild]::IsOSPlatform('Windows'))">win</_CurrentOSPlatform>
|
||||
<_CurrentOSPlatform Condition="$([MSBuild]::IsOSPlatform('Linux'))">linux</_CurrentOSPlatform>
|
||||
@@ -522,7 +522,7 @@
|
||||
|
||||
<Error Condition="'$(_IsPlatformMismatch)' == 'true'"
|
||||
Code="ELECTRON100"
|
||||
Text="The target RuntimeIdentifier '$(RuntimeIdentifier)' (platform: $(ElectronPlatform)) does not match the current operating system ($(_CurrentOSPlatform)).
|
||||
Text="The target RuntimeIdentifier '$(ElectronRuntimeIdentifier)' (platform: $(ElectronPlatform)) does not match the current operating system ($(_CurrentOSPlatform)).
|
||||
|
||||
Electron applications must be built on the target operating system:
|
||||
- Windows targets (win-x64, win-x86, win-arm64) must be built on Windows
|
||||
@@ -645,7 +645,10 @@ For more information, see: https://github.com/ElectronNET/Electron.NET/wiki/Migr
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<_NpxCmd>npx electron-builder --config=./$(ElectronBuilderJson) --$(ElectronPlatform) --$(ElectronArch) -c.electronVersion=$(ElectronVersion) -c.directories.output "$(ElectronPublishUrlFullPath)" $(ElectronPaParams)</_NpxCmd>
|
||||
<_NpxCmd>npx electron-builder --config=./$(ElectronBuilderJson)</_NpxCmd>
|
||||
<_NpxCmd Condition="'$(IsLinuxWsl)' == 'true'">$(_NpxCmd) --$(ElectronPlatform)</_NpxCmd>
|
||||
<_NpxCmd Condition="'$(IsLinuxWsl)' == 'true'">$(_NpxCmd) --$(ElectronArch)</_NpxCmd>
|
||||
<_NpxCmd>$(_NpxCmd) -c.electronVersion=$(ElectronVersion) -c.directories.output "$(ElectronPublishUrlFullPath)" $(ElectronPaParams)</_NpxCmd>
|
||||
<_NpxCmd Condition="'$(IsLinuxWsl)' == 'true'">wsl bash -ic '$(_NpxCmd)'</_NpxCmd>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user