visual-studio

How to prevent expected exceptions from breaking the debug test run?

When running MSTEST unit tests in debug mode, the execution stops in every expected exception that is thrown. My test looks like this [TestMethod()] [ExpectedException(typeof(ArgumentNullException))] public void ShouldThrowExceptionWhenPassingNull() { object data = null; target.CheckNull(data); } the target method looks like t...

project location not trusted in VS2010

How to get VS2010 to trust a location and not ask for permission before opening projects from location not trusted? There used to be a .NET 2.0 configuration tool --- is there a .NET 4 equivalent related to this http://stackoverflow.com/questions/2603144/the-project-location-is-not-trusted-error-in-visual-studio ...

Visual studio app running extremly slow with debug

I have a native c++ program which runs > 20 times slower when started with Debug (F5) but runs at normal speed when using start without debug (Ctrl+F5). Is there some setting I did choose wrong or something? [Update] It does not matter whether I use a debug or release build. Also if I use Windbg the program is a magnitude slower. [/Upd...

Automatically deleteting old IntelliTrace recordings

I recently noticed that I collected 22GB worth of IntelliTrace recordings. Sadly, I was unable to find a location in the IntelliTrace settings that would allow me to automatically delete them. Is there an solution to this in Visual Studio or do I have to take care of this myself? edit: As Hans Passant suggested, I submitted a suggestion...

using different data connection in visual studio

It's possible to use 2 or more data connections in visual studio and using them in a single query, like we can do in sql server management (while we use mysql and mssql dbms same time): SELECT * INTO testMySQL.dbo.shoutbox FROM openquery(MYSQL, 'SELECT * FROM tigerdb.shoutbox')...etc ... etc... ...

Visual Studio designer stops recognising changes occasionally

Hi all, Using VS2008 visual designer occasionally the designer seems to stop recognising changes. Normally you get a * next to the filename in the tabs when a change is made but sometimes this stops appearing when I am making changes. When this happens may changes are getting "lost" so if I close/reopen the file all my changes are gon...

Error - The application has failed to start because its side-by-side configuration is incorrect.

Hi, My exe built on Visual studio 2008 runs on my development system but on other systems it gives the error "The application has failed to start because its side-by-side configuration is incorrect. please..." The exe is in release mode and I have installed the VC redistributable. Using dumpbin /dependents command I see that it along ...

Display a & in a menuitem or menustrip

I have a menu item that needs to be formated like This & That, but the & is converted to an underscore. Is there an escape character to actually be able to display the &? ...

How can I put messages or warnings into the VS error window?

The Obsolete attribute, and a few other things I've seen are able to have custom warnings or messages show in the Visual Studio IDE Error window. Is this possible with a custom attribute, preprocessor directive in C# or something else? using Reflector to look at the Obsolete attribute didn't have any clues. ...

Is there a way to send a CString to a CFile without writing an actual file?

I have data stored in a CString and it needs to be parsed by an XML parser library. The problem is the XML parser takes in a CFile. It's not ideal to write out the CString to a text file and then reload it into a CFile. Is there any way to directly send the CString to the CFile without making an intermediate output file? ...

Is there any hook to access the names of the functions being called at runtime in Xcode?

Is there any hook to access the names of the functions being called at runtime in Xcode? I'm just trying to log the names of all the functions that are called during the lifetime of the process. I have the necessary symbols for the application. I can do it easily in Visual Studio using _penter() and _pexit() functions. But can't find a...

Is it possible to use libraries build under VC++ in cygwin gcc build?

I have libraries which are build using VC++. I want to use the same libraries in a program and build in cygwin gcc compiler. Is this scenario will work? ...

Converting VS2008 to VS2010 project "cannot find the file specified"

Hello, I am trying to upgrade a Visual C++ 2008 project to a Visual C++ 2010 project. However, when I attempt to do so, I receive the following error: The following error has occurred during XML parsing: File: C:\Documents and Settings\t-aruns\Documents\Visual Studio 2008\Projects\test\test\test.vcproj Line: 9 Column: 2 Error Message: ...

Extending Visual Studio

How can I extend Visual Studio or create a macro that allows me to generate a local resource for all pages automatically? I have about 500 pages and UserControls, and it's difficult to generate resources for every page individually ...

Is there a tool similar to the Web.config tranformation tool that I can use on xml in general?

I've been having to perform changes to a handful of xml configuration files which is tedious and error prone. I was wondering if there was a tool available like the web.config transformation tool that I could use to transform regular xml with. ...

How to convert 'open web site from folder' to csproj based 'ASP.NET Web Application' project

The title pretty much says it all, I've got a 'web site' that was built and checked into vss and to open it we are going to file > open > web site, and picking the folder. This is the technique that gets you a project but without a cs/vb proj file. Is there any easy way to convert this to an 'ASP.NET Web Application' project, complete ...

How to invoke built-in commands from Visual Studio macro?

From a Visual Studio macro, how do I (programmatically) invoke one of the built-in commands (say, File.OpenFile)? Thanks. ...

Can MSBuild run regex on my config files ?

MSBuild generates a configuration file for me. I would then like to replace certain strings in the file. Is this possible? Also, I use Visual Studio as well to build my project. Can I do the same thing from Visual Studio? Thanks! ...

How can I move/copy a TFS Build Definition to a new Team Project?

We recently migrated to TFS 2010, and have created a new Team Project. (The old one was created in 2005, and seems to be missing key metadata to allow full functionality in 2010). We've copied all our source, and have figured out how to copy our work items to the new team project, but we can't figure out how to migrate our build defini...

Does VS2010 have an xml schema validator?

Hi I am wondering does VS 2010 have something that I can use to compare an xml document to my schema? I tried a few online tools but my xml document seems to big and my browser just crashes. Thanks ...