visual-studio

What are the implications of using /Zi vs /Z7 for Visual Studio C++ projects?

Background There are several different debug flags you can use with the Visual Studio C++ compiler. They are: (none) Create no debugging information Faster compilation times /Z7 Produce full-symbolic debugging information in the .obj files using CodeView format /Zi Produce full-symbolic debugging information in a .pdb file for th...

Is there any best practices for Visual Studio Project/Solution Structure?

I've seen a lot of different takes on this subject so I figured if there's a preferred way on this. Is there any best practices on how to setup Visual Studio Projects and Solutions in regards to multiple solutions for the same solutions? For example: Let's say I have a task that calls for a web app, a console application, and a shared ...

Alternative to StyleCop for Visual Studio?

I like StyleCop's static code analysis and rules enforcement. However, it is severely lacking in several key departments. Adding new rules isn't officially supported and from what I hear pretty difficult. Automatic "fixing" of trivial rules violations would be nice! Perhaps not with variable naming but with method ordering (static,...

What use is the Aliases property of assembly references in Visual Studio 8.

When I add an assembly reference to a project in Visual Studio 8 the Aliases property, of that reference, is set to "global". What is this property good for and why is it set to global? MSDN tells me that this is a list of aliases for the assembly but not why I might want to use this property or why most are aliased as "global". MSDN ...

Rewriting methods within a project

As a growing dev team we are beginning to encounter the problem of rewriting functions that behave in similar/identical ways. We are all guilty of failing to write documentation as time is a limiting factor, however the idea of gathering all current functions (duplicates and all) and using that list along with applied key words and the ...

[TFS/VisualStudio] Is there a way to prevent Visual Studio from automatically adding from obj/Debug to the changeset?

For some solutions, when I open them Visual Studio will get files that aren't in the project (particularly from obj/Debug) and add it to the changeset and I always have to perform a Undo Pending Changes operation on them. It's annoying. Is there any way to prevent Visual Studio from behaving in this way? ...

MSBuild - can it work out project dependencies in a solution file? If so how?

Hi, I have an msbuild project which builds a SLN file from visual studio which holds all the projects in (about 70+ project), and a lot of the projects are dependent on each other meaning they need to be build in order - sometimes a developer forgets to set the build order manually in visual studio in the solution file causing the msbui...

How can I integrate a virtual machine into my automated unit tests in Visual Studio?

I've got some legacy software that I'd like to involve in an automated unit test (for testing network protocol compatibility) and because this software is old and runs in an outdated environment I'd like to encapsulate it in a virtual machine. What is the best way to control a virtual machine from a Visual Studio unit test? Once I have t...

How to improve Visual Studio 2008 Website Compilation Perfomance

I am having severe performance issues when compiling a moderately large ASP.Net website in Visual Studio 2008 (targeting .Net 3.5). I know there are some tips & registry hacks for improving compilation performance in VS 2005, are there any for VS 2008? Specifically, it seems that VS 2008 is compiling the whole website every time F5 is hi...

calculate seconds-to-date for pre-epoch date/times using MS VS2003

Hi all, I have this routine that calculates the seconds-to-date for a struct tm. On Linux my implementation using mktime works fine, but mktime on windows VS2003/.NET 1.1 returns -1 for pre-epoch datetimes. How do I calculate meaningful time_t values (i.e. value + secondsToEpoch == secondsToDatetime ) from a for pre-epoch dates...

Where can I find Visual Studio style tabs in either a built-in or 3rd party component?

I want to get Visual Studio style tabs (you know, the ones where you can tab through the currently opened files). Is there a 3rd party component that does this? How hard would it be to do myself? ...

Visual Studio: MyMacros won't show up in Tools > Options > Environ. > keyboard

I have a macro that I wrote to just help me with my unit testing (it was derived from other macros that just add underscores to the name of the method as you write it,), and when I go to Tool > Options > Environment > and then keyboard to assign a shortcut to it, it not anywhere to be found, none of the "MyMacros" default section is ther...

Visual Studio: Where is intellisense in the immediate window?

It would seem the immediate window needs some jazzing up ala intellisense? Anyone agree/disagree? Is this coming in VS2008/2010? ...

Problem drawing graphics to user control

My application pops a form as a child of the main form. On the form is User Control with a Panel where Graphics are rendered. When executed from Visual Studio in debug mode the drawing is often rendered as expected, imagine a simply XY graph. If the panel's graphic aren't drawn then adding two or three break points to the drawing routine...

Visual Studio behaves strangely while debugging with breakpoint conditions

A method I work with that is called tens of thousands of times started throwing exceptions recently. In most debugging circumstances I would set a breakpoint at the top of this method and run through until I reach the call I'm interested in with a parameter value that triggers the exception. In this case that would be impractical, so I...

Post build visual studio step not being called at all

The long of it is I built an installer in visual studio that gave me this cheery error when I tried to use the program: Retrieving the COM class factory for component with CLSID {EC10E7E8-797E-4495-A86D-3E9EADA6D5BB} failed due to the following error: 80040154. From that it seems I need to embed the manifest in the executa...

In Visual Studio 2008, how can I add a 'using blah.myblah;' to all new page codebehinds?

Is there a way to modify the default template for new pages so that it includes my custom 'using' statements? ...

Is there a way to not create an explicit EventHandler delegate in Visual Studio?

Visual Studio likes to be helpful when typing: Event += by generating code like: Event += new EventHandler(EventClassName_Event); void EventClassName_Event(object sender, EventArgs e) { throw new System.NotImplementedException(); } Ideally I would like to remove the explicit delegate and add an explicit private. Like so: Even...

get VC debugger to show more frames in a stack overflow

I was remote debugging a stack overflow from a recursive function. The Visual Studio IDE only showed the first 1,000 frames (all the same function), but I needed to go up further too see what the cause was. Does anybody know how to get VS to 'move up' in a stack listing? Thanks. ...

Visual Studio code formatting

Hi, I've been using Visual Studio as my main IDE for a while now (I still use Emacs for some personal projects, though). I like the way Emacs formats C/C++ code and I'd like to convince Visual Studio use similar conventions for C# code. For instance, in Emacs, a C function call looks like: functionName(argument1, argument...