共用方式為


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 命名空間