Answered by:
xsd.exe 'path is too long after being fully qualified'

Question
-
Hello all,
I am attempting to use xml schemas to generate a class. Is there a way to name the output file?
For example:
When I run the following:
c:\xsd /classes /language:vb Assumption.Retirement.BenefitTypeSelection.xsd Assumption.Retirement.Dates.xsd Assumption.Retirement.DepositsRedeposits.xsd Assumption.Retirement.EstimateDescription.xsd Assumption.Retirement.Insurances.xsd Assumption.Retirement.LeaveProjection.xsd Assumption.Retirement.Pay.xsd Assumption.Retirement.SalaryEarningsProjection.xsd Assumption.Retirement.SurvivorBenefits.xsd Assumption.Retirement.Taxes.xsd Assumption.Retirement.WorkScheduleProjection.xsd DataStructures.Inputs.Retirement.Package.xsd DataStructures.Service.Breakdown.xsd DataStructures.Salary.History.xsd DataStructures.Salary.Earnings.xsd DataStructures.Service.History.xsd DataStructures.xsd /namespace:Assumption.Retirement.Package
I get the following error message:
The path is too long after being fully qualified. Make sure path is less than 260 characters.
Thanks in advance,
Wednesday, March 8, 2006 9:57 PM
Answers
-
Unfortunately xsd.exe does not allow you to specify output file name, but there is bug in the tool that could be used to workaround the "path too long" issue. xsd.exe appends all input file names to form the output files name, there is a bug in the algorithm: if any of the input files contain path characters, the resulting output string gets reset to the input file name, so if you specify your last input as .\xxx.xsd, the name of the resulting output file will be xxx.cs.
Hope it will work for you.
Thanks, Elena
Tuesday, March 14, 2006 2:05 AM
All replies
-
Unfortunately xsd.exe does not allow you to specify output file name, but there is bug in the tool that could be used to workaround the "path too long" issue. xsd.exe appends all input file names to form the output files name, there is a bug in the algorithm: if any of the input files contain path characters, the resulting output string gets reset to the input file name, so if you specify your last input as .\xxx.xsd, the name of the resulting output file will be xxx.cs.
Hope it will work for you.
Thanks, Elena
Tuesday, March 14, 2006 2:05 AM -
Elena, thank you very much for your workaround!Wednesday, May 7, 2008 11:46 AM
-
I've been using this hack for a while, but it seems to not work in NETFX 4.0 now (I might have somthing else misconfigured though... havnet finished digging this up).
But, wanted to add here: if you have a bunch of xsd files to compile (like I do), you can create a new xsd that has includes for all the others. Should do the trick, and will avoid this problem with the too long file name output...
Saturday, July 17, 2010 3:32 PM -
I've been using this hack for a while, but it seems to not work in NETFX 4.0 now (I might have somthing else misconfigured though... havnet finished digging this up).
But, wanted to add here: if you have a bunch of xsd files to compile (like I do), you can create a new xsd that has includes for all the others. Should do the trick, and will avoid this problem with the too long file name output...
Could you give a small example of this?
Friday, April 4, 2014 12:02 PM