[MonoDevelop] Problems with assembly loading under TextTransform.exe

Tom Cook tom.k.cook at gmail.com
Wed Nov 25 09:36:32 UTC 2015


I'm porting some T4 templates from the Microsoft .NET Framework to Mono.
They use an in-house assembly called DataModelDefinition, which in turn
uses the Microsoft.CodeAnalysis and Microsoft.CodeAnalysis.CSharp
assemblies to process some C# code.

When I try to run one of these templates, I get the following error:

> $ TextTransform.exe -P=<path to assemblies> -o test.txt ProcessFiles.tt
> <a bunch of expected output from my code>
> Invalid type Microsoft.CodeAnalysis.SyntaxTree for instance field
Microsoft.CodeAnalysis.SyntaxNode:_syntaxTree
> Invalid type Microsoft.CodeAnalysis.SyntaxNode for instance field
Microsoft.CodeAnalysis.SyntaxToken:parent
> Failed to generate <path>/ProjectInfo.xml because :
> Could not load type 'Microsoft.CodeAnalysis.SyntaxToken' from assembly
'Microsoft.CodeAnalysis, Version=0.6.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35'.
>
> Stack trace:
>   <a bunch of files within the DataModelDefinition assembly>

But if I write a stand-alone console programme that references the same
assemblies and invokes the same method, it works without a problem.

What could cause the failure to load these types?

I'm trying to put together a simple test case that demonstrates the
problem; I'll get back when I've got something together.

Regards,
Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/monodevelop-list/attachments/20151125/7764a526/attachment.html>


More information about the Monodevelop-list mailing list