Repository navigation
Build fails with MSB3073 if there are spaces in the path #13740
Description
Activity
Hi @Tyrrrz I guess almost everyone working on the repo has no spaces in their path, so it regresses, then someone notices and it fixes, ..
We'd be happy to take a PR, if you're interested.
I suspect it is actually in this file, which is in another repo and we consume via Nuget
<Exec Command="$(_IlasmDir)ilasm $(_IlasmSwitches) $(_OutputTypeArgument) $(IlasmFlags) -OUTPUT="@(IntermediateAssembly)" $(_KeyFileArgument) @(Compile, ' ')">
should probably be
<Exec Command=""$(_IlasmDir)ilasm" $(_IlasmSwitches) $(_OutputTypeArgument) $(IlasmFlags) -OUTPUT="@(IntermediateAssembly)" $(_KeyFileArgument) @(Compile, ' ')">Reacted by Oleksii HolubThanks for the insight, I will take a look at that file and see how I can substitute the targets to test it out.
It actually turned out there are multiple instances of unquoted paths in the target file, besides the one you pointed out. I have fixed them one by one and it builds successfully now. Will submit a PR shortly.
- added a commit that references this issue
on Nov 7, 2019 Fix reverted in dotnet/coreclr#27793
- addeduntriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner
on Feb 23, 2020 - removeduntriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner
on May 11, 2020 - addedhelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributors
on Jun 3, 2020 Can confirm this is still happening.
@logiclrd we can accept more fixes, but the build is complex and apparently few people work with spaces in their path, including PR validation, so realistically this will keep breaking. Can you clone to a path without spaces?
It's actually my user profile path that has a space in it. There is a build targets file that generates a call to
ildasmbased on the user profile path and doesn't quote it. I ended up here from the closed issue #35785, and didn't read through it super carefully, since it was after all identified as a duplicate.I believe what's going on is that the tool it is trying to run is inside a NuGet package, and back when this issue was made, that NuGet package was in a
packagescache folder alongside the repo working copy. Now, with<PackageReference>, the V3 cache folder is shared, inside the user profile instead of inside the repo.'C:\Users\Jonathan' is not recognized as an internal or external command, operable program or batch file. C:\Users\Jonathan Gilbert\.nuget\packages\microsoft.net.sdk.il\5.0.0-preview.4.20202.18\targets\Microsoft.NET.Sdk.IL.targets(96,5): error MSB3073: The command "C:\Users\Jonathan Gilbert\.nuget\packages\\runtime.win-x64.microsoft.netcore.ildasm\5.0.0-preview.4.20202.18\runtimes\win-x64\native/ildasm "C:\code\runtime\artifacts\bin\ref\net5.0\System.Runtime.CompilerServices.Unsafe.dll" /OUT="C:\code\runtime\artifacts\obj\System.Runtime.CompilerServices.Unsafe\net5.0-Debug\/System.Runtime.CompilerServices.Unsafe.ref.il"" exited with code 9009. [C:\code\runtime\src\libraries\System.Runtime.CompilerServices.Unsafe\src\System.Runtime.CompilerServices.Unsafe.ilproj]I have created a local user account with no spaces in the name to try to move forward, but now that NuGet packages are coming out of the user profile path, it's not so simple for people to just change what path they're working with.
Reacted by Kevin JonesConfirmed that with a user profile in
C:\Users\Jonathaninstead ofC:\Users\Jonathan Gilbert,buildruns through to completion with no errors.- addedPriority:2Work that is important, but not critical for the releaseWork that is important, but not critical for the release
on Apr 24, 2023 - addedin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is merged
on Feb 15, 2025
OS: Windows 10
Head: 46bc2ab4d
If you clone the repository to a directory that has spaces in the path, the build will fail 5-15 minutes in with error code
MSB3073: The command "ilasm..." exited with code 9009.A few lines before that it actually says
Could not find a part of the path ...with the full path truncated at the occurrence of the whitespace.It seems this issue was also reported almost 4 years ago in dotnet/corefx#451 and seemingly fixed but I can reproduce it on the latest master as of the time of writing.
At the very least, it would be nice to mention this in the installation instructions.