Skip to content

Commit

Permalink
Special-case @file in FullyQualityPath to avoid situations like Syste…
Browse files Browse the repository at this point in the history
…m.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'
  • Loading branch information
christophwille committed May 12, 2024
1 parent d222178 commit 049b867
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
1 change: 0 additions & 1 deletion ILSpy/ILSpy.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
6 changes: 5 additions & 1 deletion ILSpy/SingleInstanceHandling.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 8 additions & 2 deletions publishlocaldev.ps1
Original file line number Diff line number Diff line change
@@ -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
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

0 comments on commit 049b867

Please sign in to comment.