Hi,
I'm trying to retrieve the output filename of my active project in the
active configuration.
I have tried many stuff and I'm quite desesperate.
On MSDN I have found the following sample. But, VCProject, VCLinkerTool,
etc...are unknow even if I import Microsoft.VisualStudio.VCProjectEngine as
described in the doc.
What's am I doing wrong ?
Is there another to do that ?
Thanks for your help.
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.OutputFile = "$(ProjectName).x"
End Sub
End Module
Luis Bascones - 26 Feb 2007 15:37 GMT
The only issue I can think of is that you are importing the namespace but
have not added a reference to the VCProjectEngine DLL to your solution.
Imports includes the namespace, but the actual types are defined and
implemented in the DLL.
BTW, if you are using VS 2005, you should be using boty EnDTE and EnvDTE80
(http://msdn2.microsoft.com/en-us/library/0e105c68(vs.80).aspx)
Hope this helps,
-LuisB
> Hi,
>
[quoted text clipped - 27 lines]
> End Sub
> End Module