visual-studio

Controlling CodeModel's code output formatting: putting lines between namespace declarations

I'm making some experiments with Visual Studio's CodeModel. I tried creating a file with two namespaces in there through VS's Code Model: CodeModel codeModel = projItem.ContainingProject.CodeModel; codeModel.AddNamespace("Namespaces.FirstNamespace", "namespacestest.cs"); codeModel.AddNamespace("Namespaces.SecondNamespace", "namespaceste...

How do you develop Visual Studio Add-Ins?

I have a vague idea Visual Studio allows you to run a second sandboxed instance where the add-in is being in fact loaded. That'd allow you to debug your add-in code and such. Is this effectively possible? How would I go about doing that? I'm currently using a single instance of Visual Studio. I'm having the problem that as I load and r...

Can I quickly disable and enable intellisence for a particular file in Visual Studio 2010?

Can I quickly disable and enable intellisence (and any other features employing on-the-fly interpretation of the code being edited) for a particular file in Visual Studio 2010? It works to slow on my laptop sometimes, causing the text I type (even comments) in a Visual Studio source editor window to appear with one symbol per 3 seconds s...

Working around "one executable per project" in Visual C# for many small test programs

When working with Visual Studio in general (or Visual C# Express in my particular case), it looks like each project can be configured to produce only one output - e.g. a single executable or a library. I'm working on a project that consists of a shared library and a few application, and I already have one project in my solution for eac...

Is there a plugin for visual studio that can remove source control binding?

when opening a solution from a visual studio w/o source control, visual studio just complains about every project in the solution that can't be register with source control, when the number of project is big, it's really annoying. ...

How to rename a project?

I have a project, say 'BlankConsoleApp', and I want to rename it. How can I do it? ...

C++ Type error with Object versus Object reference

I have the following function (which worked in Visual Studio): bool Plane::contains(Vector& point){ return normalVector.dotProduct(point - position) < -doubleResolution; } When I compile it using g++ version 4.1.2 , I get the following error: Plane.cpp: In member function âvirtual bool Plane::contains(Vector&)â: Plane.cpp:36: er...

navigate to calling code Visual Studio

Hi Everybody, I want to know that we can use F12 to jump to the function that is called from this code , if i have to return to the code again how I can do this. ...

Include QT file problem in Visual Studio 2008

When I type #include <QObject> it complains that it couldn't find file. but if I type #include <QtCore\QObject> It works properly. I moved VS2005 to VS2008, this was not the case in VS2005, and it started with VS2008. Why am I getting this error? ...

reference other projects in visual studio for win32 projects

Hi All I am working with win32 API and my language of choice is pure C and no C++. Assume I have a project A that is present in Solution S in visual studio I want to add another project B(which has some common utility functions) in to S Now I want to reference Project B in Project A... So that I can use those utility functions from ...

SVN Repository folders don't match my solution folder structure in Visual Studio or folder structure on disk

I have a .NET solution which was badly organised, so I moved some projects around to appropriate folders. In the solution, I simply fixed the paths to the new locations, and everything is working in my working copy. I used AnkhSVN to commit the solution to the repository, which worked out fine as well. However, when I look in the repo ...

Override mime type with VS Web Dev Server

I would like to serve xbaps from the VS web dev server (cassini) to Firefox, but when served from the dev server, Firefox offers to download this file. As far as I can tell, this is because the dev server is serving the xbap file with a mime type of "application/octet-stream" instead of "application/x-ms-xbap", which works when served fr...

Building webparts with Visual Studio 2010 Express

Hi, I'm trying to get started with building my own webparts, planning to follow this MSDN article. I've downloaded Visual C# 2010 Express - I'm not quite at the point where I feel comfortable dropping 1000 big ones yet, and I installed Visual Web Developer 2010 Express via the WPInstaller. Following through the tutorial, aside from th...

Macros no longer working in VS2005

I'm using VS2005 on Vista. I'm using some macros, but now they have suddenly stopped working. No error messages of any kind. I am not aware of having done anything that could trigger this. I have made sure that "Allow macros to run" is checked in Tools->Options->Addin/Macro Security. I have tried running the macros from a keyboard shor...

Popup control from dll in web page

I'm developing a kind of framework that will work in web and win, so I have this interface: public interface IViewsManager { ... void ShowMessage(); ... } And I have the implementation for win that call a popup control from another dll. My problem is when I try to implement it for web enviroment, I have to call a popup con...

Jumping over a While loop in Debug mode

Here is the scenario: I put a break point at the beginning of a method that I want to debug... at first lets say there is Part1 in this method that I want to step into/over some of the codes... good... after that there is a While loop that I am NOT interested to step into/over it, I just want to tell the debugger that Hey you yourself ru...

linking problem: fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'

Hello, Im trying to run sample app from wxFreeChart library. After compilation on linking there is an error: wxcode_msw28d_freechart.lib(wxfreechart_lib_xydataset.obj) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86' I tried to switch linker option\advanced\target machine to MachineX64 but it d...

Visual Studio - C# Auto Format - Wrapping to 100 columns

I can't for the life of me find out how to get visual studio to keep my source to 100 columns width as part of auto-format. Ctrl+K+D Surely this doesn't require an extension? What's the simplest way to set it up? ...

Set HttpContext.Current.User from Thread.CurrentPrincipal

I have a security manager in my application that works for both windows and web, the process is simple, just takes the user and pwd and authenticates them against a database then sets the Thread.CurrentPrincipal with a custom principal. For windows applications this works fine, but I have problems with web applications. After the proce...

Limit VS2010 Intellisense Camel Case matching

Hi, I just started with VS2010 and the feature I was really looking forward too was the new Intellisense, and the Camel casing matching in particular. But I must say I'm pretty dissapointed with the way it works and am wondering if this is just a setting, or not. When I type 'OIE' I get the following results: OrderItemBackerEntity ...