Bug 38336 - The Nuget/package directory is unnecessarily long for Xamarin.Forms
Summary: The Nuget/package directory is unnecessarily long for Xamarin.Forms
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: unspecified
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-02-02 22:21 UTC by Kyle White
Modified: 2017-05-30 22:58 UTC (History)
7 users (show)

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

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Kyle White 2016-02-02 22:21:30 UTC
After installing Xamarin.Forms nuget package, the package directory is as follows: "packages/Xamarin.Forms.2.0.1.6495/lib/portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10/" 

For the dll with the most characters (Xamarin.Forms.Platform.dll) it is a combined 140 characters. 

Windows has a path limit of 260 characters or you get this exception:
System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

Is there any way to cut down the length of the package directory? Xamarin.Forms package currently chews up more than half of that character limit. In a complex solution this could be very limiting.
Comment 1 Matt Ward 2016-02-03 09:32:00 UTC
MonoAndroid, MonoTouch and Xamarin.iOS could be removed from the portable directory since they are optional. Which would drop the length down to 73 characters.

packages/Xamarin.Forms.2.0.1.6495/lib/portable-win+net45+wp80+win81+wpa81

In general this Windows limit is something that can be easily reached with Android projects. If you add the Xamarin.GooglePlayService NuGet package and build the project you end up with various GooglePlayService directories inside the packages directory, such as:

packages\Xamarin.GooglePlayServices.19.0.0.1\lib\MonoAndroid23\19\content\google-play-services\libproject\google-play-services_lib\src\android
Comment 2 Stephane Delcroix 2017-05-30 12:54:21 UTC
https://github.com/xamarin/Xamarin.Forms/pull/945
Comment 3 Rui Marinho 2017-05-30 22:58:14 UTC
Should be fixed on 2.3.6-pre1