visual-studio

How do I use a profiler?

Very often I hear: use a profiler and unit test. How do I do that? I would be glad if someone would provide either links to websites with tutorials or recommend a good book. I'm using Visual Studio 2010 Ultimate. ...

Automating Visual Studio 2010 from a console app

I am trying to run the following code (which I got from here). The code just creates a new "Output" pane in Visual Studio and writes a few lines to it. Public Sub WriteToMyNewPane() Dim win As Window = _ dte.Windows.Item(EnvDTE.Constants.vsWindowKindOutput) Dim ow As OutputWindow = win.Object Dim owPane As OutputWind...

How do I upgrade ReSharper 4.5 settings to ReSharper 5.0 settings

I've recently upgraded my code from Visual Studio 2008 .NET 3.5 to Visual Studio 2010 .NET 4.0. I've used ReSharper 4.5 and now I'm using ReSharper 5.0. I want my ReSharper 4.5 settings (the ones in .resharper file) to be upgraded to ReSharper 5.0 settings. Is there an automatic way to do it? Should I do it manually? Would just overwr...

Problem passing a reference as a named parameter to a variadic function

I'm having problems in Visual Studio 2003 with the following: void foo(const char*& str, ...) { va_list args; va_start(args, str); const char* foo; while((foo = va_arg(args, const char*)) != NULL) { printf("%s\n", foo); } } When I call it: const char* one = "one"; foo(one, "two", "three", NULL); I get: ...

How to set IDD_FORMVIEW dialog as main "form" in visual studio 6 c++?

I just started playing with cpp for the first time (using VS6 C++), I created an empty win32 application, added a IDD_FORMVIEW dialog, and now I don't know how to set that dialog as the main "form" for the application. I mean I want the dialog to be the first and main window opened when executing the compiled exe. ...

Visual Studio 2008 IDE freezes/crashes when opening .aspx file with css included

Visual Studio (SP1) runs fine until I try and view .aspx source files with the lines <style type="text/css"> </stlye> anywhere in them, upon which it freezes (i.e is totally unresponsive) and I have to use the task manager to shut it down. I have read a lot of questions about Visual Studio 2008 crashing on viewing some sourc...

Why are the using directives inside of the namespace in Silverlight 4/VS 2010?

Why are the using statements inside of the namespace in Silverlight 4/VS 2010 auto-generated code? The new convention seems to be namespace myNamespace { using System.Windows.Controls; using System.Windows.Navigation; . . . public myClass() {} } rather than the standard: using System.Windows.Controls; using System....

Favorite Visual Studio keyboard remappings?

Stack Overflow has covered favorite short-cuts and add-ins, optimizations and preferences -- great topics all. If this one has been covered, I can't find it -- so thanks in advance for the link. What are your favorite Visual Studio keyboard remappings? Mine are motivated by the fact that I'm a touch-typist. Mouse, function keys, arrow...

How to use jet engine to read data from excel in vb.

Hi all, how can I create a connection to excel file and view the result in vb. I am using visual studio 2008, I have been trying to look for answers around but could not find one that teaches step by step.And what references do I need to use? Thanks in advance. Regards Jason ...

Visual Studio creating bin/ folder in wrong location.

In Visual Studio 2008, I have a solution with a number of projects. Each project has the same build output path of "..\bin\Debug\" for debug, and "..\bin\Release\" for release. So the directory structure looks like this: solution\ bin\ project1\ project2\ project3\ This all works fine, all the assemblies go to the cor...

Jump to Documentation for a function/class in Visual Studio

In Eclipse and Xcode it is possible to jump directly to the documentation for a function/class from the editor. Does Visual Studio provide this functionality? ...

Detecting Visual Studio Smart-tags events

Is it possible to detect with VSX when any (or a particular) smart tag event is happening? I mean, every time we rename a variable, for example, a smart tag is available that allows us to change it through a form. I'd like to know if I can access that "text is changing" event. I don't mean to have to check for myself if the text is bei...

Using XSD file in VS2005

Hello all I want to write an XML file. I have created an XSD file named XMLSchema.xsd, and run the command 'xsd /c XMLSchema.xsd' which generated a c# class file. Now, how do I use this file to generate XML files? Part of my code: <?xml version="1.0" encoding="utf-8"?> <xs:schema id="XMLSchema" targetNamespace="http://tempuri.org/XM...

display classes of a namespace in visual studio (C#)

I am a Java programmer, and just starting to use Visual Studio to do C# programming. In Java IDE such as Eclipse, if I do not know the class name in a package, I can just type a dot (.) after a package name, then I will get a list of all the classes in that package. How I can configure visual studio to do the similar thing, say, if I cli...

How to paste formula from visual basic to excel In relative

In visual basic code works as below MyWorksheet.Range("A1:D1").Formula = "A1B2" In excel it shows in A1 as A1B2 B1 as A1B2 C1 as A1B2 D1 as A1B2 what i want do A1 as A1B2 B1 as A1B3 C1 as A2B4 D1 as A2B5 Thanks in Advance ...

C++ : how to access an object created in Form1?

hi.. i am new in C++, i'm using VC++ 2008, i have created a form with pictureBox inside with gui design, located in Form1.h. for code stability, i'm trying to separate beetween gui and processing classes, so i made a new class in process.h which contain code to change image in the pictureBox, the problem is that i cant access pictureBo...

Run Debug mode from command line

Hi all, I want to run my project in debug mode from command line, not from visual studio (vs is open) Is there any parameter to add to the command? Thanks in advance! Edit: Actually I want to initialize Multiple instances of my project at the same time (from bat file) and debug them - instead of pressing multiple F5 ...

C#: VS.NET: Change name of exe depending on conditional compilation symbol

Can you tell Visual Studio to output a different name of an exe file depending on if a specific conditional compilation symbol is set? ...

Addin to Visual Studio for visualizing a selected json string in the editor

Hi! I've got a lot of xml files, and embedded in some elements there are json serialized objects. They are quite difficult to read and modify. So question is: Are there any Visual Studio addins availible that can take selected json-text in the editor, and visualize it (and maybe even allow for editing)? if not, if I must build it - ar...

How can i use Xml Serilization with gridview?

i try to use xml serilization in gridview but it returns me: InvalidOperationException was unhandled by user code My code: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Xml.Serialization; using System.IO; namespace WebAppl_seri...