visual-studio

Visual Studio&Source Control: How to have shared code?

i want to have some shared code (code library, controls, utilities, helper classes, etc) in Visual Studio. i do not mean shared assemblies, i mean shared code (i.e. i want to ship one assembly with my application, the executable assembly). The technique in other development environments way is to have the common source code in a path on...

Visual basic auto imports namespaces

In C# some of default name space such as System.Collections are listed without typing in using blah. In visual basic, they are not imports for you. Is there a way to force vb to auto imports some of default name space or VB work differently than C#? ...

Add references to project when control dropped from Visual Studio 2008 toolbox

When I drop a third-party control onto a visual design surface in Visual Studio, any library references required by the control are automatically added to my project. I have an inherited version of a third-party control that I've added to the toolbox. However, when I drag it onto a Form, only some of the references to the underlying thir...

Is there a setting to disable 'collapsing to definition' of comments in VS2005?

Is there an outlining setting to disable 'collapsing to definition' of comments in Visual Studio 2005? ...

.NET Minimize to Tray AND Minimize required resources

I have a WinForms application (I'm using VB) that can be minimized to the system tray. I used the "hackish" methods described in multiple posts utilizing a NotifyIcon and playing with the Form_Resize event. This all works fine aesthetically, but the resources and memory used are unaffected. I want to be able to minimize resources when ...

Adding an Excel file to be published with Window Apllication

Hi Guys, I have been trying for an hour or so and cannot get this right. I have a Visual Studio project which reads an Excel file, which I have added to the VS solution. When I run the project in VS, the file can be opened successfully. However, when I publish the project, the file does not get included, and therefore cannot be opened by...

Visual Studio 2005 C++ debugger keeps stepping into disassembly view

The Visual Studio 2005 C++ debugger keeps stepping into disassembly view when I "Step into" or "Step Over". This is not something I want, so I have to keep right-clicking and "Go To Source Code". It doesn't always do this - I think it gets confused when stepping between different projects in the same solution (static libs, and one co...

VS 2008 keeps removing and re-adding <SubType>ASPXCodeBehind</SubType>

I've got a VS 2008 C# Web project and whenever I make some changes to the files in it (not even to the project file itself) VS will remove some lines like this from the csproj file: ASPXCodeBehind So something like this: <Compile Include="Default.aspx.cs"> <DependentUpon>Default.aspx</DependentUpon> <SubType>ASPXCodeBehind</SubTyp...

Running vc2008 debug builds on non-dev machines

I'm building my app in vc2008 and testing it on a network of machines. Is there any way, other than installing Visual Studio 2008, to run a debug build of a C++ program on another machine? (i.e. that doesn't have vc2008 installed) Installing the redist package only installs the release mode support DLL's for vc2008 programs. Currently ...

Finding missing XML comments content with Visual Studio.

Throughout or C# sourcecode we have a lot of comments that miss the actual content such like this: /// <summary> /// </summary> or this: /// <summary> /// /// </summary> or this: /// <param Name="flag"></param> Unfortunately Visual Studio does not generate warnings for this type of missing comments. But for us it would be nice i...

Is it worth switching from Visual Studio 2005 to Visual Studio 2008 ?

As a team we are using Visual Studio 2005 with framework 3.0. I am thinking if it will be nice for us to switch to Visual Studio 2008 with framework 3.5 ? Is it worth it ? Thanks. ...

How to add and compile for custom 'Platform' switch for visual studio projects?

We are looking to provide two custom Platform switches (the platform dropdown in the configuration manager) for our projects in Visual Studio. For example one for 'Desktop' and one for 'Web'. The target build tasks then compile the code in a custom way based on the platform switch. We don't want to add to the Debug Release switch becau...

Compiling a .vbproj or .csproj project file without Visual Studio

Is there a way to compile a .vbproj or .csproj project file directly, just like Visual Studio does? When you compile in Visual Studio, the "output" window shows the actual call to the compiler, which normally looks like: vbc.exe [bunch of options] [looooong list of .vb files] I would like to programatically call "something" that would...

How does default/relative path resolution work in .NET?

So... I used to think that when you accessed a file but specified the name without a path (CAISLog.csv in my case) that .NET would expect the file to reside at the same path as the running .exe. This works when I'm stepping through a solution (C# .NET2.* VS2K5) but when I run the app in normal mode (Started by a Websphere MQ Trigger...

Creating a Visual Studio Web test to upload a file with a random file name

I have (after quite a bit of work) a web test that will upload a file to my SharePoint document library using a file that is included in the test and DeploymentItem that identifies that file so it can be used in the file upload post parameter. That works great, now ignoring the SharePoint factor for a moment, image that I want to run th...

Design time support for Templated User Controls in VS2008

I've been reading the following article to create a user control with a template: http://msdn.microsoft.com/en-us/library/36574bf6(VS.80).aspx The problem is, during design time, in design mode, I get the error "Usercontrol does not have public property named MessageTemplate". I've tried the suggestions to the comments on the bottom of...

Execute only one unit test while debugging in Visual Studio 2008

Is there a way to select which TestMethods you want to execute in Visual Studio 2008 Unit Test project while debugging? I want to debug one particular test without having my other TestMethods execute during each debug session. ...

Visual Studio Solutions Folder as real Folders

I have a Visual Studio Solution. Currently, it is an empty solution (=no projects) and I have added a few solution folders. Solution Folders only seem to be "virtual folders", because they are not really created in the Filesystem and files inside solution folders are just sitting in the same folder as the .sln file. Is there a setting ...

Can't drag files to Solution Explorer

I am having an unusual problem. I have always been able to drag files and folder from my desktop or explorer to the solution explorer in visual studio and add the files to my project. No when I attempt to drag files I simply get the "stop" symbol. I am using Visual Studio 2008 running on Vista Home Premium 64 bit. Any ideas? ...

Visual Studio Editor does not underline errors anymore

My Visual Studio (2008) Editor has stopped to underline Errors (this nifty wavy red lines). I can't really tell when, but it can be related to the installation of .Net Framework 3.5 SP 1 or the MVC Beta (which I guess is unlikely). Furthermore have I installed and uninstalled both CodeRush and Resharper for evaluation purposes (decided n...