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

Generating template gives System.Attribute defined in an assembly that is not referenced... #21

Closed
jonbarkerlondon opened this issue Nov 13, 2018 · 1 comment

Comments

@jonbarkerlondon
Copy link

I've attempted to add the reference to system.runtime but it doesn't make any difference.

An errors was occured on template compilation:

error CS0012: The type 'System.Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

Any idea why this would occurr? It's a pretty simple razor template, with some simple objects. No attributes on any of the objects.

@jonbarkerlondon
Copy link
Author

For anyone else having this problem - I switched to RazorEngine in the end, and used this solution.

Antaris/RazorEngine#416

Prehaps what they did there is possible for RazorTemplates too? If so maybe someone could post a code sample to explain how.

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