update the Wiring C.W. into Your Project page.

master
Craig Oates 5 years ago
parent
commit
6a00adbd50
  1. 72
      Wiring-Console.Waterworks-into-Your-Project.md

72
Wiring-Console.Waterworks-into-Your-Project.md

@ -47,14 +47,78 @@ SCREENSHOT OF ASSEMBLY INFO SHOWING AT RUN-TIME.
## Changing the Assembly Information for you Console Program
To change your console program's assembly information, you need to alter its "Assemblyinfo.fs" file. There are several ways to do this and it differs between the tradition .Net and .Net Core versions.
To change your console program's assembly information, you need to alter its "Assemblyinfo.fs" file. There are several ways to do this and it differs between the traditional .Net and .Net Core versions.
### .Net
Need to create an assembly info file if one does not exist...
One way to change the assembly information in your .Net program is to alter it via the "Properties" menu. For a more detailed guide, you can use the following links;
- [Setting Assembly Attributes](https://docs.microsoft.com/en-us/dotnet/framework/app-domains/set-assembly-attributes): This applies to the traditional and Core versions of .Net. It provides information on what resides in an Assembly Information manifests and files.
- [How to Target a version of .Net](https://docs.microsoft.com/en-us/visualstudio/ide/how-to-target-a-version-of-the-dotnet-framework?view=vs-2019): This provides extra context on the Properties page in Visual Studio and how it fits the Assembly Information dialog box into it -- from a traditional .Net angle.
- [The AssemblyInfo.fs file for BrittleFish](https://gitlab.com/craig.oates/Brittle-Fish/blob/master/BrittleFish/AssemblyInfo.fs): The actual Assembly Information file for the BrittleFish console program. Use this as a reference for your own projects.
You might find you do not have a file called "AssemblyInfo.fs" within your project. If you are unfamiliar with these types of files, feel free to peruse the links above for help on learning how to add it. As an alternative, you can create a file in your project (in Visual Studio) and call it "AssemblyInfo.fs" -- make sure it is at the **root** level. From there, you can copy and paste the following code block into it (making sure you replace the code wrapped in `{delete the braces when you add your own info.}`);
```f#
namespace {YOUR-PROJECT-NAME-HERE}.AssemblyInfo
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("")>]
[<assembly: AssemblyDescription("")>]
[<assembly: AssemblyConfiguration("")>]
[<assembly: AssemblyCompany("")>]
[<assembly: AssemblyProduct("")>]
[<assembly: AssemblyCopyright("")>]
[<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
// You should generate a new Guid here...
[<assembly: Guid("9d146c28-drde-8c70-bdc5-44b68925ca07")>]
// 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.0.0")>]
[<assembly: AssemblyFileVersion("1.0.0.0")>]
do
()
```
To help you get a sense of where this file should live, please review the file structure for BrittleFish. You can do that by using the following link;
- [BrittleFish (Console Project) File Structure](https://gitlab.com/craig.oates/Brittle-Fish/tree/master/BrittleFish)
### .Net Core
One way to change the assembly information in your .Net Core program is to alter it via the properties menu...
Like the traditional .Net version, you can use the Properties dialog box in Visual Studio. Use the links below for extra information, which are;
- [Application Page, Project Designer (C#)](https://docs.microsoft.com/en-us/visualstudio/ide/reference/application-page-project-designer-csharp?view=vs-2019): This show you how to access the Properties page box and provides more information on how the Assembly Information dialog box fits into it -- from a .Net Core perspective.
- [The AssemblyInfo.fs file for BrittleFishCore](https://gitlab.com/craig.oates/Brittle-Fish/blob/master/BrittleFishCore/AssemblyInfo.fs): The actual Assembly Information file for the BrittleFishCore console program. Use this as a reference for your own projects.
I tend to find, Visual Studio automatically makes a "AssemblyInfo.fs" file when I create a .Net Core project. So, I do not need to go out of my way to make one. If, for some reason, you find yourself without one, you can use the same technique in the ".Net" section above. The same applies to the code block within it.
Like the section above, you can get a sense of where "AssemblyInfo.fs" should live (in a .Net Core project) by reviewing the file structure for BrittleFishCore. You can do that by using the following link;
- [BrittleFishCore (Console Project) File Structure](https://gitlab.com/craig.oates/Brittle-Fish/tree/master/BrittleFishCore)
THIS IS NOT FINISHED.

Loading…
Cancel
Save