This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
We use StyleCop for code analysis in our organization. Style cop requires that certain coding conventions be followed. The auto generated files created by LightSpeed do not conform to StyleCop requirements. StyleCop will, however, ignore all files that include an auto-generated comment at the top of the file formatted like this:
Would it be possible to include this comment in files generated by the LightSpeed designer? |
|
|
As a side note the StyleCop docs state this as the minimum requirement: A file that is completely auto-generated by a tool, and which should not be checked or enforced by StyleCop, can include an “auto-generated” header rather than the standard file header. This will cause StyleCop to ignore the file. This type of header should never be placed on top of a manually written code file.
|
|
|
You can customise the template generation to add this header to the top of the file by using custom templates. We generally recommend this is done on a per-project basis so you can manage any custom templates as part of your standard source control for the project. Here is a blog post which gives the details on what you need to do for this http://www.mindscapehq.com/blog/index.php/2009/09/16/customising-lightspeed-entity-templates/
|
|
|
Thank you, I tried this process but when I got to: "Then go into Solution Explorer, select the project node and look at the Properties grid. If the project contains a LightSpeed model (a .lsmodel file), you’ll see an extra entry here called LightSpeed Template File." The template file entry does not exist in my project properties. I only have project file and project folder. I'm using VS2013 has this been verified to work with this version? |
|
|
Yes, we are not aware of any problems with VS2013 - Ive just tested this out myself again on a couple of projects to double check :) What type of project are you working with? Perhaps its more a project template related issue.
|
|
|
It is a C# class library that contains all of my DB access stuff. |
|
|
Hmm definitely shouldnt be a project related issue then as thats primarily what I use :) Ive checked again this evening on a fresh installation and its showing up for me. Can you try un-installing and then re-installing LightSpeed and see if this resolves the issue?
|
|
|
No Joy. I uninstalled and then installed the latest nightly build (04 December 2013) and still I cannot set the template location. I have attached an clip of the project properties. Could this be due to the fact that I use Windows 8.1? Could it be caused by another extension that I have installed? |
|
|
Never Mind. I added a second model (and promptly deleted it) to my project and the property is now there.... Strange. |
|
|
Odd indeed! Let us know if you do happen to see a pattern, would be useful to know whats happening here and if there is anything we can do to make sure its always present.
|
|