visual-studio

Adding QT Form to an existing VS2008 project.

I have a normal VS2008 project that I've been working on for awhile that is doing some OpenGL based stuff. The main window is created with GLUT and until now that has been sufficient for my GUI. Now, however, I want to add a small window of buttons, and I need to do it in a cross platform way, so I decided to use QT. I've installed all...

Visual studio post build events -- doing them in a project instead of the event dialog

So something I've been doing recently is adding an additional project to my code solutions and doing my post build stuff programmatically in it. This project builds last and then launches itself. cool stuff I can do there is run an ILMerge automation class I created to perform merges automatically if i just give it a project folder, in...

How to make make syntax highlighting and keyboard behavior identical for VB.NET and C# in Visual Studio 2008?

C# Types have their own color (cyan by default). Enter completes the auto-complete suggestion. Visual Basic Types use Identifier color (black by default). Enter completes the auto-complete suggestion and adds a "()" and a newline. These and other seemingly minor differences are so enraging I can't get any work done. How do I make...

Why is EnvDTE.ProjectItem.FileCodeModel = Nothing?

I wrote a VSMacro (in VS2010) that parses a solution and adds try and catch statements to cpp files. It's been working fine up until now. I had to reformat my pc and reinstall VS2010 and now it crashes. Here's a snippet from the macro. Sub Foo(ByVal file As EnvDTE.ProjectItem) Dim fileCM As EnvDTE.FileCodeModel fileCM = file.Fil...

Compiler error in VC++2010 (clean in 2008!), "ambiguous call to overloaded function"

I'm hitting a compile error in VS2010 with code that compiles cleanly in VS2008. Here's my error, from the Output Window, with all of its verbosity: ...\elementimpl.h(49): error C2668: 'std::basic_string<_Elem,_Traits,_Ax>::basic_string' : ambiguous call to overloaded function with [ _Elem=char, _Traits=...

Integrate or link to a SQL Server Management Studio Project from with a Visual Studio Solution

While most of the work for my .NET projects is done in Visual Studio, I prefer to work in SQL Server Management Studio [SSMS] (I'm currently using the 2005 version) when editing stored procedures and doing other DB-related tasks for a project. I used to just open a ton of query Windows, commit my alters, and move on, but I recently disc...

How to prevent Visual Studio from adding generated files to source control

Here's my specific scenario: Using VS2010, Pex and TFS2008, generated moles files are getting automatically added to source-control (TFS). Pex adds a "project_name.moles" file to your test project and then autogenerates 3 files at build time: project_name.Designer.cs, project_name.Moles.dll, and project_name.Moles.xml. I want to keep th...

Is it possible to have a vs2010 vsix check for updates locally?

I'm writing a project structure and code analysis extension for visual studio at work. The project can not be published to the Visual Studio Extensions Gallery. Is there any way to manage updates and deployment built in to visual studio so that a team can use the extension and get the update prompts? ...

SSRS if string says this then change it to this

I have a field in SSRS and it returns from SQL saying "Incomplete" In SSRS I want to say anytime this field says "Incomplete" to change the string to "Pending" This has to be done in SSRS. Thanks! ...

Mysql, NHibernate and visual studio 2008 configuration

Hi, I am a beginer with visual studio 2008 (C#), mysql and NHibernate. I have problems with mysql connector as I don't know how to add reference to it. In my project I have: /lib/mysql-connector-net-6.1.4-src/ (downloaded from http://dev.mysql.com/downloads/mirror.php?id=387799#mirrors) Now I right click on my project -> addReferenc...

A warning with building 64bit dll

dll export header extern "C" void _declspec(dllexport) __stdcall foo(); .def file EXPORTS foo @1 When I build the dll by 64bit build config, I meet this warning. warning LNK4197: export 'foo' specified multiple times; using first specification But If I build the dll by 32bit build config, the warning never occurs. Wha...

How can I group RadioButtons without a GroupBox in VB.NET?

I want to group RadioButtons, but I don't want to use the visible control GroupBox. Is there something like the Java ButtonGroup in VB.NET? ...

Visual Studio 2008: Adding components to inherited panel

In this scenario I have a base component with a close button and a flow panel; (FlowLayoutPanel) the idea being that components extending this add their controls to the flow panel and will have the close button functionality done for them. The problem is that I can't seem to persuade VS to add the components in the subclassed component ...

debugging a process spawned with CreateProcess in Visual Studio

I've created a Windows/C++/WTL application that spawns a child process. The two processes communicate via anonymous pipes. I'd like to be able to debug the child process. Since both parent and child projects are in the same solution in Visual Studio 2008, is there any way to tell VS2008 that I'd like the debugger to debug both proce...

Debug a python script used with nmake

I have a Visual Studio project which uses nmake to call a Python file for clean, build, or rebuild. For ex. in VS project properties->Configuration Properties->NMake, for the Build Command Line I would have ....\blah\tools\myBuildFile.py build -arg1 -arg2 There are several python files used with lots of variables and routines so I wou...

Is there a native/reliable alternative for boost::shared_ptr in VC++ ?

My company doesn't allow the use of boost (for many stupid reasons, but that's off-topic). I feel very frustrated having to use raw pointers when I'm used to shared_ptr, weak_ptr and scoped_ptr for personal development. We're working exclusively with Microsoft compilers (Visual Studio 2010) and I wonder if there was an alternative to t...

Why does the '{' throw a NullReferenceException in a static method?

This one is sort of esoteric. I ran into a NullReferenceException while trying to open a form (in the winforms designer) in a winforms project in visual studio 2008. The stack trace points to the fourth line of the following code: public static class Logger { public static void LogMethodEnter() { var frame = new StackFr...

How would I create a theme setting event receiver for Sharepoint 2010?

Currently we have a custom theme applied to Sharepoint 2010 main page. When a new site is created, it has the default theme. We would like all newly created sites on this Web Application to use a specific theme that we specify. I would like to create an event receive for Sharepoint 2010 that sets a specific theme when a new site is prov...

How do I force Visual Studio to stop building when it hits the first error?

UPDATE Exact duplicate of http://stackoverflow.com/questions/3041982/vs2010-how-to-automatically-stop-compile-on-first-compile-error Basically when it's compiling I want it to immediately stop when it encounters the first error. What it currently odes is tries to build all the rest of the projects which in turn fail. Anyone know how to...

Using Visual Studio DTE to analyze source code

Hello: There is an interesting coding standard in my shop that says that we don't shortcut type names with a using statement, they have to be fully qualified (so any time you reference a type, you use MyRootNamespace.ANamespace.MaybeAnotherNamespace.MyClassName, instead of just "MyClassName"). Love it or hate it, that's just how we rol...