EzDevInfo.com

visual-studio interview questions

Top visual-studio frequently asked interview questions

ASP.NET Web Site or ASP.NET Web Application?

When I start a new ASP.NET project in Visual Studio I can create a ASP.NET Web Application and new ASP.NET websites in Visual Studio creates new Website.

What is the difference between these two ASP.NET Web Application and ASP.NET Web Sites? Why would I choose one over other?

If I am using Visual Studio 2005 instead of Visual Studio 2008 or Visual Studio 2010, is the answer different?


Source: (StackOverflow)

Visual Studio 2010 - recommended extensions [closed]

What are your recommended extensions for Visual Studio 2010? (Please indicate if its free or not And also its purpose / function too)


Source: (StackOverflow)

Advertisements

Using Git with Visual Studio [closed]

As a long-time Visual SourceSafe user (and hater) I was discussing switching to SVN with a colleague; he suggested using Git instead. Since, apparently, it can be used as peer-to-peer without a central server (we just have a 3-developer team).

I have not been able to find anything about tools that integrate Git with Visual Studio, though - does such a thing exist?

What technologies are available for using Git with Visual Studio? And what do I need to know about how they differ before I begin?


Source: (StackOverflow)

What is the purpose of vshost.exe file?

When I create and compile a hello world application in C#, I get three files in the Debug folder apart from the main output exe (eg: HelloWorld.exe)

  1. HelloWorld.vshost.exe
  2. HelloWorld.pdb
  3. HelloWorld.vshost.exe.manifest

What are these files and what purpose do they serve?


Source: (StackOverflow)

How do you auto format code in visual studio?

I know Visual Studio can auto format to make my methods and loops indented properly, but I cannot find the setting.


Source: (StackOverflow)

Open two instances of a file in single Visual Studio session

I have a file a xyz.cpp. I want to open two instances of a this file in Visual studio (btw I am using 2005). Why would I want to do so? I want to compare two sections of the same file side by side. I know workarounds such as:

  1. Make a copy of the file. But the problem is that its not elegant and I dont want to make copies everytime I faced with this.

  2. I can split the window into two. The problem with split it than I can split it horizontally only. The result of horizontal split is that right half my screen is white space.

If I were able to split it vertically or open two instances of the same file, it would increase the number of lines of code I can compare.


Source: (StackOverflow)

How to use Boost in Visual Studio 2010

What is a good step by step explanation on how to use Boost in an empty project in Visual Studio 2010.


Source: (StackOverflow)

"The breakpoint will not currently be hit. The source code is different from the original version." What does this mean?

When debugging in Visual Studio, sometimes I add a breakpoint but it's hollow and VS says "The breakpoint will not currently be hit. The source code is different from the original version." Obviously this prevents me from being able to debug.

What on earth does the message mean? What original version? If I've just opened up the solution and not made any changes whatsoever to the code, how can there be an 'original version'?


Source: (StackOverflow)

What are the various "Build action" settings in Visual Studio project properties and what do they do?

For the most part, you just take whatever Visual Studio sets it for you as a default... I'm referring to the BuildAction property for each file selected in Solution Explorer. There are a number of options and it's difficult to know what each one of them will do.


Source: (StackOverflow)

Difference between Build Solution, Rebuild Solution, and Clean Solution in Visual Studio?

What is the difference between Build Solution, Rebuild Solution, and Clean Solution in Visual Studio?

When is the appropriate time to use each one of these?


Source: (StackOverflow)

Should I add the Visual Studio .suo and .user files to source control?

Visual Studio solutions contain two types of hidden user files. One is the solution .suo file which is a binary file. The other is the project .user file which is a text file. Exactly what data do these files contain?

I've also been wondering whether I should add these files to source control (Subversion in my case). If I don't add these files and another developer checks out the solution, will Visual Studio automatically create new user files?


Source: (StackOverflow)

How do you force Visual Studio to regenerate the .designer files for aspx/ascx files?

Sometimes when I'm editing page or control the .designer files stop being updated with the new controls I'm putting on the page. I'm not sure what's causing this to happen, but I'm wondering if there's any way of forcing Visual Studio to regenerate the .designer file. I'm using Visual Studio 2008

EDIT: Sorry I should have noted I've already tried:

  • Closing & re-opening all the files & Visual Studio
  • Making a change to a runat="server" control on the page
  • Deleting & re-adding the page directive

Source: (StackOverflow)

How do you count the lines of code in a Visual Studio solution?

Is it possible to find the number of lines of code in an entire solution? I've heard of MZ-Tools, but is there an open source equivalent?


Source: (StackOverflow)

How to configure Visual Studio to use Beyond Compare

I would like to configure Visual Studio to open Beyond Compare by default as the diff tool. How can I do this?


Source: (StackOverflow)

Adding a guideline to the editor in Visual Studio

Introduction

I've always been searching for a way to make Visual Studio draw a line after a certain amount of characters.

Below is a guide to enable these so called guidelines for various versions of Visual Studio.

Visual Studio 2013

Install Paul Harrington's Editor Guidelines extension for VS 2013

Visual Studio 2010 and 2012

  1. Install Paul Harrington's Editor Guidelines extension for VS 2010 or VS 2012.
  2. Open the registry at:
    VS 2010: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\Text Editor
    VS 2012: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\Text Editor
    and add a new string called Guides with the value RGB(100,100,100), 80. The first part specifies the color, while the other one (80) is the column the line will be displayed.
  3. Or install the Guidelines UI extension (which is also a part of the Productivity Power Tools), which will add entries to the editor's context menu for adding/removing the entries without needing to edit the registry directly. The current disadvantage of this method is that you can't specify the column directly.

Visual Studio 2008 and Other Versions

If you are using Visual Studio 2008 open the registry at HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\Text Editor and add a new string called Guides with the value RGB(100,100,100), 80. The first part specifies the color, while the other one (80) is the column the line will be displayed. The vertical line will appear, when you restart Visual Studio.

This trick also works for various other version of Visual Studio, as long as you use the correct path:

2003: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\7.1\Text Editor
2005: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\Text Editor
2008: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\Text Editor
2008 Express: HKEY_CURRENT_USER\Software\Microsoft\VCExpress\9.0\Text Editor

This also works in SQL Server 2005 and probably other versions.


Source: (StackOverflow)