Bug 59651 - Xamarin.Forms build fails with command line overflow.
Summary: Xamarin.Forms build fails with command line overflow.
Status: VERIFIED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: 15.5
Assignee: dean.ellis
URL:
: 59828 60173 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-09-21 15:31 UTC by Chris King
Modified: 2017-10-17 12:16 UTC (History)
7 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description Chris King 2017-09-21 15:31:27 UTC
See slack discussion: https://xamarinhq.slack.com/archives/C6WEH8DHN/p1506005666000353

Error in-lined here as well:

4>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2098,3): warning MSB6002: The command-line for the "CompileToDalvik" task is too long. Command-lines longer than 32000 characters are likely to fail. Try reducing the length of the command-line by breaking down the call to "CompileToDalvik" into multiple calls with fewer parameters per call.

4>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2098,3): error MSB6003: The specified task executable "java.exe" could not be run. The filename or extension is too long
Comment 1 Chris King 2017-09-21 15:34:20 UTC
To reproduce, install this VSIX over VS 2017:

https://bosstoragemirror.azureedge.net/wrench/monodroid-mavericks-rodos-playground/2e/2e481936d38e236ebfd77816c991d46ad12f55db/Xamarin.Android.Sdk.8.0.99.24.vsix

Then load the master branch of Xamarin.Forms solution. Ignore the projects that won't load. And unload any project with iOS or MacOS in it's name.

Build.
Comment 2 dean.ellis 2017-09-22 09:04:53 UTC
PR up https://github.com/xamarin/xamarin-android/pull/888
Comment 3 Peter Collins 2017-10-06 13:24:28 UTC
Marking as fixed as the PR mentioned in Comment #2 has been merged.
Comment 4 Alper Ebicoglu 2017-10-13 05:52:51 UTC
hi, 
Today i updated Visual Studio to the latest (15.5.0 Preview 1.0). Since the update, I've been getting this build error with Xamarin Android project. PCL and IOS has no problem.

Error window:
"The specified task executable “java.exe” could not be run. The filename or extension is too long".

Output window:
C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2092,3): warning MSB6002: The command-line for the "CompileToDalvik" task is too long. Command-lines longer than 32000 characters are likely to fail. Try reducing the length of the command-line by breaking down the call to "CompileToDalvik" into multiple calls with fewer parameters per call.

C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2092,3): error MSB6003: The specified task executable "java.exe" could not be run. The filename or extension is too long


Sometimes visual studio is stucked while opening the project and i restart a couple of times to open it. I have changed OutputPath and IntermediateOutputPath of the projects to prevent too long path errors.


<OutputPath>C:\BIN\</OutputPath>
<IntermediateOutputPath>C:\OBJ\</IntermediateOutputPath>

My development has been stopped due to this error. I need help!
Comment 5 Mbah Clinton 2017-10-13 08:43:19 UTC
Hey guys. I'm also facing this issue. I update to VS 17 Community Edition 15.5 Preview 1 and started facing this build error. My development at work has halted because of this issue. Please let me know what to do.
Comment 6 Alper Ebicoglu 2017-10-13 11:44:10 UTC
By the way my solution is located at D:\Github\XamarinProject. So it's short enough not to get any too long path error.
Comment 7 Kevin 2017-10-13 13:36:00 UTC
Same here, loaded a project I didn't touch for a few months and I have the same error.
There's been a regression somewhere.

Microsoft Visual Studio Community 2017 Preview
Version 15.5.0 Preview 1.0
VisualStudio.15.Preview/15.5.0-pre.1.0+27009.1
Microsoft .NET Framework
Version 4.7.02046

Xamarin   4.8.0.599 (378e765b4)
Xamarin.Android SDK   8.1.0.19 (HEAD/2039d375e)
Xamarin.iOS and Xamarin.Mac SDK   11.4.0.76 (12222fe)
Comment 8 Peter Collins 2017-10-13 19:17:15 UTC
*** Bug 59828 has been marked as a duplicate of this bug. ***
Comment 9 Peter Collins 2017-10-13 19:17:27 UTC
Verified fixed against monodroid/d15-5/d3e59736.

This issue will be fixed in the upcoming 15.5.0 Preview 2.
Comment 10 Peter Collins 2017-10-13 20:52:53 UTC
*** Bug 60173 has been marked as a duplicate of this bug. ***
Comment 11 David Synott 2017-10-17 12:16:02 UTC
Hi. My work is halted whilst this is a bug. Is there a timeline for preview 2 or a work around? I cannot run my project any more. I cannot work.

Note You need to log in before you can comment on or make changes to this bug.