Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T4 template fails tor run with ReflectionTypeLoadException #72

Open
garethbrading-cl opened this issue May 31, 2023 · 0 comments
Open

Comments

@garethbrading-cl
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant