Xamarin: The specified path, file name, or both are too long.

Answered

Hi all.

We have an Android Xamarin solution build on TeamCity. But we get following error:

(_BuildAdditionalResourcesCache target) ->
[17:51:42][Step 3/8] C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(377,2): error : 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. [C:\mobile\Mobile.Droid\Mobile.Droid.csproj]

We are calling msBuild directly from an command line runner:

[17:51:31][Step 3/8] Starting: C:\mobile\make.bat
[17:51:31][Step 3/8] in directory: C:\mobile
[17:51:31][Step 3/8] Microsoft (R) Build Engine version 14.0.25420.1
[17:51:31][Step 3/8] Copyright (C) Microsoft Corporation. All rights reserved.......
 
The make file works great when run directly on the Build agent and on our development machines, but when run via teamCity, we get that elusive error above.
 
Any help and suggestions greatly appreciated, as we can not use TeamCity to build our mobile solutions, customer is waiting .. :( ..
 
Updated and Downgraded Xamarin, back and fourth, with no solution in sight, always the same error..
 
ps.
TeamCity Enterprise 9.0.3 (build 32334)
 
pps.
There is no help from the great Xamarin Team .. 

 

 
 
0
10 comments

Do you start the same make.bat from the TeamCity build step, or do you use MSBuild build step?

0
Avatar
Permanently deleted user

I run the make.bat file in build step.

Step 3/8] Starting: C:\mobile\make.bat

And I have tried using the build in  MsBuild runner and the VisualStudio build runners, with same error.

The strange thing is I can run the make file locally on the build agent, build the solution without any hiccup, but not via TeamCity.  :)..

Any suggestions ..

 

 

0

Are you sure you run this make.bat file on agent under the same user account which is being used by the agent?

0
Avatar
Permanently deleted user

I was not sure, but now Iam sure.

The build agent is running from a same user account as the logged in user when running the make.bat file locally.

TeamCity produces same error as above.

So its not the user account :( ..

 

0
Avatar
Permanently deleted user

I have recently used a program called Long Path Tool & i am so happy with the results that this particular program does. It did the job for me within a very short period of time. So no need to google each problem, just grab the program called Long Path Tool & this tool will rescue you out of this situation.

-1
Avatar
Permanently deleted user

hello, the best solution is can give is to to suggest the use of the long path tool. this resolves all issues concerning the path too long errors, and surely will make your work easier.

-1
Avatar
Permanently deleted user

Hi, I also encounter this type of problem . But only Long path tool help me resolved this. Try using it too. :) 

0
Avatar
Permanently deleted user

Working on windows have some of its own disadvantages, and this one is among those disadvantages. I would love to see when they will remove this error. Till then you can try GS Richcopy 360, I am also using to solve this discrepancy. It has saved my time and effort and maybe it can save yours too!

0
Avatar
Permanently deleted user

I would suggest to try "Long Path Tool" program.

0

Please sign in to leave a comment.