ImportLibrary Property
Collapse the table of content
Expand the table of content

ImportLibrary Property

Visual Studio .NET 2003

Specifies which import library to generate or reports which import library will be generated by the configuration. Exposes the functionality of the /IMPLIB linker option.

[Visual Basic .NET]
Public ReadOnly Property ImportLibrary() As String
[Visual Basic 6]
Property Get ImportLibrary() As String
HRESULT __stdcall get_ImportLibrary(
   /* [out, retval] */ BSTR* retVal
public string ImportLibrary {get;}
[JScript .NET]
public function get ImportLibrary() : String


On the VCConfiguration object, this is a read-only property.


The following sample code modifies the ImportLibrary linker property in the development environment:

' add reference to Microsoft.VisualStudio.VCProjectEngine
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine

Public Module Module1
    Sub Test()
        Dim prj As VCProject
        Dim cfgs, tools As IVCCollection
        Dim cfg As VCConfiguration
        Dim tool As VCLinkerTool
        prj = DTE.Solution.Projects.Item(1).Object
        cfgs = prj.Configurations
        cfg = cfgs.Item(1)
        tool = cfg.Tools("VCLinkerTool")
        tool.ImportLibrary = "$(OutDir)\myimplib.lib"
    End Sub
End Module

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

See Also

Applies To: VCConfiguration Object | VCLinkerTool Object

© 2015 Microsoft