visual-studio-2010

Visual studio Attaching debugger to windows service -- attach greyed out

I am trying to attach to a windows service using the Visual Studio 2010 --> Debug --> attach to process command. When i scroll through the list of processes my windows service is greyed out and the attcah button is also greyed out. I have tried changing the service account to loacal service, my account, etc but it remains greyed out. Any...

Deploy a visual webpart developed with VS2010 to Sharepoint 2007

Hi, I developed a simple webpart using the Visual Webpart template in Visual studio 2010 and has been testing it within Sharepoint 2010. I want to know if this webpart could be deployed to Sharepoint 2007 from the .cab generated by VS2010, and if so, how? Thank you. ...

Implementing for(auto item : container) in VC2010

I wanted to create a little macro to simulate for(auto item : container) in VC2010 which I can then replace with the real construct when it's released. There is BOOST_FOREACH, however I would like auto support. I've tried creating a macro. However it fails when the dereferenced iterator is a constant type. #define _LIB_FOREACH_LINENAM...

Problem executing custom build rules in parallel inside the VS 2010 IDE

I have a solution with several projects in it that executes many custom build steps. Some projects depend on other projects, but most of the build steps are independent of each other. When building inside the VS 2010 IDE, I am getting errors like this: error MSB6003: The specified task executable "cmd.exe" could not be run. The proc...

Proper choice of rules in VS2010's static analyzer

There are many groups in VS2010's static analyzer: All Rules Basic Correctness Rules Basic Design Guideline Rules Extended Correctness Rules Extended Design Guideline Rules Globalization Rules Minimum Recommended Rules Security Rules But it is too hard to decide on a proper option. What option do you use? What option do most of...

How to debug a threadpool in Visual Studio?

I'm quite new to the multithreading environment and I'm having trouble debugging an application which makes use of a threadpool created by the elapsed event in System.Timers.timer class. I have a breakpoint set inside a method which is called each time by the elapsed event, but Visual Studio's is jumping between lines of code because it ...

Retrieve Column data from datagrid, Coded UI tests

Hello, I am trying to retrieve data from a datagrid. I am using it for automated gui testing in Visual Studio 2010 with C#. When I search a datagrid I have to enter dummy values because when there is one row, the second column displays blank when it is not. The datagrid is third party code and is not standard Microsoft datagrids. I am n...

VS2010: build, start and detach project with shortcut or context menu

Hi, I have quite a few projects in my solution and I would like to build, start and then detach some of them quicker. At the moment I have to right click the project, debug->start new instance, open process window, select process and then detach. I am wondering if there is a nicer solution to this. Can I perhaps tweak the context menu...

Migrating SQL CLR project from VS2008 to VS2010 - deploy fails

I have a solution with a SQL CLR project in VS2008. The solution / project was converted to VS2010 and now the deploy no longer works. I get the following type of erros: Beginning deployment of assembly MyProjectDatabaseCode.dll to server DEVPN-004 : MyProject The following error might appear if you deploy a SQL CLR project that ...

No more Intellisense for ASP tags visual studio 2010

Hi there, I'm not getting intellisense for asp tags anymore in websites or web applications. There is a check mark for the following: Tools->Options->Text Editor->C#->General->Auto list members Tools->Options->Text Editor->C#->General->Parameter information Tools->Options->Text Editor->C#->Intellisense->Show completion list after a c...

Different configuaration string for specific build configuration

Hi, how can i configure my Visual Studio 2010 C# solution/project so that when i select a Debug configuration - ConnectionString#1 would be used Release - Connection string #2 and "Myconfiguarion1" (which was copied from debug) -> Connection string #3 I got to it work with debug in such a way: if (ConfigurationManager.ConnectionStri...

SSIS packages 2005 & 2008 editable with what versions of Visual Studio?

I know that in order to edit SSIS packages you need the same version of BIDS or Visual Studio. With Visual Studio 2010 is there any change in the ability to open older SSIS packages or do I need to have VS2005 and VS2008 installed along side my VS2010 installation? TIA J ...

VS2010 compiler and cuda error: linkage specification is incompatible with previous “hypot”

When I try to build my project on a 64 bit Windows 7 using VS 2010 in Debug 64 bit configuration I get this error along with two other errors. error: linkage specification is incompatible with previous "hypot" in math.h line 161 error: linkage specification is incompatible with previous "hypotf" in math.h line 161 error: function "abs(l...

Application Failed to Initialize Properly

We have a project built with vs2010 which utilizes a .dll with managed code. I've built the .dll in vs2010, target Framework .NET 4.0 (tried Client Profile as well), which is the only option 2010 gives you to use. When I go to run it, it can't initialize and I assume it's some incompatibility...but I have no idea what it would be. Does a...

How to quickly create a wix setup for a visual studio project

I have several large websites that I wish to create a WIX installer for. I'm dreading coming up with the initial WIX setup since there are a lot of files. Are there any shortcuts for this? I mean, if is there any tool I can use that I can point to a file system and tell it to generate components for every item? I'm using Visual Studi...

Why is VsPerfAspNetCmd throwing the error "Value does not fall within the expected range"?

I am trying to profile an ASP.NET application the Visual Studio 2010 ASP.NET profiler and I get the following output: C:\MyWebApp>VSPerfAspNetCmd /i /Output:MyWebAppSampling.vsp http://localhost/MyWebApp Microsoft (R) VSPerf ASP.NET Command, Version 10.0.0.0 Copyright (C) Microsoft Corporation. All rights reserved. Configuring and att...

Why are my Custom Build steps not running in Visual Studio 2010?

I have a Visual Studio project with several Custom Build steps in it, but some of them are simply failing to run. There are no errors and no warnings, and according to the build logs they are running, but they're definitely not. It was all working in older versions of Visual Studio, but it's now going wrong in Visual Studio 2010. ...

Mutliple Executables From Single C# Project in Visual Studio

I currently have a single solution with a single project and this generates executable A.EXE. The project consists of dozens of C# source files, forms, etc. I now need to generate executables B.EXE and C.EXE as well. B.EXE will use about 95% of the code base for A.EXE (i.e. a subset of functionality). C.EXE will use about 80% of the cod...

Passing a lambda to a template function on VC10

I wrote the following code on VC10. Calling f1 is okay, but on calling f2 the compiler showed an error. The difference between the two functions is only "template ", but the template type is actually not used. Why does the error occur? #include <functional> void f1( std::tr1::function<void()> f) { } template <typename > void f2( std::...

VS2010 - Loading symbols to debug at design time (Breakpoint will not be hit)

Issue: Breakpoint will not be hit because no symbols have been loaded Thanks to helpful fellow users I found out how to debug controls at design time: I have to start a 2nd instance of VS2010. Unfortunately, when the 2nd instance of VS2010 starts, it will load all kind of symbols, but exactly not the ones from my project. In the module...