visual-studio-2008

.NET datarow visualizer?

Are there any datarow visualizers which work in VS 2008? I have tried a couple (DotNetDan & Captator) and they both give cast exceptions. It seems these were developed for VS 2005. I know I can put a datarow in a datatable and view it through a datatable visualizer but I don't want to write code every time I want to inspect one. ...

How do I change my development environment from C++ to C# in Visual Studio 2008?

After installing Visual Studio 2008, I have chosen Visual C++ but instead I wanted to choose C# environment. How do I change it from C++ to C# environment? ...

Visual Studio - Grid Ruler for Winform Design

Hi, Is there a ruler addin for Visual Studio available which I can use to measure my winforms based on resolution. I am developing on a machine which has very fine resolution, however my end users have several resolutions, causing my app to not display correctly on some machines. This is for winform development. How do you guys handle s...

C#: Create custom warning in Visual Studio if certain method is used in source code

Is there a way to output a warning in the debugger if a certain method is used in the code? I have a couple of delicate methods that should only be used in exceptional cases, so I'd like to have some kind of warning output if they are actually called anywhere in the project. Is this possible? ...

C# - Selectively suppress custom Obsolete warnings

I'm using the Obsolete attribute (as just suggested by fellow programmers) to show a warning if a certain method is used. Is there a way to suppress the warning similar to CodeAnalysis' SuppressMessage at points where the use is justified? Thank you! EDIT This is for [Obsolete("Some message")] as I need to include some details about ...

Error C2678 after migrating C++ code from VC6 to VS2008 - no operator found which takes a left-hand operand of type 'type'

This piece of code compiles file in VC6 but in VS 2008 it gives an error. Can anyone tell me why? I guess it is because you can no longer compare a pointer to NULL (which is a typedef for 0). If that is the case, how do I do this comparison in VC9? for ( std::vector<aCattrBase*>::iterator iT = attrLst.begin(); iT < attrLst.end(); iT++) ...

Visual Studio Performance when editing XAML/Silverlight files

When I work on Silverlight projects within Visual Studio 2008, I regularly notice that the XAML editor hangs for up to 10 seconds. This because Visual Studio consumes 100% CPU during that timeframe. Any ideas how I could fix that? I assume this is some kind of background compiling for itellisense or something similiar. It happens during...

VB.NET in Visual Studio 2008 on Vista 32bit building a WSP

I am trying to build a WSP file in VS2008 on my VB.NET project. How would I go about doing this? I can find a lot of plugins for C# but not VB.NET. ...

Desired output at design time, Visual Studio 2008 (vb)

Is it possible to choose to run specific code at design time? What i would like to be able to do is to display a list of enums that are used ina specific form and menu. Is this possible to do? Any response would be appreciated. Thanks in advance! ...

Debugging in failing method when invoked from other thread

I have code like the one in this question, basically a UI-thread that gets updated from another thread and uses InvokeRequired() and Invoke(..). Now, if the method fails in the work part, the debugger stops on the Invoke(..) line -can I make it show me the line where it actually failed like it usually does? ...

Where to find base type of a class

One thing that always bugged me, is that I do not see the base type in Visual Studio. I just stumbled on this, because I tried to cast a System.Windows.Forms.MenuItem to a System.Windows.Forms.Control In eclipse the "intellisense" (or whatever it is called) shows me while exploring the members of a class for each member from which base ...

Stop word wrapping in VS2008 (vb)

Unfortunately VS2008 has wrapped some of my code automatically, this isnt helpful for searching as it has wrapped at points that has resulted in split names of variables in my designer project. e.g. Variable named MyVariable would appear as below: "MyVar", & _ "iable" This means i cant search for these variables. Is there any...

How can I populate a dropdown list with data?

I have a dropdownlist that I want to populate with a specific value and specific text. I'm not using a datasource but I am manually making a connection and retrieving data in code. How can I populate this dropdownlist? If I read the data with a datareader and increment an array I only get either the value or the text. This is what I have...

Type casting problem in code behind file

I have the below error message in my asp.net website when i replaced the textbox and put dropdown and named the dropdown id same as textbox id. The value from the drop down should be taken and put in a email body and will be received as mail when i click on the submit button. Below is the error i am getting when i click on the submit b...

How to change this find control for drop down to text box?

I am trying to select a value from a drop down control before it was text box. I have given the same ID for drop down which was similar to the text box. Below is the code: Do counter=counter+1 tempPanelInputBox = form1.FindControl("txt_" + panelUsed + "_input" + counter.ToString()) Loop untill counter=CounterEnd a...

How to: compile generated C++ source files?

Hi, so I'm writing a VS2008 C# Add-In to automate AspectC++ weaving in C++ projects. I'm generating the C++ source files (now woven with aspects), but I can't figure out how to compile them as part of the pre-build step. Is there a convenient way to specify new source within the IDTExtensibility2, EnvDTE90, or VslangProj90 namespaces? ...

Visual Studio Usings Plugin

I find the usings remove and sort ability to be highly useful, but does anyone know of a tool that will scan my code looking for unrecognized types, look through available namespaces, and offer me possible listings to use? ...

How to Display SharePoint controls in ASP.NET Designer in Visual Studio 2008

How I can display SharePoint controls (such as the PeoplePicker) in an ASP.NET Page in Visual Studio 2008? I drag and drop the PeoplePicker but it gives me: Error rendering control. ...

Error while adding a dropdown in website

I am getting the following error while i submit a form after i added a dropdown box in my designer System.NullReferenceException: Object reference not set to an instance of an object. at WebApplication1._Default.collectEmailBodyText() in C:\v1.5_production_05June09\Default.aspx.vb:line 219 Below is the extra two lines that i added in ...

Dropdown probem

Below code i have to ammend for adding a dropdown in my asp website. I have already added could you please check what is wrong. Function collectEmailBodyText() Try Dim counterEnd As Integer = subActivated_HowManyControlsInAPanel() Dim counter As Integer = 0 Dim tempPanelLabel As Label ...