Allow xamarin android "way too long" without moving

I recently started getting the ResolveLibraryProjectImports: PathTooLongException in my xamarin android project inside xamarin.forms . When I look online, all decisions speak of a project relocation. Is there a way to change project properties or a reassignment method that can help me avoid moving the entire project?

Update:

Due to generosity, and since the question arose below, this is why I am looking for an alternative solution for moving:

Directory hierarchies exist for some reason. If not everyone would have a whole folder with roots. They are designed so that we can organize everything. Same thing in my case. I organized all the folders based on clouds, codes, frameworks, etc. Of all the frameworks I worked with, I never translated a project because of the internal requirements of the project. Thus, I see no reason why I need to move the project from all of these folders (which also means “cloud”) and throw them away at any place other than the rest, because the project asks for it.

+5
source share
2 answers

I came across the same question before, here is what I found:

Windows has a Maximum Maximum Length limit. You can see this in Windows Naming Files, Paths and Namespaces :

Limit the maximum path length . In the Windows API (with some exceptions described in the following paragraphs), the maximum path length is MAX_PATH, which is defined as 260 characters. The local path is structured in the following order: drive letter, colon, backslash, name components separated by backslashes, and the terminating null character. For example, the maximum path on drive D is "D: \ some 256-character path string", where "" represents the invisible terminating null character for the current system code page. (The <> characters are used here for visual clarity and cannot be part of a valid path line.) This is why you have a problem.

You can shorten the directory path in your project to solve this problem, another solution uses a long path tool. But as PierceBoggan said :

The easiest way to avoid this problem is to move your source to C: / (or another location with fewer characters in the path).


Update:

The problem has been fixed in Xamarin.Android 8.0.2.1 , and this version is included in Visual Studio 2017 version 15.4.2. You can read this document:

https://developer.xamarin.com/releases/android/xamarin.android_8/xamarin.android_8.0/#Issues_Fixed

+3
source

I also ran into this problem. Updating VS 2017 to 15.4.0 fixed this for me. Moving it closer to C: \ did not change anything.

+2
source

Source: https://habr.com/ru/post/1273097/


All Articles