JetBrains / JetBrains/ForTea

T4 template fails tor run with ReflectionTypeLoadException

Open
#72 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
58
Forks
13
Avg merge
5h 4m
Merged PRs (30d)
7

Description

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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.