VCManagedResourceCompilerTool.ResourceFileName 属性

获取或设置此工具生成的中间 .resources 资源文件的名称。

命名空间:  Microsoft.VisualStudio.VCProjectEngine
程序集:  Microsoft.VisualStudio.VCProjectEngine(在 Microsoft.VisualStudio.VCProjectEngine.dll 中)

语法

声明
Property ResourceFileName As String
string ResourceFileName { get; set; }
property String^ ResourceFileName {
    String^ get ();
    void set (String^ value);
}
abstract ResourceFileName : string with get, set
function get ResourceFileName () : String 
function set ResourceFileName (value : String)

属性值

类型:String
生成中间 .resources 文件的名称。

备注

设计器需要 ResourceFileName 值使用以下格式:<RootNamespace>。<ClassName>。资源,<RootNamespace> 项目的根命名空间和 <ClassName> 是类的名称在关联窗体的文件。 如果资源本地化区域设置,则需要名称的一部分。 例如,法语资源是使用 <RootNamespace>。<ClassName>.fr.resources。

有关如何编译和运行该示例的信息,请参见 如何:编译项目模型扩展性示例代码

示例

' Add a reference to Microsoft.VisualStudio.VCProjectEngine and have a 
' Visual C++ project loaded before running this example.
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine
Public Module Module1
    Sub Test()
        Dim prj As VCProject
        Dim cfgs, tools As IVCCollection
        Dim cfg As VCFileConfiguration
        Dim tool As VCManagedResourceCompilerTool
        Dim file As VCFile
        prj = DTE.Solution.Projects.Item(1).Object
        file = prj.Files("Form1.resx")
        cfgs = file.FileConfigurations
        cfg = cfgs.Item(1)
        tool = cfg.Tool
        MsgBox("Resource file name: " & tool.ResourceFileName)
    End Sub
End Module

.NET Framework 安全性

请参阅

参考

VCManagedResourceCompilerTool 接口

Microsoft.VisualStudio.VCProjectEngine 命名空间