-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Space in path causes ClassParse to fail #8049
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
@jpobst could this be something introduced by: dotnet/android#6551? |
Probably, I guess this doesn't automatically quote arguments: cmd.AppendSwitch ($"@{responseFile}"); I can fix this week. |
@jonathanpeppers It looks like @dellis1972 fixed this last month in dotnet/android@67ce902. Does this commit need to be copied to a release branch? |
Hmm, so it's combined with this other feature for compiling Java source... @jpobst would you be able to separate out the fix by itself, and do a PR for |
@jpobst I've noticed the same issue in the GenerateBindings target. It was also fixed in the commit you've linked. Just thought I'd point that before you separate out changes for this issue. See src/Xamarin.Android.Build.Tasks/Tasks/Generator.cs at line 239/240. |
Context: #5926 Fixes: dotnet/maui#8049 There was a bug causing response files to not work when trying to bind Java libraries in a path containing a space, since the CLI argument given to `class-parse`/`generator` was not properly quoted. This has been fixed in 67ce902, however this is a .NET 7 only PR. Pull the fix out of that PR and port it to the `6.0.4xx` branch so it will go into a .NET 6 servicing release.
Hi @HermanEldering. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version. You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
Description
When trying to compile a Jar project for Android the compilation fails when the path contains a space. It gives the following output:
If I run the command given below from the project directory then it doesn't show an error message, and a api.xml.class-parse exists in the obj folder. Note the added quotes for the command line parameter.
"C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Xamarin\Android\class-parse.exe" "@<mypath>\Release\class-parse.rsp"
Unfortunately, running this command manually does not enable building because the xml file needs to be processed to generate api.xml.
Steps to Reproduce
Visual Studio version 17.3 Preview 1.1
.NET 6.0.301
Version with bug
Unknown/Other (please specify)
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android (All)
Did you find any workaround?
No response
Relevant log output
The text was updated successfully, but these errors were encountered: