A template containing a class feature must end with a class feature

If you have had a play with the awesome Code generation tool that you can build yourself:

Walkthrough: Generating Code by using Text Templates

https://msdn.microsoft.com/en-us/library/dd820614.aspx

Then you might have had a small issue with the above error:

A template containing a class feature must end with a class feature

The error is caused by an invisible space after the last #>

It is also important to bear in mind, that invisible spaces may cause other hard-to-understand compile-errors.

If you want to see a bigger picture, just look at following links:

Now that you are aware how harmfull invisible spaces can be when dealing with Text Templates, my advice is: Make them visible. If you don’t know how to do it, see Jeef Widmer’s blog

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s