The title pretty much says it all. I'm writing a visual studio extension in which i'm creating a custom command. In the callback of this command, i need to invoke the "solution level Build command" at some point in my logic. I found one GlobalInvoke(CommandID commandID) method present in OleMenuCommandService class. The CommandID takes two arguments "CommandID(Guid menuGroup, int commandID)". I could not find the Menu Group Guid for the Build Menu Group. Firstly, am i right in the above approach? If no, please guide me to the right approach. If yes, how can i find the Guids and IDs needed to invoke the Build command? Thanks in Advance.
How to invoke Solution level Build command present in Visual Studio in my custom command while creating a Visual Studio extension?
641 views Asked by Atul Poddar At
2
There are 2 answers
0
Ionut Enache
On
Also if you need to do something at the beginning/end of the build event you can do something like this to catch the event:
mDte.Events.BuildEvents.OnBuildBegin += OnBuildBegin;
mDte.Events.BuildEvents.OnBuildDone += OnBuildDone;
Or you can get the result of your build programmaticaly and check if the build succeed or failed. The exitCode will be 0 if the build succeed and different of 0 otherwise :
int exitCode = DTEObj.Solution.SolutionBuild.LastBuildInfo;
Related Questions in C#
- How to call a C language function from x86 assembly code?
- What does: "char *argv[]" mean?
- User input sanitization program, which takes a specific amount of arguments and passes the execution to a bash script
- How to crop a BMP image in half using C
- How can I get the difference in minutes between two dates and hours?
- Why will this code compile although it defines two variables with the same name?
- Compiling eBPF program in Docker fails due to missing '__u64' type
- Why can't I use the file pointer after the first read attempt fails?
- #include Header files in C with definition too
- OpenCV2 on CLion
- What is causing the store latency in this program?
- How to refer to the filepath of test data in test sourcecode?
- 9 Digit Addresses in Hexadecimal System in MacOS
- My server TCP doesn't receive messages from the client in C
- Printing the characters obtained from the array s using printf?
Related Questions in VSIX
- Is it possible to refresh filters instead of reloading project
- "Visual Studio stopped responding for 12 seconds,uninstalling extension might help" getting this message on installing VSIX and on opening the project
- How to Format xml based files (csproject) in vsix?
- How to add console when debugging VSIX project
- VSIX Show ContextMenu after Multi-File Selection in Two or More Projects
- In VSIX, reading Configuration Properties of CSPROJ throws COMException (method or operation not implemented)
- Reclassify text in span as different IClassifierProvider
- How to add a File in vstemplate in a back folder?
- How do you set the connection for the activewindow (EnvDTE.Window) in a VSIX extension?
- Error in displaying the Extension in SSMS created in Visual Studio (VSIX project) when right clicking any tables
- How to get the top/bottom line numbers of MSVC pane
- How to add file type validation , when trying to add existing item in solution explorer of visual studio experimental instance?
- How to display two custom tool windows in a same place as tabbed format
- How to suppress, VS detects EXE is not in synch with Custom File so give Stop Debugging error box during Edit& Continue
- How to dock a tool window when it open for the first time in vsix?
Related Questions in VS-EXTENSIBILITY
- Reclassify text in span as different IClassifierProvider
- How to perform a caret change in a VisualStudio.Extensibility Extension project?
- How to safely modify the active Document from a ITextViewChangedListener.TextViewChangedAsync event
- visual studio converted vb to c# by itself?
- Catching mouse click events in VS.NET Addin possible?
- How to suppress, VS detects EXE is not in synch with Custom File so give Stop Debugging error box during Edit& Continue
- How to set Toolwindow orientation in ProvideToolWindowAttribute as variable in VSExtension
- Visual Studio extensibility VS namespace
- VS Code Custom Syntax Highlight Extension works when invoked directly but not after being installed
- Adding a Button/Command to Context Menu in SSMS SQL Query Editor Extension
- What is the difference between IVsTextViewCreationListener and IWpfTextViewCreationListener
- How to force Visual Studio to update the UI?
- Visual Studio IDE - How to Use Visual Studio Commands in Custom Extensions?
- When writing a Visual Studio 2022 extension, how do I alter UI for files in the Solution Explorer?
- Not all privileges or groups referenced are assigned to the caller
Related Questions in MPF
- Mpf finance display ohlc on graph
- Candlesticks in matplotlib
- TypeError after trying to plot dataframe with mpf.plot
- Async implementation of Custom Commands in VSIX
- mpdf not generating pdf if data is larger
- IBM MFP 8.0 multiple userID stick to 1 devices when use UserAuthenticationSecurityCheck
- Managed Package Framework for Visual Studio 2017
- How to invoke Solution level Build command present in Visual Studio in my custom command while creating a Visual Studio extension?
- Print large table content on multiple page using mpdf lib
- Extend Visual Studio functionality for Installshield ISPROJ Project type
- "Operation must be an updateable query" Error
- Duplicate Visual Studio Extension For Single Language
- Visual Studio Extensibility - Creating a new Project type
- Visual Studio does not start build output
- MPF Project : VS Package Build Event Not calling in VS 2012
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
You can call
DTE.ExecuteCommand("Build.BuildSolution").If you want to use guid and ID, see the following VB sample: