visual-studio

Object of type "X" cannot be converted to object of type "X"

(Can't believe this hasn't already been asked, but I can't find a dup) In Visual Studio with lots of projects, when I first open the solution, I sometimes get the warning Object of type "X" cannot be converted to object of type "X". Generally rebuilding seems to make it go away, but does anyone know what this is caused by, and how to av...

How to port C++ code to C++/CLI in Visual Studio?

I have an application written in native C++ which I'd like to get running on the .NET virtual machine. I was thinking of recompiling the C++ code as C++/CLI, using the Visual Studio 2008 compiler. Regrettably, I don't find any documentation on how to do this, so hence my questions: Does this actually make sense? Am I trying the impossi...

Shortcut to collapse all documentation headers/comments in Visual Studio

Is there a way to collapse all documentation headers (/// comments) in the current file in visual studio (2008+)? ...

ReportViewer for SQL Server 2008

VS2008 ReportViewer won't work in local mode with SQL 2008 reports (e.g. created with Report Builder 2.0). As far as I know that Beta2 includes updated report viewer: from this topic it seems that there's redistributable package. The question: is there a way to make the new ReportViewer control to work with VS2008? ...

Way in Visual Studio to display integers as bit array

Is there a way in Visual Studio, either through it's native features or a plugin, to show an integer/long/char variable in the debugger window as a bit array? For example, rather than seeing 5 or 0x5 I'd like to see 101. As a bonus feature I'd like to see them left-padded with the correct amount of zeroes, so that the total width of the...

Visual Studio linking error LNK2005 and LNK2020

Hi. I'm using visual studio 2003 and I'm getting the following linking error in my project: Linking... LINK : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification msvcrtd.lib(MSVCR71D.dll) : error LNK2005: _fprintf already defined in LIBCMTD.lib(fprintf.obj) C:\Documents and Settings\mz07\Desktop\project\H...

Split a string on a string not a character

I want split a gridview row on an html tag. How can i do this preferably in C#?? e.row.cells[1].Text.Split("htmltag") Thanks in advance ...

VS2008 targeting .NET 2.0 doesn't stop me from using C# 3 features

I had a VS2005 solution and wanted to get off VS2005 for the new year. I was mostly happy with the upgrade process and pleasantly surprised to see that my build scripts mostly still worked. My question is around the multi-targeting feature - I don't have .NET 3.5 installed on my servers, so I have to continue to target .NET 2.0. That ...

Factorial task in c# .. please help me in doing dry run..

I'm having problem in the dry run of a program.. I'm not getting why my program is giving 0 in the output.. please help.. here is my code.. : using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Task_8_Set_III { class Program { static void Main(string[] a...

Tasks from Comments don't show up in Task list when project opened on different machine

I have a Visual Studio solution composed of multiple projects which I work on from several different machines using SVN as my versioning solution. I have various additional tasks defined in the Task List settings for my solution but on one particular machine it doesn't automatically find the Tasks when I open the solution. If I manuall...

Visual Studio: how to set path to dll?

I developed an application that depends on a dll. When I debug my app, the app would complain that "This application has failed to start because xxx.dll was not found." So what I have to do is to copy the dll into the same directory as my .vcproj. Is there a way to set the project to look for the dll in (preferably) some relative path ...

how to build dll files in netbeans using ms vc++ compiler ?

i tried using cygwin gcc compiler along with netbeans to create dll files it seems there is an issue in the generated dll file. if i use the ms vc++ compiler and do all compiling on command line its runs file, but i dont know how to integrate ms vc++ tools in netbeans ... can anyone help me on that ? thanks jay ...

Access webpage on lan or remote location running on VisualStudio (2008)

I am deving a webpage. For testing purposes i want to access the webpage via my VM and possibly ask a friend to mess with it remotely. The app is running in visual studios 2008. I put set my router DMZ to my IP address and i tried connecting via VM and remotely. No luck. How do i config visual studios to listen outside of the machine? ...

error LNK2019: unresolved external symbol

Ok, so I'm having a problem trying figure out the problem in my code. I have a lot of code so I'm only going to post the relevant parts that are messing up when I compile. I have the following function inside of a class and it will compile and everything will run fine until I call the function "CalculateProbabilityResults" and it runs th...

VS C#: Prompts me to resave, then refuses to open the file

Sometimes when I hit Save (ctrl+s) or just Save All, Visual Studio C# prompts me to resave the file I edited last. I can't save it as it is, because it already exists (and it should), and if I save it as something else, VS will prompt me for the file everytime I try to build. If I shut down Visual Studio and try to access the file with ...

Application does not start in debugger

The application I'm working does not start in the debugger of Visual Studio 2005. Here's what I do: I rebuild the application and hit F5 to start it The title of the VS2005-window says "projectname (Running) ..." The debugger buttons appear but are greyed out The application appears in the Windows task manager, but it has only 80k in ...

PNG, Why is visual studio making me download PNG files?

i write and my page loads it find. When i click on the link instead of having the image show on screen it promps me to download it. Why? How can i make it display in the browser? gif and jpg both display in the browser. -edit- i am using FireFox 3.5 there is no code that serves it, its just a link and the file exist in my folder. The l...

Visual Studio 2008 (C#) with SQL Compact Edition database error: 26

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Ser...

How to make Visual Studio stop "compiling" .js and .css files

I use Visual Studio as my editor for .css and .js files.. It REALLY SUCKS especially with .js files since it insists on indenting them in a very weird way, but I find it convenient that the first alt-tab is always the browser instead of another editor, and that ctrl-tab is always either the code file or the css/js. Anyways, in all its r...

Visualstudio macro - enumerating all projects properties

I have a huge solution with many projects, I would like to set a particular propertie (for example warning level) for each of the projects. Can this be done with a macro? ...