visual-studio-2010

Visual Studio 2010 URL Hyperlink color - is it possible to not use this?

Visual Studio 2010 "helpfully" detects URLs and colors them blue (by default). It will do this regardless of context - whether the URL is in the midst of XML, or it's in a comment, or it's a string in code, etc. I find this distracting. The URLs are part of their context. I'm not coding in Visual Studio in order to click on hyperlinks. ...

smart tags (aka ActionList) crash in visual studio

Adding smart tags in VS2010 (or VS2008 for that matter) to my control makes VS crash. The following designer is used for the action list: internal class DataEditorDesigner : ComponentDesigner { [...] public override DesignerActionListCollection ActionLists { get { var lists = new DesignerActionListCollection(); ...

How to create a Visual Studio extension to display a block of color over a hex value?

I was told that in Visual Studio I can "create an extension" to create a block of color when the cursor hovers over e.g. "DF7401" or "ffcccc". How would I do that? ...

How to change default program (notepad) which opens a selected file when viewing a TFS changeset in Visual Studio 2010?

I open the History in the Source Control, then open a changeset, then select a file in the file list and double click to open it. TFS open the file by Notepad, I wanna open the file by Visual Studio or by any other text editor (to have syntax highlight). How can I do this? ps. In my machine, when I open a .config file like app.config, T...

How do I eliminate error C2859 when trying to use a precompiled header with VS2010 (VC100) in debug mode?

I am trying to upgrade an old solution to use VS2010 (VC100). I have it setup so that stdafx.cpp will create a precompiled header stdafx.pch from stdafx.h. Then all the other .cpp files that include stdafx.h are instructed to use the precompiled header. These posts helped me get this far: Visual C++ Precompiled Headers errors Precomp...

VS2010 syntax coloring: how to obtain the previous classification type

I'm trying to play with the new syntax coloring capabilities of VS2010 based on Noah Richards' diff coloring sample. The goal is to create syntax coloring for SpecFlow (http://www.specflow.org). In my case, finding the syntax elements are fairly complex and not line-level. Therefore, when I implement the GetClassificationSpans I don't w...

How to let Visual Studio to add references according to USINGS?

Hi, I realized that when dividing a project into two in Visual Studio (2010) I'm still looking for references that are missing in the new project. Can Visual Studio do that for me? It can find all the namespaces I use so it should be easy for it. Thanks! ...

error MSB4057: The target "PrepareForBuild" does not exist in the project

Trying to compile web deployment project (created in vs2005) in vs2010/msbuild. Getting Microsoft.WebDeployment.targets(1311,7): error MSB4057: The target "PrepareForBuild" does not exist in the project... ...

Why is there no web service project template for VS2010 targeting 4.0?

I'm trying to create a simple web Service in the 4.0 framework, but the project template is only available in 3.5? Have the MS team done this for a particular reason? Are they pushing us to WCF services? ...

Build website deployment package as a postbuild event

I am using visual studio 2010. I have a website project that I would like to build a website deployment package every time I build a the project. Basically I am looking for some example of a post build MSBuild command that will basically do the same thing as the "Build Deployment Package" option from the right click menu of the website. ...

Solution wide app.config / web.config?

Hello, I have a solution with one asp.net-mvc-2 project, one web service, one class library and three normal desktop apps. Currently I need to copy all app.config settings from one project to the other. That is a nightmare if I want to change something. I know there is a solution to store all these information in the global .config fil...

Returning address of local variable or temporary when using C++0x decltype return value

Edit: This is indeed a bug in the compiler, I've opened a defect and got the following response. Hello Motti, Thank you for submitting this issue. As noted in the stackoverflow posting, this is a bug in our decltype implementation. Unfortunately, we cannot fix this bug in the next release of Visual Studio since the code is relativ...

Many WebReferences Using Same Class

I have a C# project which has many web references to a third party product. All of these web service calls use a 'user context' class. So each web service accepts the exact same XML snippet. Currently I have to keep many of these 'user context' objects around as I hit all the different web service calls. The generated 'user context' cla...

How to define a connection string to a SQL Server 2008 database?

I'm using MS Visual Studio 2010 to create an application with SQL Server 2008 database access, but what I did to create the database was add a new "SQL Server 2008 Database Project", it added it, and shows me everything on my Solution Explorer, but how do I write the connection string to connect to it, because I wrote this one, and it di...

How do I deploy an ASP.NET MVC web site using Visual Web Developer 2010 Express Edition?

Hey there StackOverflow, I'm having problems deploying my website to the live server using VWD 2010 Express. I had done this without a problem in VWD 2008 Express. But, it seems that the tools for publishing a site are very different from 2008 to 2010. What I've tried so far is to go to Project>Package/Publish Settings and I change ...

Configuring the formatting of <% %> blocks in Visual Studio editor

In Visual Studio 2010, under Tools -> Options -> Text Editor -> HTML -> Formatting -> Tag Specific Options, there are options for configuring how the editor auto formats different HTML and ASP.NET tags. This includes things like if it should automatically put a newline before and after the tag, etc. Is there a place to configure the fo...

Visual Studio - Run Batch File

What I would like I would like to easily run a batch file without leaving Visual Studio. The batch files are not always the same, they change depending on the solution I'm working with. What I know so far I know you can create custom shortcuts in the Tools section of Visual Studio (Under External Tools). My solutions have various sc...

Is there any way to get Intellisense working in Visual Studio / MVC without the "if(false)" hack?

Other than the "if(false)" hack, is there any way to get Intellisense working in VS 2010 / MVC when using the server-side Url.Content() method for re-basing Javascript files? Master Page: <script src="<%=Url.Content("~/Scripts/jquery-1.4.2.js") %>" type="text/javascript"></script> I know about the if(false) hack but I was hoping ther...

Runtime check failure #2 C/C++

Hi all, I have encountered a problem in my program that has me somewhat stumped. I had a program that was working fine (it was working fine on VS 2010 this is not an I upgraded to .NET and this error started happening post) with a program that is mostly c and some c++ (my boss HATES object oriented since it usually involves making calls ...

How to refactor Visual Studio's project layout and match up with VSS projects?

I am in the process of upgrading from VS2008 to VS2010 and want to do some cleaning up. My main solution has 20 or so projects under it in a flat file space. However there is a grouping to the projects (some libraries, some client programs, some test programs etc) and I wanted to reorganise the physical disk layout of the projects in t...