visual-studio

How to programmatically cancel an embedded MsBuild build

I'm embedding MSBuild directly into a more complex build tool. The relevant code looks roughly like this: // assume 'using Microsoft.Build.BuildEngine;' Engine e = Engine(); BuildPropertyGroup props = new BuildPropertyGroup(); props.SetProperty( "Configuration", Config.BuildConfig ); e.BuildProjectFile( projectFile, new string[] { "Buil...

What are some reasons a Release build would run differently than a Debug build

I have a Visual Studio 2005 C++ program that runs differently in Release mode than it does in Debug mode. In release mode, there's an (apparent) intermittent crash occurring. In debug mode, it doesn't crash. What are some reasons that a Release build would work differently than a Debug build? It's also worth mentioning my program is ...

Change the location of the ncb file in Visual C++ 2008 (9.0)

I´ve tweaked the VC++ settings so that all of my actual code will go to one place, while compiler generated binaries will go to another. This ncb file is the exception though. It is a quite large IDE generated binary file (Intellisense database). I can´t seem to be able to move it anywhere other than the solution folder. I´ve reasearched...

How do I easily identify classes that implement IDispose in Visual Studio?

Is it possible to identify classes that implement IDisposable. I was hoping to do so in the Visual Studio Color settings or with an addon. I don't use Resharper and I have heard that FXcop has this feature. I was looking for something different than these options. ...

Visual Studio: hotkeys to move line up/down and move through recent changes

I'm moving from Eclipse to Visual Studio .NET and have found all my beloved hotkeys except two: in Eclipse you can press ALT-(leftarrow) and ALT-(rightarrow) to visit recent changes you have made, something I use frequently to go back to where I was in some other file and then return. Apparently in VS.NET the CTRL-(minus) and CTRL-SHIF...

What could cause Visual Studio / C# error MSB3105: Duplicate resources

While working on an existing project I suddenly got the following error when trying to compile the solution: error MSB3105: The item "[filename]" was specified more than once in the "Resources" parameter. Duplicate items are not supported by the "Resources" parameter. Now, as far as I'm aware, I did not make any change to the project t...

Make Visual Studio understand CamelCase when hitting ctrl and cursor keys

Is there a way that I can configure Visual Studio 2008 to understand CamelCase? Specifically, I'd like to be able to get ctrl + right or left cursor to take me to a subsection of a variable or type name. i.e., if my cursor was at the start of this line: LongNamedExampleClass longNamed = new LongNamedExampleClass(); and I hit ctrl + ...

Best practices for maintaining shared hosting websites with ASP.NET and SQL Server?

I've been doing PHP/MySQL websites with shared hosting providers for the last couple years. The day-to-day process is basically: develop in Eclipse, one website per folder upload via FileZilla, one website per folder use PHPMyAdmin to create and manage your local and online databases and transfer data from one to another to backup the ...

Getting rid of "There is no source code available for the current location"

Ok, this is my own fault, but I can't seem to rescue myself. Whenever I try to step into a class that has fields with assignments calling into .NET code, I get a dialog box that contains this text: --------------------------- Microsoft Visual Studio --------------------------- There is no source code available for the current location...

Tab Index in Windows Forms

In my current application I have a form that requires the user to enter TONS of data. There are about 30 Textboxes and it happens that during development new ones get introduced or old ones get kicked out. One Requirement by my customer is that they are all navigable through pressing Tab, and so I'm currently at the mercy of the TabInde...

How to use makefiles in Visual Studio?

I heard a lot about makefile and how it simplifies the compilation process. I`m using VS2008, can somebody please advice me some online references or books when I can find how to deal with it? ...

How can I get started using Nunit in my Visual Studio project?

I want to start using Nunit (finally), I am using Visual Studio 2008. Is it as simple as importing Nunit into my test project? I remember seeing a GUI for NUnit, does that do the exact same thing that a separate test project would do, except show you the pass/fail visually? ...

Multi-lingual projects in Visual Studio

Would anyone know if there are plans or extensions to Visual Studio to allow for multi-lingual projects? While the .NET platform is truly polyglot, Visual Studio project are stubbornly monoglot which means that all the work that goes into tooling C# and VB is unusable from newer languages like F# and IronPython. PEX is an example of a ...

How can I toggle word wrap in Visual Studio.NET?

Does Visual Studio .NET have a way to toggle word-wrap on and off? I am used to this feature in Eclipse which allows you to right click and toggle word wrap on and off so that when you have long lines that extend out to the right, you don't have to move the bottom scroll bar right and left to read your code/html: http://ahtik.com/blog/2...

Is there an inverse of System.Diagnostics.ConditionalAttribute?

Is there an analogous conditional-not-present attribute or maybe a way to use the Conditional attribute to only include a method if that symbol is not defined? What I'm looking for is something that works like this: [Conditional("!SILVERLIGHT")] private void DoStuffThatSilverlightCant() {...} Such that the method will not be included...

How do I change colors for the F# interactive shell

In my current color scheme, the F# interactive shell is unreadable within Visual Studio. I've been through all the color settings, and I can't find the settings it is using. Does anyone know how to change the color settings for the F# interactive shell within Visual Studio? Thanks, ++Alan ...

How to get JQuery Intellisense in a .js file? (Visual Studio)

Hello, I am using JQuery extensively in my latest project. I have put my javascript content in a separate .js file, and am referencing that file in my HTML page. I get jquery intellisense support in visual studio, but I don't know how to refer the jquery file in my new javascript file so that I can get jquery intellisense there to. I am...

Apply style reference at runtime in Mobile web application

Hi All, I'm new to mobile web development. I'm creting a website for mobiles in ASP.NET 2.0. I want to apply different style reference to the Objectlist control data according to the prfit/loss (Green if profit and red if loss) at runtime. Please help. Thanks & Regards Khushi ...

VS 2008 Team System crash on opening solution

VS 2008 crashes whilst opening a solution file when it reaches the stage of "Loading project files 'Solution Items'". Is there any way of either stopping the virtual folder of solution items from opening or a workaround for this? The solution is coming from TFS 2005 and source control. Thanks ...

Why does Visual Studio stall while debugging?

Sometimes, while I am debugging a c# application, I will hit a break point and when I try to continue, step or step into, it just does nothing. The yellow line highlighting the current line goes away, but it never reaches the next line. The app is still frozen like I am on a breakpoint and I can do nothing but hit the stop debugging bu...