ResourceFileName Property
TOC
Collapse the table of content
Expand the table of content

ResourceFileName Property

Visual Studio .NET 2003

Sets or returns the name of the intermediate .resources file generated by this tool.

[Visual Basic .NET]
Public Property ResourceFileName() As String
[Visual Basic 6]
Property Get ResourceFileName() As String
Property Let ResourceFileName( _
   ByVal NewValue As String _
) 
[C++]
HRESULT __stdcall get_ResourceFileName(
   /* [out, retval] */ BSTR* retVal
);
HRESULT __stdcall put_ResourceFileName(
   /* [in] */ BSTR NewValue
);
[C#]
public string ResourceFileName {get; set;}
[JScript .NET]
public function get ResourceFileName() : String
public function set ResourceFileName(
   NewValue : String
)

Parameters

NewValue
The name of the intermediate .resources file to generate.

Return Value

The name of the generated intermediate .resources file.

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.

Example

' Add a reference to Microsoft.VisualStudio.VCProjectEngine and have a 
' Visual C++ .NET 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

See Samples for Project Model Extensibility for information on how to compile and run this sample.

See Also

Applies To: VCManagedResourceCompilerTool Object

Show:
© 2016 Microsoft