fix: Visual studio load issue

This commit is contained in:
Samuel Nussbaum
2026-07-24 15:13:47 +02:00
parent 95089e1721
commit 3fecc0ee1b

View File

@@ -5,8 +5,13 @@
<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>
so `dotnet build/publish` without -r targets the current OS.
RuntimeInformation.RuntimeIdentifier only exists on .NET 5+, so it's only safe to call
when MSBuild itself is hosted on .NET (Core). Visual Studio's bundled MSBuild.exe runs on
.NET Framework (MSBuildRuntimeType == 'Full'), where that member doesn't exist and the
property function would throw during evaluation, failing solution load. -->
<RuntimeIdentifier Condition="'$(RuntimeIdentifier)' == '' AND '$(MSBuildRuntimeType)' == 'Core'">$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)</RuntimeIdentifier>
<RuntimeIdentifier Condition="'$(RuntimeIdentifier)' == ''">win-x64</RuntimeIdentifier>
<ElectronSingleInstance>true</ElectronSingleInstance>
<ElectronSplashScreen></ElectronSplashScreen>
<ElectronIcon></ElectronIcon>