F#WPF设置自定义程序集标题

F#WPF设置自定义程序集标题,wpf,f#,Wpf,F#,我正在使用F#WPF设计一个消费者应用程序,我注意到在C#项目中没有与AssemblyInfo.cs等效的程序集标题,我通常可以在其中定义自定义程序集标题。没有它,我的F#应用程序在任务管理器中显示为MyApp.exe,而我希望它只显示为MyApp 建议手动创建AssemblyInfo.fs。我试过这个: module AssemblyInfo open System open System.Reflection; open System.Runtime.InteropServices

我正在使用F#WPF设计一个消费者应用程序,我注意到在C#项目中没有与AssemblyInfo.cs等效的程序集标题,我通常可以在其中定义自定义程序集标题。没有它,我的F#应用程序在任务管理器中显示为
MyApp.exe
,而我希望它只显示为
MyApp

建议手动创建AssemblyInfo.fs。我试过这个:

module AssemblyInfo

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

[<assembly: AssemblyTitle("MyApp")>]
do()
模块组装信息
开放系统
开放系统;反思;
打开System.Runtime.InteropServices;
[]
do()
然而,它似乎不起作用


如何在F#应用程序中设置自定义程序集标题?

我对此进行了调查,发现仅凭程序集标题是不够的。正如您发现的那样,标题将不会出现在任务管理器中。您需要提供更多属性才能使该属性正常工作,但我不知道哪些属性起作用

这是我最初在VS2015中创建的项目中的一个文件。如果您在VS2013中使用它,请记住为使用它的每个程序集生成新的GUID。你可以在VS主菜单的某个地方这样做,也可以购买

AssemblyInfo.fs

namespace SecondDemo.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("SecondDemo")>]
[<assembly: AssemblyDescription("")>]
[<assembly: AssemblyConfiguration("")>]
[<assembly: AssemblyCompany("")>]
[<assembly: AssemblyProduct("SecondDemo")>]
[<assembly: AssemblyCopyright("Copyright ©  2017")>]
[<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("827700cd-54f6-4485-9239-fbd6af43c3e5")>]

// 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 ()
namespace secondemo.AssemblyInfo
开放系统。反射
open System.Runtime.CompilerServices
open System.Runtime.InteropServices
//有关部件的一般信息通过以下方式控制
//属性集。更改这些属性值以修改信息
//与程序集关联的。
[]
[]
[]
[]
[]
[]
[]
[]
//将ComVisible设置为false会使此程序集中的类型不可见
//到COM组件。如果需要从访问此程序集中的类型
//COM,将该类型的ComVisible属性设置为true。
[]
//如果此项目向COM公开,则以下GUID用于typelib的ID
[]
//程序集的版本信息由以下四个值组成:
// 
//主要版本
//次要版本
//建筑编号
//修改
// 
//可以指定所有值,也可以默认生成号和修订号
//通过使用如下所示的“*”:
// []
[]
[]
do()

它究竟是如何“似乎不起作用”的?您使用的是哪种IDE或编辑器?在VS 2015社区中,当我启动一个新的F#console项目时,它会自动创建。@FyodorSoikin程序集标题仍然在.exe的文件详细信息中丢失,任务管理器仍然显示
MyApp.exe
@GuyCoder我正在使用VS2013 Pro Update 5。您是否尝试过按照之前的C#应用程序中的属性指定所有属性有吗?