- Details
"How can I share one source code file across several projects? I want to have this file on one place only and use it in multiple projects so when I modify it in one project, the changes get automatically reflected in all projects. When I add existing file to the project, a local copy is always created and used." This is the question that I answered many many times on various newsgroups. The answer is very simple:
- Go to menu Project - Add Existing Item...
-
Select desired file and from drop-down menu on Open button (little triangle on the right side) select Link File.
This will only link existing file and will not create any local copy. It seems that Microsoft should change the way how to do it because so many VS users have this problem.
- Details
I've just played with one macro and wanted to debug it. I placed a breakpoint and ran the macro. Macro worked fine but it didn't stop on breakpoint. It took me some time to realize that you must explicitly enable debugging in Macros IDE:
- In macros IDE, go to menu Debug and select Enable Debugging.
You can then debug your macro as any other code.
- Details
Last time I forgot to mention one important thing - how to assign a keyboard shortcut to your macro. Often you don't need any button for your macro, the shortcut is enough. Or you can have both. As I already wrote, macro is similar to any named command. So to assign a shortcut to it:
-
Go to menu Tools - Options... and select Environment - Keyboard.
- Details
Well, not very accurate title. In fact, we cannot place a macro itself on the toolbar or menu. Instead we can create a button for it. But let's start from the beginning.
You have created your super macro which saves you a lot of work in Visual Studio .NET (see how to create macro). It works perfectly, you love it and you want to use it as often as possible. But locating it in Macro Explorer and double-clicking its (sometimes quite long) name isn't the best idea. What you obviously want is to have a button on VS .NET toolbar or an entry in main menu which runs your macro when clicked. And of course you want to add some nice icon to your button. Today I'll show you how. It is even possible to add your macros or commands to right-click context menu. But this is more difficult and I'll show you this next time.
- Details
Welcome to my new blog. Here I will share some of my tips and tricks about VS that I learned or other people have asked for.
I start with the basic lesson about macros. Macros are still undiscovered area for many VS users though creating a macro is a quite simple task. Some people don't have time to play with macros, some don't know what they can use macros for and some even don't know that there are any macros in Visual Studio. This post is for all those people.