From 049b86712826560a0edf1cbb30dfc688256ee3f9 Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Sun, 12 May 2024 14:48:42 +0200 Subject: [PATCH] Special-case @file in FullyQualityPath to avoid situations like System.IO.IOException: The filename, directory name, or volume label syntax is incorrect. : 'D:\GitWorkspace\ILSpy\ILSpy.AddIn\bin\Debug\net472\@C:\Users\christophw\AppData\Local\Temp\tmp1E90.tmp' --- ILSpy/ILSpy.csproj | 1 - ILSpy/SingleInstanceHandling.cs | 6 +++++- publishlocaldev.ps1 | 10 ++++++++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ILSpy/ILSpy.csproj b/ILSpy/ILSpy.csproj index 9d2b317c2f..0ecb0caad8 100644 --- a/ILSpy/ILSpy.csproj +++ b/ILSpy/ILSpy.csproj @@ -66,7 +66,6 @@ - diff --git a/ILSpy/SingleInstanceHandling.cs b/ILSpy/SingleInstanceHandling.cs index 5a59f1ee25..5736dffc74 100644 --- a/ILSpy/SingleInstanceHandling.cs +++ b/ILSpy/SingleInstanceHandling.cs @@ -64,10 +64,14 @@ internal static string FullyQualifyPath(string argument) { // Fully qualify the paths before passing them to another process, // because that process might use a different current directory. - if (string.IsNullOrEmpty(argument) || argument[0] == '/') + if (string.IsNullOrEmpty(argument) || argument[0] == '-') return argument; try { + if (argument.StartsWith("@")) + { + return "@" + FullyQualifyPath(argument.Substring(1)); + } return Path.Combine(Environment.CurrentDirectory, argument); } catch (ArgumentException) diff --git a/publishlocaldev.ps1 b/publishlocaldev.ps1 index f236e56ea0..a8ebda02fd 100644 --- a/publishlocaldev.ps1 +++ b/publishlocaldev.ps1 @@ -1,7 +1,13 @@ -# For local development of the VSIX package - build and publish the x64 build only +# For local development of the VSIX package - build and publish (VS2022 also needs arm64) $output_x64 = "./ILSpy/bin/Debug/net8.0-windows/win-x64/publish/fwdependent" dotnet publish ./ILSpy/ILSpy.csproj -c Debug --no-restore --no-self-contained -r win-x64 -o $output_x64 dotnet publish ./ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj -c Debug --no-restore --no-self-contained -r win-x64 -o $output_x64 -dotnet publish ./ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj -c Debug --no-restore --no-self-contained -r win-x64 -o $output_x64 \ No newline at end of file +dotnet publish ./ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj -c Debug --no-restore --no-self-contained -r win-x64 -o $output_x64 + +$output_arm64 = "./ILSpy/bin/Debug/net8.0-windows/win-arm64/publish/fwdependent" + +dotnet publish ./ILSpy/ILSpy.csproj -c Debug --no-restore --no-self-contained -r win-arm64 -o $output_arm64 +dotnet publish ./ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj -c Debug --no-restore --no-self-contained -r win-arm64 -o $output_arm64 +dotnet publish ./ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj -c Debug --no-restore --no-self-contained -r win-arm64 -o $output_arm64 \ No newline at end of file