visual-studio

How to avoid duplicate settings when using 2 projects and 2 testing projects in Visual Studio?

Following my previous question, now I have 2 projects: one Console Project and a Library Project. They also have their respective unit test projects. When I run a test for the console project that uses a method from the library project and the library project needs an app.config setting, that setting must be in the console test project's...

How do I prevent Visual Studio from renaming my controls?

If I paste something like <asp:DropDownList ID="DropDownListExpirationDate" runat="server" /> onto an ASPX file that already has a DropDownListExpirationDate control, it will rename the newly-pasted control as DropDownList1. <asp:DropDownList ID="DropDownList1" runat="server" /> I'd rather it didn't. I'd rather is just paste exact...

Is there a way to programmatically extract an Interface?

Say I have a .NET class like so: public class Person { public string Name { get; set; } public int Id { get; set; } } Visual Studio has a nifty refactoring tool called Extract Interface that will extract an IPerson interface, and have Person implement it. Is there a way to do that programmatically from outside of Visual Studio...

Visual Studio: How to figure out where this type is defined?

i have an interface - one of whose members returns a variable of type**Object**. In my attempts to try to use this returned variable, i discovered that it isn't just an "Object", but is actually a "mshtml.HTMLDocumentClass", as you can see in the following screenshot: In my case, this is perfect, since it appears (through code-insigh...

Exclude nested files from source control

We're having a problem combining 'nested files' and excluding files from source control. We're using code generation to create two partial classes for each entity - MyBusinessObject.vb and MyBusinessObject.Generated.vb We'd like the "Generated" file to appear as a nested file under the manual file. So we're modifying the project file t...

Source control with Visual Studio integration for a small project

Hi, I'm begining the development of a personal Web Application project. I'd like to have a source control system for that project. At work, we user Team Foundation Server and I'm quite happy with that, mostly for the Visual Studio integration. I'd like to know if there was free source control solutions that had the same kind of integr...

Loads of extra space at bottom of classes in Visual Studio 2008 C# Express

The scrollbar scrolls way past the end of my class. Is there any way to adjust this? Is it just the VS convention? I can't delete the space, so it isn't carriage returns. The reason I don't like this is that I keep accidentally scrolling past the end of my class! I'd especially like to hear from people who actually have Visual Studio 2...

Deploying ASP.NET 2.0 to IIs7

How to deploy my ASP.NET website to IIS7? I'm using Visual Studio 2005. And I don't know where to start. ...

Is there any way to avoid installing Microsoft Visual Studio 2008 Team System Database Edition to be able to build DBPro projects on a centralized build server?

I have a DBPro (DataDude) project inside my solution to manage and version the database schema of my application. I use TeamCity 4.0 for continuous integration. To be able to build a .dbproj, MSBuild tasks and their respective assemblies have to be installed, other .dbschema and .xsd dependencies put in place. The easiest solution is to...

Best Practices: IDE Code Color Scheme and Font

I was reading http://weblogs.asp.net/scottgu/archive/2009/01/27/asp-net-mvc-1-0-release-candidate-now-available.aspx and noticed a Fantastic color scheme used to illustrate their code in Visual Studio. The white background is starting to hurt my eyes after long periods, but the black I find is also to abrasive. Does anyone have a expor...

Why does C# designer-generated code (like Form1.designer.cs) play havoc with Subversion?

My workshop has recently switched to Subversion from SourceSafe, freeing us from automatic locks. This led to concurrent editing of the Forms, which is wonderful. But when multiple developers commit their changes, the code files created by the designer (all the files named TheFormName.designer.cs) cause conflicts which are very difficult...

Wireless synchronisation program

hi I have been looking for help with not much luck till i arrived here. I want to develop an SQL server database and an application which will act as a server to allow a pda to send data to and wirelessly synchronise and information to sendAs it uses mobile application I would like to utilise it over a WIFI network.Any information woul...

Using Visual Studio 2005 with ClearCase Eclipsed Files

I'm trying to use Visual Studio 2005 with ClearCase eclipsed files (view private which "eclipse" a versioned file), but any time I save the file in VS, it becomes uneclipsed, and returns to the versioned file. In Linux, I use VIM instead of Visual Studio, and get around this problem by setting backupcopy=yes, thereby forcing it to save f...

Is it possible to insert a multi-line code snippet relative to the cursor position in Visual Studio?

When using code snippets in Visual Studio that contain multiple lines the following lines will preserve the whitespace that was set in the .snippet file instead of positioning the code relative to the original cursor placement. When using the foreach snippet you'll get code like this: foreach (var item in collection) { } Instead...

Why can't I get a decent function browser in Visual Studio 2008?

There is no way to list the functions in a C++ solution for me... I have a class browser but that isn't helpful since this project has no classes. I need a simple list of all the functions in a c++ file and then just double click one to jump to its source (as a side pane, NOT as a dropdown)... I have to be missing something here as I hav...

Tools for inspecting .lib files?

I'm evaluating some underdocumented software. When I build a sample project, I'm getting a linker error that looks like: error LNK2019: unresolved external symbol There aren't a whole lot of lib files with this app, so I can solve this problem with trial and error, but I know there's a more elegant way is to solve this problem. In the ...

How do I create a GUI for a windows application using C++?

I am deciding on how to develop a GUI for a small c++/win32 api project (working Visual Studio C++ 2008). The project will only need a few components to start off the main process so it will be very light weight (just 1 button and a text box pretty much...). My question is this: I don't have experience developing GUIs on windows but I c...

How does one convert from CString to unsigned char* with Unicode?

Hello everyone, I'm trying to do something simple here. When I execute the following code in Visual Studio 2008 using the unicode character set, xmlString is correct. Unfortunately I need to convert the CString to a unsigned char*. Using the code below, ucStr becomes "<" (i.e. the first character of xmlString). How should I convert th...

How do I enter a DateTime value in the VS QuickWatch window?

I am trying to change some DateTime data in a QuickWatch window. I have tried 1/29/2009, etc. but none of them seem to work. It just keeps going back to #12:00:00 AM#. ...

How can you define and maintain XML code comments outside of the main solution?

I am building a public API and recognize the value of complete API documentation on public methods. I know it's easy to keep them in directly in code files as XML annotations on classes, methods, properties, etc. But I hate cluttering clean source code with public comments. What's the best way to create, and maintain XML code documenta...