Browse Source

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'

pull/3205/head
Christoph Wille 1 year ago
parent
commit
049b867128
  1. 1
      ILSpy/ILSpy.csproj
  2. 6
      ILSpy/SingleInstanceHandling.cs
  3. 8
      publishlocaldev.ps1

1
ILSpy/ILSpy.csproj

@ -66,7 +66,6 @@ @@ -66,7 +66,6 @@
<EmbeddedResource Include="TextView\ILAsm-Mode.xshd" />
<EmbeddedResource Include="TextView\Asm-Mode.xshd" />
<EmbeddedResource Include="TextView\XML-Mode.xshd" />
<None Remove="Properties\launchSettings.json" />
</ItemGroup>
<ItemGroup>

6
ILSpy/SingleInstanceHandling.cs

@ -64,10 +64,14 @@ namespace ICSharpCode.ILSpy @@ -64,10 +64,14 @@ namespace ICSharpCode.ILSpy
{
// 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)

8
publishlocaldev.ps1

@ -1,7 +1,13 @@ @@ -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
$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
Loading…
Cancel
Save