Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Extensibility / February 2007

Tip: Looking for answers? Try searching our database.

VC2005 : How to get the output filename

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
lfcdm - 23 Feb 2007 21:46 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.