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 2005

Tip: Looking for answers? Try searching our database.

Changing the tool in the fileconfiguration

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Céline - 17 Feb 2005 10:37 GMT
I'm creating my VCProject by automation. I added the filters i wanted and the
associated files. Visual Studio puts a Tool by default in the
fileconfiguration depending of the kind of file i add.
For exemple for one file i have the tool "MIDL Tool" and i would change it
for "Custom Build Tool", how can i manage to do this?
"Ed Dore [MSFT]" - 17 Feb 2005 22:05 GMT
You can use the VCFileConfiguration class defined in the
Microsoft.VisualStudio.VCProjectEngine namespace, to set up a custom build
rule similar to how I did it with the macro below. This will probably get
you moving in the right direction.

   Sub SetCustomBuild()

       Dim pane As OutputWindowPane = GetMiscDumpPane()

       Dim prj As VCProject = DTE.Solution.Projects.Item(1).Object
       Dim files As IVCCollection = prj.Files
       Dim file As VCFile = files.Item("somesourcefile.cpp")

       Dim vcConfig As VCConfiguration = prj.Configurations("Debug|Win32")
       Dim fileConfig As VCFileConfiguration =
file.FileConfigurations("Debug|Win32")
       fileConfig.Tool = vcConfig.Tools("VCCustomBuildTool")
       fileConfig.Tool.CommandLine = "mytool.exe $(InputPath)"
       fileConfig.Tool.Description = "My custom tool"
       fileConfig.Tool.AdditionalDependencies = "None"
       fileConfig.Tool.Outputs = "$(OUTPUTDIR)\$(InputName).yes"

   End Sub

Sincerely,
Ed Dore [MSFT]

This post is 'AS IS' with no warranties, and confers no rights.
Céline - 18 Feb 2005 09:11 GMT
Thx a lot!

> You can use the VCFileConfiguration class defined in the
> Microsoft.VisualStudio.VCProjectEngine namespace, to set up a custom build
[quoted text clipped - 24 lines]
>
> This post is 'AS IS' with no warranties, and confers no rights.

Rate this thread:







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.