tlbexp.exe, asmpath, and spaces

0

I am trying to run tlbexp.exe from a MSBuild script, and I'm feeding it the directories of the reference paths MSBuild is aware of:

<Exec Command="&quot;$(TargetFrameworkSDKToolsDirectory)tlbexp.exe&quot; &quot;$(IntermediateOutputPath)$(TargetName)$(TargetExt)&quot; /out:&quot;$(IntermediateOutputPath)$(TargetName).tlb&quot; @(TlbExpReferencePaths->'/asmpath:%(FullPath)', ' ')" />

Which is producing the following command line:

" C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\tlbexp.exe" "obj\Debug\net45\FileAndServe.Xpress.LN.TexFile.Manager.Client.dll" /out:"obj\Debug\net45\FileAndServe.Xpress.LN.TexFile.Manager.Client.tlb" /asmpath:C:\Users\wasabi\Development\FileAndServeXpress\src\FileAndServe.Xpress.LN.Enums\bin\Debug\net45\ /asmpath:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\ /asmpath:C:\Users\wasabi\.nuget\packages\mvp.xml\2.3.0\lib\net20\ /asmpath:C:\Users\wasabi\.nuget\packages\lextm.sharpsnmplib\7.0.0.2\lib\net40\ /asmpath:C:\Users\wasabi\.nuget\packages\smapi\1.0.0\lib\ /asmpath:C:\Users\wasabi\Development\FileAndServeXpress\src\FileAndServe.Xpress.LN.TexFile.Manager.Client\obj\Debug\net45\

Which is erroring:

Error: Type library exporter cannot load type 'LexisNexis.FileAndServe.BusinessEntity.Validation.BrokenRulesList' (error: Could not load file or assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified. (Exception from HRESULT: 0x80070002)).

My assumption here is the /asmpath to Program Files, etc, has a path in it, and it's not being parsed out right. But, if I surround paths with ", tlbexp complains about invalid characters in path names. It's not handling quotes:

Unhandled Exception: System.ArgumentException: Illegal characters in path.

Is anybody aware of some magic for tlbexp? I'm running out of ideas.

Doesn't work from the command line either.

.net
com
tlbexp
asked on Stack Overflow Dec 20, 2017 by Jerome Haltom • edited Dec 20, 2017 by Jerome Haltom

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0