Sunday, December 12, 2010

F# project and AssemblyInfo

put the following code into your project and make this file's extension from .fs to .fsx.

.fs won't build, but .fsx will build.

open System.Reflection;
open System.Runtime.CompilerServices;
open System.Runtime.InteropServices;

// 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: AssemblyTitle("BB from © AA") > ]
[ < assembly: AssemblyDescription("BB") > ]
[ < assembly: AssemblyConfiguration("") > ]
[ < assembly: AssemblyCompany("AA") > ]
[ < assembly: AssemblyProduct("BB") > ]
[ < assembly: AssemblyCopyright("© AA. All rights reserved.") > ]
//[ < assembly: AssemblyTrademark("") > ]
[ < assembly: AssemblyCulture("") > ]

// 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.
[ < assembly: ComVisible(false) > ]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[ < assembly: Guid("c95f0dd1-9182-4d48-8bc2-b6cc2bca17bc5") > ]

// Version information for an assembly consists of the following four values:
//
//      Major Version
//      Minor Version
//      Build Number
//      Revision
//
// 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.*")]
[ < assembly: AssemblyVersion("1.0.1010.0032") > ]
[ < assembly: AssemblyFileVersion("1.0.1010.0032") > ]
()


I have to say I was wrong, you can still use it as a .fs file. But .fsi file should still work.