-
Notifications
You must be signed in to change notification settings - Fork 101
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
Can't add custom model to template as a parameter #132
Comments
Can you provide a small repro case, or at least a snippet of the code that causes this error? |
I have a similar problem. I set a variable with a type, defined in a custom assembly and get the same error message: "The type 'TestT4.DataItem' of the parameter 'MyVariable' did not match the type passed to the template". The same code works when I use a parameter of type "string". (See commented out part below.) Program.cs:
DataItem.cs:
|
I have a similar problem, do you have a solution ? |
Sorry, no. I solved my problem without T4 template. |
Finally, I use Razor Engine to templating, it's good |
I get the exception
The type '' of the parameter '' did not match the type passed to the template.
The types in the template and the type being passed in to the parameter definitely match.
I've added a reference to the correct assembly in the metadata and in the generator.
The custom model contains a collection of a second custom model. The child model then has a collection of another custom model. All other properties in the models are strings and integers.
Any help will be greatly appreciated.
The text was updated successfully, but these errors were encountered: