.NET for Android error XA5301

Issue

The XA5301 error is generated from a Windows MAX_PATH failure: a file path over 260 characters was encountered somewhere throughout the build.

Consider submitting a bug if you are getting this failure under normal circumstances.

Solution

Rename your project to have a shorter name, or move the entire solution to a shorter path.

For example:

C:\Users\MyReallyLongUsername\Desktop\Code\MyReallyLongSolutionName

May fit under the MAX_PATH limit if it was instead:

C:\Code\MyReallyLongSolutionName

Alternatively in recent versions of Windows 10, you can opt into long paths via a Local Group Policy system-wide.