visual-studio

Different Refactoring style for field encapsulation: how to make Visual Studio change it ?

When one choose Refactoring, Encapsulate Fields for let's say: int m_member; VS will generate public int Member { get { return m_member; } set { m_member = value; } } For some reason (using a reverse engineerint tool for example which doesn't know this style), I'd like to get the oldish and more verbose ...

Javascript formatting broken in visual studio 2008

I do not have a listing for JScript in my studio options under Text Editor. Thus my studio will not format javascript for me when i type a semicolon. This is a new machine for me. My old machine has this listing. I have uninstalled and reinstalled studio 3 times with no luck ...

Visual Studio 2010 closing a tab takes 8 seconds?

Anybody else's VS2010 is extremely slow when closing code editor tabs? Opening a .cs file is instantaneous but closing a tab takes ~8 seconds. I have uninstalled Power Commands and the Productivity Power Tools, the only other installed extensions are ReSharper (disabling it did not help) and the Color Theme Editor. I do have the UI Auto...

Visual Studio Template Parameters: Machine Name Capitalized?

MSDN Template Parameters Is $machinename$ always capitalized? I wanted to write some code based on this return value, but Python's socket.gethostname() returns "Mark-PC" whereas $machinename$ returns "MARK-PC". If so, I'll just .upper() the hostname, but it seems kinda dumb that I should have to do this. Why the inconsistency? ...

How can I paste curly quotes into my IDE as straight quotes?

How can I paste curly quotes into my IDE as straight quotes? I will often paste code into Visual Studio from PDF files. Then I have to change all the quotation marks to "straight" ones. Ive tried the programs that strip formatting but they don't work. Below is a pic of what I mean. Thanks ...

Where are the "managed project source files"?

Trying to follow this tutorial Walkthrough: Part 1 - Creating a Basic Project System And I got to this step: Locate the managed project source files by following this link. Copy these files to a local folder named, for example, C:\MyLocalFolder\Project But that codeplex project doesn't have any downloads... so what files am I sup...

What's the name of the item that controls the color of http links inside string literals in Visual Studio 2010?

I am trying to change the color of the http links inside string literals in Visual Studio 2010, but neither String, not Literal doesn't control the color of them. They still appear blue. For instance: "http://mylink.com" " characters appear in the color I set, but http://mylink.com still stays the same color which is blue. What item ...

Is there a way in VS 2010 to add a reference to an assembly that is only in your GAC?

Right clicking on project and clicking "Add Reference..." does not provide a way to do this. The .Net tab doesn't look in the GAC and if you browse to C:\windows\assembly you are presented with the actual directory structure of the GAC. Thanks! ...

Compiler error: Same identity, EnvDTE80

Trying to follow this tutorial, under the section "Initializing the Project Factory" I've added EnvDTE to my project, but now I get this error: An assembly with the same identity 'EnvDTE80, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' has already been imported. Try removing one of the duplicate references. Eve...

Visual Studio and TortoiseHg: folder not visible in VS

I created a C# project and added it to source control (mercurial). I can edit files in VS, commit it and push it using TortoiseHg. It goes to the server. When some one pulls they get the files. In my visual studio I added a folder and a file inside that folder. I used TortoiseHg and it saw the new file in the new folder. I committed it ...

Team Build 2010 software requirements for VS 2008 clients

One of our TFS 2010 requirements is to support software projects that still use Visual Studio Team System 2008 for development. My question is whether a Build Server based on Team Build 2010 can compile 2008 code by itself. I mean connecting to TFS 2010 using Visual Studio Team Suite 2008, which means we are planning to install the Forwa...

How to correctly paste HTML into C# code with Visual Studio or Resharper (or any other tool!) ?

Is there any way to make a "safe" paste into Visual Studio (C#) of HTML code? If I try to paste something like <div class="user-info"><div class="user-action-time">answered <span title="2010-09-16 02:23:16Z" class="relativetime">21 mins ago</span> into my code, C# will cry. Using the @ operator doesn't help us, either. Is it possible...

Visual Studio C++ compiler optimizations breaking code?

I've a peculiar issue here, which is happening both with VS2005 and 2010. I have a for loop in which an inline function is called, in essence something like this (C++, for illustrative purposes only): inline double f(int a) { if (a > 100) { // This is an error condition that shouldn't happen.. } // Do something with a and r...

How does one set Visual Studio 2010 keyboard shortcuts comfortably, esp. when using Resharper?

In every Visual Studio.NET version you can set keyboard shortcuts using "Tools - Options - Environment - Keyboard" and then find the command you want to assign a shortcut to by entering part of it in "Show commands containing". For one thing, the listbox is ridiculously short and hard to navigate - does anyone know an alternative? Then...

How to track Domain Entities with TFS using the CMMI project template?

My enterprise is about to start a somewhat complex project in which we will probably use Domain Driven Design for the business layer. The project will be developed using Visual Studio 2010, and managed via TFS 2010 using the CMMI 5.0 team project template. I think that it would be a good idea to use TFS work items to track and manage th...

Enable application framework settings in WPF projects?

What it is the option Enable application framework that I found in Visual Studio under VB.NET WPF projects Application settings? I found it enabled by default and the "Shutdown mode" configured as "On last windows close". But for me is not really clear what does it mean that setting and also the other settings listed in that combo box. ...

Show lot of Data in chart (Create Waveform)

hello i want to create a SoundEditro with a wave form. i want to show all samples in this wave form but samples count > 9000000 thus my program work very bad. please help me, for create a waveform that show all samples rapidly. i use from MSChart for Framework 3.5 sp1 ...

Comprehensive tutorial for beginners on how to write Windows GUI programs

I'm trying to learn how to write Windows GUI* programs in C++, using Visual Studio 2008, but I haven't found any more comprehensive tutorial for beginners. The more comprehensive tutorials I have found are either only about how to make buttons, menus, etc. OR only about how to write basic C++ console programs. What I haven't found is a...

Using Microsoft Reports (.rdlc) in a 3-Tier app

Hi, I'm new to reporting so need some good information/resources to help me get some reports set up in our 3-tier app. We currently have: UI (ASP.Net MVC 2 at present but also winforms in future), Business Logic and DAL (Entity Framework - Code-Only ie no edmx) The BL has "manager" objects for selecting and manipulating entities. Now...

Visual Studio terminates my console application too fast

When I execute my program in Visual Studio (just a simple hello world app) it terminates and closes the console window immediately, rather than waiting for me to close it manually. I have gotten round this by including cin.get() at the end of the program, but my instructor has just told me that I shouldn't have to do that, and that he wa...