visual-studio

Why do profilers need administrative privs (on Windows)

I've been evaluating profilers and memory checking tools for native C++ programs on Windows and all of them want to be installed and run with administrator privileges. I rarely log in as admin on my machine. If I need to install something or do something that requires administrative privileges, I use runas and it works pretty well. Is i...

Pre-build MSBuild task to update AssemblyInfo not in sync with built exe

I am using a pre-build task in Visual Studio 2008 that invokes msbuild: C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe $(MSBuildProjectDirectory)\version.targets /p:Configuration=$(ConfigurationName) Inside version.targets, I am updating the AssemblyInfo.cs file to replace version information: <FileUpdate Encoding="ASCII...

Visual Studio: Garbled debug watch of std::string's ?

When I'm debugging C++ mixed (managed/unmanaged) projects in Visual Studio 2005, I often get weird data from the debug watches, like below : (btw, the variable i_processName is a const std::string & ) Note that the variable actually holds valid data - if i print it to stdout, the printed string is just fine, thanks for asking. The sim...

How do you keep Visual Studio tabs sorted

Is there a built in way, or a free add-in, that can keep the tab bar of open files sorted in alphabetical order? Once sorted, how can I get CTRL-PageUP/DOWN (or other shortcut) to jump left/right instead of most/least recently viewed file. Thanks, Kurt ...

Visual Studio Vs Visual Web Developer

I am trying to write a web application using ASP.NET MVC. I prefer C# as the programming language. Which IDE is better to use for this purpose? Visual Studio or Visual Web Developer? What are the features of the IDEs? What are the benefits of using one over the other? Thanks in advance. ...

Getting intellisense to work for JQuery and javascript in .js files using Visual Studio 2008

I followed ScottGu's advice on enabling javascript intellisense using a -vsdoc.js file. http://weblogs.asp.net/scottgu/archive/2008/11/21/jquery-intellisense-in-vs-2008.aspx I now get intellisense when I write javascript inside my HTML/ASPX files. I write most of my javascript in separate javascript files that I attach to my code with...

Visual Studio Setup Project-- adding prebuild step

Hi, I want to make my build process for producing a setup project to be a single click. However, I also want to add {smartassembly} to the build step to obfuscate the build, but only on our build machine. How can I add a pre-build step to a visual studio 2008 vdproj? Basically, I want to move the command line argument to obfuscate th...

cmake RUNTIME_OUTPUT_DIRECTORY on Windows

I'm using cmake for managing my cross-platform builds, and I have everything worked out except for this problem. I set RUNTIME_OUTPUT_DIRECTORY to a bin/ directory where I have data files stored. On Linux, this works fine. On Windows, the executables get placed in the Debug/Release subdirectory depending on the build type. Is there any w...

Per language settings in Visual Studio 2008

I would like to have different window layout and addons configuration depending on project's language (or project itself). Do I have to use "Tools->Import and Export Settings" and configure addons each time I switch projects. ...

#include all .cpp files into a single compilation unit?

I recently had cause to work with some Visual Studio C++ projects with the usual Debug and Release configurations, but also 'Release All' and 'Debug All', which I had never seen before. It turns out the author of the projects has a single ALL.cpp which #includes all other .cpp files. The *All configurations just build this one ALL.cpp f...

TFS Team Explorer Stand Alone With VS 2008 Installed

Does anyone know how you can install/run the TFS Team Explorer in stand alone mode when Visual Studio 2008 is installed on the same machine? Additional Information: I should have been a little more clear in my question. I'm trying to access the Work Items. ...

Visual Studio Project Template for JavaScript/VBScript?

Has anyone had luck finding a Visual Studio Project Template for JavaScript and/or VBScript? I would like to use VS as my script IDE but get frustrating with the lack of integration. I'm hoping someone else was just as frustrated as me and already came up with a solution. ...

WPF and ToolboxItem(false)

I'm setting ToolboxItem(false) attribute on couple of classes in my control library to prevent the from being added to Toolbox. This attribute works perfectly well with ASP.NET designer but with WPF designer it seems to have no effect. Is there some other way to achieve this with WPF or is just unsupported? ...

Can I change the warning settings for Web Sites in visual studio?

I can turn on warnings as errors and exclude certain warnings for all the projects in my solution except for a website (not web application). Is there anyway to turn on 'warnings as errors' as errors for websites and is there anyway to turn off certain errors for the whole website or sub folders? Update I'm using ASP.Net with C# ...

Solution items cross several web projects in Visual Studio

I have two web projects, both these projects share client-side JavaScript currently residing as almost identical copies in both projects. I say almost because I'm clearly having versioning problems with these files. I've managed to put the files in a solution folder and created links to them from my projects and this works when I publis...

Visual Studio - Automatically refresh class view when changing class.

Hi, I come from a Java background and have spent many years using Eclipse. One feature that I miss when using Visual Studio (2008) is that the class view does not automatically refresh when I change class. In Eclipse it has a (class) 'Outline' window which represents the current class and shows methods/properties etc, this always update...

How to quickly organize functions in source code (c#) to order by alphabetical order?

I'm doing some class clean to organize the functions in cs file in alphabetical order. I'm using Visual Studio 2008. When writing them, I just put them arbitrarily, but it now looks quite messy. Is there some easy way to organize them automatically? Better to have a tool because there're quite a lot files to clean up. ...

How to convert Web application project to Class library project

I need to convert a project started as a Web Application to a Class Libray, is this possible? Thanks ...

Regenerate missing AssemblyInfo.cs in VS 2005

I'm trying to build a small VS 2005 solution I've just checked out of source control, and I'm getting this easy to understand error: ...\AssemblyInfo.cs' could not be opened ('The system cannot find the file specified. ') (The file is fairly obviously missing) Because this file's automatically generated, I've never paid it mu...

How do I apply a set of properties to a subset of files in a Visual Studio Project?

Where I work, we have a large codebase of C code that we build using Visual Studio 2005. It's separated into a variety of projects, including several static libraries. There are two solutions we primarily use, Full Debug (which turns off optimizations entirely), and Debug (we selectively optimize around 20% of files, while leaving the re...