Questions tagged [visual-studio-2008]

This tag refers to the Visual Studio line of software development products from Microsoft, the 2008 version. Do not use this tag unless you have a specific question about Visual Studio -- not just a coding issue. Questions should be specific to the 2008 version of Visual Studio.

Microsoft Visual Studio 2008 is an integrated development environment (IDE) from Microsoft. It is used to develop console and graphical user interface applications along with Windows Forms applications, web sites, web applications, and web services in both native code together with managed code for all platforms supported by Microsoft Windows, Windows Mobile, Windows CE, .NET Framework, .NET Compact Framework and Microsoft Silverlight.

Visual Studio does not support any programming language, solution or tool intrinsically, instead allows the plugging of functionality coded as a VSPackage.

More information:

15670 questions
114
votes
8 answers

Auto generate function documentation in Visual Studio

I was wondering if there is a way (hopefully keyboard shortcut) to create auto generate function headers in visual studio. Example: Private Function Foo(ByVal param1 As String, ByVal param2 As Integer) And it would automagically become something…
Ryan M
  • 1,721
  • 2
  • 15
  • 22
114
votes
9 answers

How to permanently disable region-folding in Visual Studio 2008

Anyone know how to turn off code folding in visual studio 2008? Some of my colleagues love it, but I personally always want to see all the code, and never want code folded out of sight. I'd like a setting that means my copy of Visual Studio never…
Steve Cooper
  • 20,542
  • 15
  • 71
  • 88
113
votes
28 answers

the source file is different from when the module was built

This is driving me crazy. I have a rather large project that I am trying to modify. I noticed earlier that when I typed DbCommand, visual studio did not do any syntax highlighting on it, and I am using using System.Data.Common. Even though…
frustratedcoder
  • 1,131
  • 2
  • 7
  • 3
112
votes
14 answers

Visual Studio: Multiple post-build commands?

Visual Studio 2008 lets me declare a command and attach it to the post-build event for a project. Like a lot of developers, I use it regularly to xcopy files to the application output directory. I am working on a project where I need to xcopy files…
David Veeneman
  • 18,912
  • 32
  • 122
  • 187
110
votes
3 answers

Why does the C# compiler not fault code where a static method calls an instance method?

The following code has a static method, Foo(), calling an instance method, Bar(): public sealed class Example { int count; public static void Foo( dynamic x ) { Bar(x); } void Bar( dynamic x ) { count++; …
Mike Scott
  • 12,274
  • 8
  • 40
  • 53
109
votes
3 answers

Show control hierarchy in the WinForms designer

One of our clients has an old WinForms application that contains forms with a lot of controls on them. Some of those controls have a deep hierarchy and that makes it to hard to select them in the designer. I need to understand this hierarchy to make…
Cédric V
  • 1,729
  • 2
  • 21
  • 28
109
votes
9 answers

The type or namespace name 'Objects' does not exist in the namespace 'System.Data'

I am using entities, C# and SQL Server to create an n-tier app. I am creating some base classes common to all my DAL components. In this base class, i want to handle the connection state of the ObjectContext base class inherited by entities…
pencilslate
  • 12,958
  • 18
  • 58
  • 73
108
votes
13 answers

Shortcut for changing font size

Does anybody know if there is a shortcut or something similar for changing the font size in the text editor in Visual Studio 2008? What I mean is something like Ctrl + mouse wheel like in Firefox. Accessing the Options window and then selecting…
Gerardo Contijoch
  • 2,421
  • 5
  • 20
  • 29
107
votes
5 answers

How do I remove a project configuration in Visual Studio 2008?

I have a Visual Studio 2008 solution into which I have imported a number of pre-existing projects. The projects are mixed-language sample code (C#, VB, C++/CLI). They currently have multiple configurations, but I want each project only to have…
Eric
  • 11,392
  • 13
  • 57
  • 100
106
votes
6 answers

Visual Studio: Relative Assembly References Paths

When adding a reference to an assembly located within the solution directory, is there any way to add it relatively, so that when checked in and out of a repository it is referenced in projects correctly?
theringostarrs
  • 11,940
  • 14
  • 50
  • 63
105
votes
6 answers

Include only certain file types when searching in Visual Studio

Often when I want to search through my code in Visual Studio, I know the thing I'm looking for is in some C# code. However, as I've used the same variable name in a JavaScript file, I have to wade through all those search results too. This gets even…
teedyay
  • 23,293
  • 19
  • 66
  • 73
104
votes
12 answers

Find in Files: Search all code in Team Foundation Server

Is there a way to search the latest version of every file in TFS for a specific string or regex? This is probably the only thing I miss from Visual Source Safe... Currently I perform a Get Latest on the entire codebase and use Windows Search, but…
Mark Glorie
  • 3,733
  • 3
  • 28
  • 31
104
votes
10 answers

How can I get Visual Studio 2008 Windows Forms designer to render a Form that implements an abstract base class?

I engaged a problem with inherited Controls in Windows Forms and need some advice on it. I do use a base class for items in a List (selfmade GUI list made of a panel) and some inherited controls that are for each type of data that could be added to…
Oliver Friedrich
  • 9,018
  • 9
  • 42
  • 48
104
votes
11 answers

String escape into XML

Is there any C# function which could be used to escape and un-escape a string, which could be used to fill in the content of an XML element? I am using VSTS 2008 + C# + .Net 3.0. EDIT 1: I am concatenating simple and short XML file and I do not use…
George2
  • 44,761
  • 110
  • 317
  • 455
102
votes
20 answers

How should I detect unnecessary #include files in a large C++ project?

I am working on a large C++ project in Visual Studio 2008, and there are a lot of files with unnecessary #include directives. Sometimes the #includes are just artifacts and everything will compile fine with them removed, and in other cases classes…
shambolic
  • 1,023
  • 2
  • 9
  • 5