VCManagedResourceCompilerTool.ResourceFileName Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the name of the intermediate .resources file generated by this tool.
public:
property System::String ^ ResourceFileName { System::String ^ get(); void set(System::String ^ value); };
public:
property Platform::String ^ ResourceFileName { Platform::String ^ get(); void set(Platform::String ^ value); };
[System.Runtime.InteropServices.DispId(3)]
public string ResourceFileName { [System.Runtime.InteropServices.DispId(3)] get; [System.Runtime.InteropServices.DispId(3)] set; }
[<System.Runtime.InteropServices.DispId(3)>]
[<get: System.Runtime.InteropServices.DispId(3)>]
[<set: System.Runtime.InteropServices.DispId(3)>]
member this.ResourceFileName : string with get, set
Public Property ResourceFileName As String
Property Value
The name of the generated intermediate .resources file.
- Attributes
Examples
' 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
Remarks
Designers require the value of ResourceFileName to use the following format: <RootNamespace>.<ClassName>.Resources, where <RootNamespace> is the root namespace for the project and <ClassName> is the name of the class in the associated form file. If the resources are localized, then the locale needs to be part of the name as well. For example, French resources would use <RootNamespace>.<ClassName>.fr.resources.
See How to: Compile Example Code for Project Model Extensibility for information about how to compile and run this example.