Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Long paths when building with NuGet

We are making a framework and sell the sources to the customer. Yesterday one of the customers reported that he cannot build the sources because of the too long paths. I found that the longest path we have in the sources is the path produced by NuGet, and it is: project\packages\EnterpriseLibrary.ExceptionHandling.Logging.5.0.505.0\lib\NET35\Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.dll.

Together with the folder name where the customer placed the sources (it's not so long, about 90 chars), and strange VS behavior when it composes absolute paths with c:\blablabla... ..\..\..\something it exceeds limit of 260 chars and his VS is not able to compile the solution.

Anyhow I can solve this problem? I am not able to ask the customer to place the sources closer to the disk root - he has his own agreements on where to place the code inside his company. I could also rename this dll, but I do not want to loose NuGet support.

like image 884
Archeg Avatar asked Nov 12 '22 19:11

Archeg


1 Answers

There is not much you can do. If your sources compile in a reasonable path (Lets say "D:\ExternalCode\yourcode") it's really up to your customer to handle this. What if a customer decides your code has to compile in a path that is already 240 characters before your solution? Will you shorten all your names?

What you need to do is provide a clean and easy manual how to build your code. Errors that stem from path length are to be addressed and you have to provide a solution. That solution may well be "shorten the path our code is deployed to". You cannot accomodate to the rules and regulations of every single other company out there.

like image 94
nvoigt Avatar answered Nov 14 '22 23:11

nvoigt