visual-studio-2008

Database change managing on software patch/update/upgrade

It's been few weeks I'm trying to find a more detailed explanation with examples how to manage my database change on software patch. Situation: I deploy wpf application release to user. App uses MSSQL data file for storing app's data (Deploying with Client Profile and SqlServer Compact 3.5 prerequisites) In further development databas...

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. ...

getopt() in VC++

I'm quite fond of using GNU getopt, when programming under Linux. I understand, that getopt(), is not available under MS VC++. Note: Win32 environment using Visual Studio No Boost No MFC Not concerned with portability Question: How can I then port getopt() accordingly? What guidelines should I be aware of while porting? Known po...

ADO.NET Entity Framework: Update Wizard will not add tables

I added a new ADO.Net Entity Data Model into my project and used the Update Wizard to add tables into the model. Five of the selected tables were added to the design surface. Two other tables will not add. I select them in the wizard and click Finish, yet they never show up on the design surface. Is this a bug, or are there some situ...

Visual Studio 2008 - Why do my windows keep rearranging themselves?

Every so often (at least a couple of times a day), my VS2008 windows are rearranging themselves. Team/Solution/Server Explorer - They jump from the right sidebar down to the bottom, or suddenly become free-floating. Same with Errors/Pending Changes/etc. free-floating or suddenly gone, as if they've been closed. It is very strange beh...

Programtically Reloading a C# Project

HI Does anyone know if its is possible to programatically reload a C# project , in one of my previous questions i needed to add all the CS files in a specific folder , now while this works i find that i have to reload the project every time to so that it can register the new files were added. So now i need a way to automtically reload ...

How to call a VSTO AddIn method from a separate C# project?

I have a C# Excel Add-in project "MyExcelAddIn" that has a public method Foo() to do something complex. For testing purposes, the add-in also defines a toolbar button which is wired to Foo() so I can test this and verify that clicking the button calls Foo() and does what I want it to do. This is fine. Now I want to call this method from...

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. ...

What are good design practices when working with Entity Framework

This will apply mostly for an asp.net application where the data is not accessed via soa. Meaning that you get access to the objects loaded from the framework, not Transfer Objects, although some recommendation still apply. This is a community post, so please add to it as you see fit. Applies to: Entity Framework 1.0 shipped with Visu...

Visually edit C# imagemap control?

Hello gang, I just discovered the imagemap control in Visual Studio 2008. I'm familiar with the imagemap concept from HTML, I'm just used to having editors that allow you to select areas visually, like drawing a hotspot on the image itself, and the software generates the HTML itself. But I can't do that in Visual Studio, and I have about...

vector<string> or vector<char *>?

Question: What is the difference between: vector<string> and vector<char *>? How would I pass a value of data type: string to a function, that specifically accepts: const char *? For instance: vector<string> args(argv, argv + argc); vector<string>::iterator i; void foo (const char *); //*i I understand using vector<cha...

How can i debug this line of code in Visual Studio?

Hi folks, i have the following line of code in VS2008. VirtualPathData virtualPathData = RouteTable.Routes.GetVirtualPath(_viewContext.RequestContext, "Home", pageLinkValueDictionary); I wish to debug this GetVirtualpath(..) method .. to see what it's trying to do. I'm assuming i need to grab the symbol...

Microsoft Visual Studio (2008) - Filters in the Solution Explorer

In the Solution Explorer when working with C++ projects there is the standard filters of Header Files, Resource Files, and Source Files. What I'm wanting to accomplish is essentially Filters by folder. Lets say the structure of the files was like this: ../Folder1/Source1.cpp ../Folder1/Header1.h ../Folder1/Source2.cpp ../Folder1/Hea...

Modifying app.config file with Visual Studio Extension

Hello, I am trying to create a Visual Studio Extension (either Add-In or VSPackage) that will do the following: 1) Find all selected projects in the current solution. 2) Obtain access to each project's app.config or web.config file and modify it. I have been able to figure out step 1 for both an Add-In and a VSPackage. I haven't manage...

How to use an enumeration in an XNA ContentReader?

For instance, I was thinking of replacing this: var.StringAttribute = input.ReadString(); With something like this: var.EnumAttribute = input.ReadExternalReference<EnumName>(); However this doesn't work quite right. And ideas on how to get input to read a custom enumeration? ...

VS2008 Usage of Strong Name Keys in multiple projects

First of all i'm new to signing assemblies with SNKs, so this might be a stupid question. I've got a solution with several projects, some of which ought to be signed. I created a SNK using VisualStudio's Wizard and stored it in the solution folder, which is shared between all projects. Now when trying to sign a project in it's Properti...

Why don't code snippets work for me in Visual Studio?

I'm trying to use the simple pre-installed code snippets in VS2008. I can insert them by right-clicking and using Insert Snippet..., but I can't get them to work while typing. If I start to type "for", I get the Intellisense list, and I see an entry for the code snippet, but hitting Tab or Enter just inserts the word for, not the snipp...

Customizing Visual Studio Start Page

Is there a way to customize the VS 2008 Start Page? I want to display a WebSite (a Sharepoint Site) instead of the News Feeds, but I can't find an solution for this. ...

Can't write string in exception constructor

Visual Studio seems to complain when I pass a string into an exception parameter. if (str1 == null || str2 == null) { throw new ArgumentNullException("lmkl"); } Visual Studio says that it cannot resolve symbol "lmkl". If I have a string variable (eg above throw new... string s = "test";) and include this as the parameter for the ...