Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8652451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:18:39+00:00 2026-06-12T14:18:39+00:00

I am writing an add-in for visual studio, which creates a test project for

  • 0

I am writing an add-in for visual studio, which creates a test project for a production code project.
It should support C, C++ and C# projects.
for C/C++ projects I can progarmatically set the post and pre-build events using VCPostBuildEventTool.

this how I get it from the Project object:

VCProject vcTestProj = (VCProject)testProj.Object;
IVCCollection testProjCfgs = (IVCCollection)vcTestProj.Configurations;
VCConfiguration testProjDebugCfg = (VCConfiguration)testProjCfgs.Item("Debug");
VCLinkerTool testProjLinkerTool = (VCLinkerTool)((IVCCollection)testProjDebugCfg.Tools).Item("VCLinkerTool");
VCCLCompilerTool testProjectCompileTool = (VCCLCompilerTool)((IVCCollection)testProjDebugCfg.Tools).Item("C/C++ Compiler Tool");
VCPreBuildEventTool testProjPreBuildTool = (VCPreBuildEventTool)((IVCCollection)testProjDebugCfg.Tools).Item("Pre-Build Event Tool");
VCPostBuildEventTool testProjPostBuildTool = (VCPostBuildEventTool)((IVCCollection)testProjDebugCfg.Tools).Item("Post-Build Event Tool");

But a C# project can not be used as a VCProject, and I can’t find a way to access it’s pre and post build events progarmatically.
Anyway to do that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T14:18:40+00:00Added an answer on June 12, 2026 at 2:18 pm

    C#/VB.NET projects are treated as the same, so they are part of ProjectProperties3 (or ProjectProperties2) interface,

    http://msdn.microsoft.com/en-us/library/vslangproj2.projectproperties2.postbuildevent.aspx

    How to get to that level is mentioned in

    http://msdn.microsoft.com/en-us/library/ms228958.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing a visual studio add-in which preforms operations on javascript files after
I'm writing a replacement for a Visual Studio Add-In which we've got from a
I'm writing a Visual Studio toolbar Add-In that displays the current time. I have
I am writing some unit tests in Visual Studio 2010. I can run all
The Coded UI Test Builder application in Visual Studio is very useful when hand-writing
I am writing a Visual Studio add in and need to marshall a managed
I am writing an c++ application in visual studio 2010. I run my code
I am creating a Visual studio add-in writing in C# allowing users to send
I am writing unit tests in visual studio 2010. For test some functionality, I
I'm writing a visual studio Add-In that will activate when the debugger is launched.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.