Phidiax Tech Blog

Adventures in custom software and technology implementation.

BizTalk Deployments may fail in .Net 4.0

This is not a BizTalk problem, this is a platform problem.
http://msdn.microsoft.com/en-us/library/aa365247.aspx
    MAX_PATH is hard coded in Windows to and limited to 260 bytes:
    stdlib.h:#define _MAX_PATH   260 /* max. length of full pathname */


In Visual Studio 2008 you are targeting .Net 2.0 not 4.0 so the assembly is pushed into the shorter named GAC location and doesn’t fail.

You file name is 101 characters, and that is too long for .Net 4.0 and here is why:

The first example of your assembly under .Net 4.0 and it is 272 bytes long.

You may notice that the length of the file name has a double impact because it is counted twice, once in the path and once in the file name.

.Net 4.0, 272 bytes long, exceeds the OS maximum of 260 characters:
    C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Company.CRM.BankingRelationships.Maps.MappingStuff.MyfancyMapResponseToFancyPathToMapAssemblyName\v4.0_1.0.0.0__99de785c001f001\Company.CRM.BankingRelationships.Maps.MappingStuff.MyfancyMapResponseToFancyPathToMapAssemblyName.dll

.Net 2.0, 258 characters, under the maximum limit of the OS:
    C:\Windows\assembly\GAC_MSIL\Company.CRM.BankingRelationships.Maps.MappingStuff.MyfancyMapResponseToFancyPathToMapAssemblyName\v4.0_1.0.0.0__99de785c001f001\Company.CRM.BankingRelationships.Maps.MappingStuff.MyfancyMapResponseToFancyPathToMapAssemblyName.dll

As a result you must change the name of your output assembly to (anything that is short enough to qualify):
    Company.CRM.BankingRelationships.Maps.MappingStuff.MyfancyMapResponseToPathToAssemblyName
.Net 4.0, 248 bytes long:
    C:\Windows\Microsoft.NET\assembly\Company.CRM.BankingRelationships.Maps.MappingStuff.MyfancyMapResponseToPathToAssemblyName\v4.0_1.0.0.0__99de785c001f001\Company.CRM.BankingRelationships.Maps.MappingStuff.MyfancyMapResponseToPathToAssemblyName.dll

Loading

Privacy Policy  |  Contact  |  Careers

2009-2017 Phidiax, LLC - All Rights Reserved