JetBrains / ForTea

Apache License 2.0
56 stars 10 forks source link

T4 template fails tor run with ReflectionTypeLoadException #72

Open garethbrading-cl opened 1 year ago

garethbrading-cl commented 1 year ago

I have a T4 template that has worked for a long while in VS but I cannot for the life of me get it running in Rider. This issue is literally the only reason I still have VS installed, otherwise I'd be entirely Rider :(.

My template attempts to call Assembly.GetTypes() and when it hits this statement I get the following exception: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

Inspecting the LoaderExceptions I get a bunch of these complaining about my code not implementing methods. Method 'Apply' in type '{My.Type}' from assembly '{My.Assembly}, Version=2.96.4.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.

These methods all 100% do have an implementation. I've tried clearing out binaries and rebuilding but to no avail. Like I said, this works in the VS generator, it's just Rider (or ForTea I guess) that has the issue.

Obviously this issue is within my own template code so I'm not sure how much you can help, but the fact that it works in VS but not ForTea suggests that ForTea might be doing something different when referencing the assemblies?