Visual Studio has a feature called Custom Tools. The Custom Tool will run every time I save a file or, if I click the "Run Custom Tool" menu item. Is there a way to make it run only when I click the Run Custom Tool menu item?
I don't believe there is any way to discriminate from within the custom tool code. This may be stating the obvious, but it sounds like a normal VS add-in would be more appropriate in your case.
Related
How to add a custom dialog to the execute sequence of a Basic MSI project in InstallShield 2010?
I want this dialog to be shown when installer is run directly as a .EXE file or
from the command line MSIEXEC.EXE with basic ui command line argument
Is this possible to do, if so how?
Thanks in advance
Raghu.
Create your dialog in the User Interface view. Then, depending on whether you want it to be part of the wizard panels, or standalone, either:
Edit the Control Events of the Next and Back buttons to have NewDialog actions that point to your new dialog, and from it to its new surrounding pages, or
Add to the InstallUISequence a custom action that references your new dialog, and ensure that it has a Control Event action that will close it.
Chances are most dialogs will be better as part of the series of wizard panels, so I would suggest going with the first option.
I've got some powershell scripts that I need to run from time to time. I would like to have custom menu with few items where each would run some command. I also would like to have create this menu dynamically (the best - when VS run). Is it possible to achieve something like that? What should I read to achieve that? Maybe there are some external libraries which allow me to do that?
EDIT:
dynamically becouse I need some external programm to feed Visual Studio what items do I need and what script should be run.
I'm working on a fairly large project that uses T4MVC. Due to the project size, it takes quite a long time to run my T4MVC template, so using AutoT4MVC is too slow for my scenario.
So every time I change something vital aboutm my action methods, I have to select the T4MVC template, right-click, then click "run custom tool". It's quite tedious and I'm sure there's a better way.
Since AutoT4MVC is not an option, is there any plugin or hack that would allow me to place a button on my IDE that will run the T4MVC template included in my project?
There is a menu item under Build -> Transform all T4 Templates. This will run all the templates in your solution. This command is also available on the Build toolbar, so if you turn that on (View -> Toolbars -> Build) you'll get the button you're looking for.
It should be possible to do basically what AutoT4MVC does, but based on some manual trigger. Or maybe you should suggest on https://github.com/bennor/AutoT4MVC to add a way to turn off automatic mode, and instead rely on a manual action.
I run T4MVC, but AutoT4MVC is a separate project that I'm less familiar with.
I need to know how to open the form of a program I am debugging.
I loaded an existing solution into VS2010, I can see the code, but I want to see the GUI part of the project, click on buttons and see what part of the code they take me to, set breakpoints where I feel like.
I don't know how to see the GUI in VS2010, where can I do that?
Also, where would be a good resource to learn the ins and outs of VS2010?
Depending on how the UI was created, there may or may not be a way to see the UI at design time. Particularly if this is an older Windows UI application, it's likely that the windows are created entirely in code, and there is no design-time UI for you to see.
There is a dialog editor, for dialog windows that are defined in resource (*.rc) files. CTRL-SHIFT-E brings up the Resource Viewer and you can look for things under the Dialog node. It is possible that your main window is a dialog-style window, as that's one of the options you get when you create a new MFC-based application.
Otherwise, your only option to see what your UI looks like is to run the program and see. Tracking down which UI elements do which actions in your program will require finding the appropriate event handlers or message handler methods (again, depending on what UI framework, if any, is in use) and setting breakpoints.
The generic answer is:
Hit F5 to starting Debugging mode. (Or under the Debug menu choose Start Debugging)
But it depends on how your project is setup and what type of project it is if F5 will work that easily for you.
What kind of program/language are you using?
With a form, I believe you have to File-->Open-->Project/Solution
Now if its a website, you would open Website. If you tried to open a windows form under a website then you wont see the design.
Typically you would just double click your form name (form1.cs) because then your design view will pop up or hit Shift+F7 or rightclick --> view designer. Then just double click whatever tools you have on your form (like a button) and it will automatically go to the button code.
If its a website, then it would be under website1.aspx while the code sits in website1.aspx.cs
But if none of that helps, here is a good place to learn this stuff
VisualStudioWalkthroughs
I'm trying to customize some TFS work items via the VS2008 xml editor, but every time I open a work item xml file it jumps to the graphical designer. All that gives me is a "View XML" button that doesn't let you edit the xml directly.
I don't have TFS but I know in regular VS there is an Open With... option in most items' contextual menu that even let you change the default editor. Very useful when you are tired of the Designer opening instead of the Code file on Windows forms.
Ah, looks like you have to go to File->Open and click the down arrow next to the Open button to "Open With" the xml editor. If someone wants to copy and paste this, free accepted answer :P
As per Coincoin's answer, this feature is also great for setting the default editor for ASPX. If you want to go to the Code Editor most often, then this is a default you'd want to change.
Reading this - I think perhaps you don't realize - that there is no need to edit the XML - in fact it is very difficult to do so. The graphical designer will actually let you change the Work Item type, adding new fields, changing workflow, rules etc.
The only reason to change the XML is if there's a bug in the Process Editor (the tool that gives the graphic designer). I have done extensive modifications of Work Item types and only had one instance where I had to change the XML.