visual-studio

How to make a visual studio add-in that cannot be unloaded?

I'm writing a Visual Studio add-in using C/C++. I am not familiar with the COM architecture. In fact I'm learning Windows programming. I can see an OnDisconnect() call back into my add-in. I tried returning S_FALSE, but that does not seem to stop the add-in from being unloaded. So my questions is, is it possible to make an add-in tha...

"Are you missing an assembly reference?" compile error - Visual Studio

I am currently working on a server control for other applications in our company to interface with a WCF service. Every time I make a change code change and recompile the control, I increment the the AssemblyVerison and AssemblyFileVersion class in the AsseemblyInfo.cs by one. For example, my latest build went from 1.0.07.0 to 1.0.08....

How to open a file inside a Test Project code folder? (Visual Studio 2008 and .NET C#)

When I run a Test Project on Visual Studio I use the code below to access a file inside the test project code folder var Location = System.IO.Path.GetDirectoryName( System.Reflection.Assembly.GetExecutingAssembly().GetModules()[0].FullyQualifiedName ); var FileLocation = Path.Combine( Location ,@"..\..\..\TestProject1\App_Data\da...

Is there an HLSL plugin available for Visual Studio 2005?

Something that at least would add code syntax coloring? HLSL 3 preferably. ...

Visual Studio 2008 viewing dialog after breakpoint hit

I am building a C++ MFC application that creates modal dialog boxes, one at a time, while hiding the parent dialog. I wish to view the newly created modal dialogs when a breakpoint is hit when debugging in Visual Studio. However, anytime a breakpoint is hit, the contents of the dialog box are no longer rendered. The box simply goes white...

How do I eliminate "The specified service already exists" when I install new versions of my software?

I have a VS2008 application that includes a service project (I'll call it ServiceProject). I have the installation project (InstallationProject) set to RemovePreviousVersions. Additionally, I have Custom Actions set for InstallationProject, to Install, Commit, Rollback, and Uninstall the Primary output from ServiceProject. Sometimes...

Mysterious cosmetic Visual Studio Editor issue

In the Visual Studio code editor, I sometimes have an extraneous mark on the white background. It's a short diagonal slash, one pixel wide. If I scroll up and down, the mark remains in the same place, more or less as if it was a scratch on the screen. It's sometimes there, and sometimes not. I don't know how to make it appear or disapp...

How to configure Visual Studio not to give UAC prompt on each run?

I have switched to Vista recently and I wanted to keep UAC turned on, as I agree it increases computer security a lot. Some developer tools I use regularly require running elevated: PIX for Windows Visual Studio 2005 (elevated privileges seem to be needed for debugging and for IncrediBuild to work) mapped and substed drives: The elevat...

How to stop Visual Studio from automatically creating solution files

Our projects are typically stored as single projects, and are not part of a larger solution. When I open a project, Visual studio creates a solution (sln) and soution options (suo) file in my folder. I want to stop this automatic sln and suo creation, Does anybody know how to go about doing this? EDIT: We have several dozen individual ...

How to deploy Visual Studio add-ins via ClickOnce?

Is is possible to deploy VS add-ins using ClickOnce? How can I do it? ...

What Subversion Plugins for Visual Studio are there?

What Subversion Plugins exist for Visual Studio? ...

Visual Studio vs. SQL Server Management Studio - Your Pick

Just to preface: I work in a small company that does ASP.NET development and uses SQL Server 2005 for all of our database needs. I was curious as to what were the pros and cons of using Visual Studio or SQL Server Management Studio for our development on the database side (i.e. table creation, stored procedure writing, etc.). Right n...

Protocol buffers in C# projects using protobuf-net - best practices for code generation

I'm trying to use protobuf in a C# project, using protobuf-net, and am wondering what is the best way to organise this into a Visual Studio project structure. When manually using the protogen tool to generate code into C#, life seems easy but it doesn't feel right. I'd like the .proto file to be considered to be the primary source-code...

Number of projects in a visual studio solution

How many projects do you have in your Visual Studio solution? We have 50-60 projects. From your experience, is it more efficient (VS performance-wise) to work with a smaller number of projects? (I'm specifically interested in solution load times & build times - does fewer solutions mean better performance?) ...

Can I have a hit-point in VisualStudio that skips lines?

I often run into the situation where I want to disable some code while debugging without actually changing the code. What I end up doing is having a break-point (usually conditional) and then when the break-point fires I perform a Set Next Statement. This can be very labor intensive when the code is reached many times so I created a mac...

VIsual Studio - How to change the return value of a method in the debugger ?

When I'm debugging, I often have to deal with methods that does not use an intermediate variable to store the return value : private int myMethod_1() { return 12; } private int myMethod_2() { return someCall( someValue ); } Well, in order to recreate a bug, I often have to change values on the fly. Here,...

Debugging managed code: Viewing return value

On Win32, with unmanaged code, the return value is usually stored in the EAX register. This is useful when the program doesn't save the return value in a variable. This can easily be seen in the Visual Studio debugger. Is there an equivalent for managed code? ...

Problem with code syntax : Stored Procedure for Generic Insert

I have problem compilin this code..can anyone tell whats wrong with the syntax CREATE PROCEDURE spGenericInsert ( @insValueStr nvarchar(200) @tblName nvarchar(10) ) AS BEGIN DECLARE @insQueryStr nvarchar(400) DECLARE @insPrimaryKey nvarchar(10) DECLARE @rowCountVal integer DECLARE @prefix nvarchar(...

How to copy line in XAML editor?

In Visual Studio.NET when coding I constantly use (no selection) CTRL-C, CTRL-V to make a quick copy of a line. Unfortunately this works differently in the XAML editor (it pastes the new line in the middle of the current line). Does anyone know the hotkey to copy a line in XAML? ...

Syntax Prob: Using Variables in Stored Procedures

Can anyone tell how correct the following code below. Iam tryin to create a stored procedure that returns the rowcount of a table whose name is passed to it. CREATE PROCEDURE spROWCOUNTER ( @tablename nvarchar(20) @rowCountVal int OUTPUT ) AS DECLARE @strQuery nvarchar(300) SET @strQuery = 'SELECT @rowCountVal=COUNT(*) FROM '...