So to round out the templates for a while, the final one I have created is an Item Template for creating an Assembly Information File:
The template can be found on the Visual Studio Gallery at:
The reason this one came about was due to the fact version 1.1 of the F# Windows Application templates now provide this capability.
This extension creates a file called AssemblyInfo.fs, that contains the standard assembly definitions usually associated with other programming languages. The generated code is as follows:
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[<assembly: AssemblyCopyright(“Copyright ? Microsoft 2011”)>]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
// The following GUID is for the ID of the typelib if this project is exposed to COM
// Version information for an assembly consists of the following four values:
// Major Version
// Minor Version
// Build Number
// You can specify all the values or you can default the Build and Revision Numbers
// by using the ‘*’ as shown below:
// [assembly: AssemblyVersion(“1.0.*”)]
As all F# code files must do something, the final line is essentially the code that is executed. Remember, the added file cannot be the last source file in a project so it will have to be moved up the source file list.
Once this assembly information file is included in your project, you will be able to see the usual property definitions associated with the assembly:
Once again, hope this is useful.
Written by Carl Nolan