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

Template.Compile fails #11

Open
SiccoOne opened this issue Oct 30, 2013 · 1 comment
Open

Template.Compile fails #11

SiccoOne opened this issue Oct 30, 2013 · 1 comment

Comments

@SiccoOne
Copy link

Hello,

I have problem with Template.Compile() method.

My template looks like:

    @foreach (var event in Model.Events){
  • @event.Name
  • }

That compilation works in Console Application and in one my test Windows Service, but fails in another Windows Service.
(but e.g. simple template like: @Model.Name works)

The generated source code is the same, but in Windows service I get TemplateCompilationException with many errors ( "} expected", "Type expected", "Invalid token...", etc).

Is possible that I'm missing some dependencies or is there some conflict with other references?

@netcore-jroger
Copy link

not use foreach. you can use forto do .

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

2 participants