visual-studio-2008

How to prevent Visual Studio from compiling solution after I exit debug mode?

Visual Studio builds the entire solution when I exit debug mode. This is very annoying as the solution contains 42 projects (ASP.NET MVC, IIS hosted WCF, Silverlight apps and others) and the build process locks Visual Studio for aprox. 30 seconds. What causes Visual Studio to do a full rebuild of the solution? Is there a setting that I...

Why doesn't VS 2008 IDE remember my preferences?

This is a very petty question that I'm only asking while compiling... ;) For some reason my VS 2008 IDE doesn't remember my window preferences when I close & reopen - it resets the window widths, locations, appearances etc. Where's the secret switch so that my IDE stays looking the way I want it? ...

Install code analysis in Vistual Studio 2008 Team System 2008 SP1 without installation media?

Can I install code analysis in VSTS2008 SP1 without the original installation media? Is there a seperate package I can download to activate it? I've installed FxCop 1.36 but that didn't automatically activate the tabs on project properties. I checked if code analysis was installed by going to Add/Remove Programes, selecting Team Syste...

SSRS '08 System.Security.Permissions.SecurityPermission ERROR

Hi All I'm getting a rather frustrating error from Business Intelligence Development Studio (Visual Studio 2008). I have a report that contains 4 sub-reports, these sub-reports may or may not contain data, and as such their HIDDEN property is controlled by an expression: =IIF(ReportItems![SOME TEXT BOX].Value = 0, TRUE, FALSE) The co...

Why doesn't type inference (var) work with the ASP.NET GridView.Rows property?

In this code fragment foreach (var row in grid.Rows) { } the type of row is inferred as Object instead of GridViewRow. I have to explicitly declare the type to work with a GridViewRow: foreach (GridViewRow row in grid.Rows) { } GridView.Rows returns a GridViewRowCollection and GetEnumerator on the collection "Returns an enumerator ...

Label control behaves differently at design time vs. run time.

I am creating a custom Label control (by simply Inheriting the standard Label control and re-painting the background and text) because I need a very specific background and border. In the constructor of the control, I set the AutoSize property to false so I can have a standard default size for the new label. Public Sub New() /*Se...

How to stop Visual Studio complaining about Deployment Errors

I have a Visual Studio 2008 project which contains 6 .NET assemblies projects, 2 Console Application project and an MSTest project. When I attempt to run with F5/ Tools > Start Debugging Visual Studio informs me "There were deployment errors". As you may imagine this is somewhat confusing as there's nothing to deploy, there are no .NET C...

Left Align a label or any control in code

I've created another header row for a gridview programmatically. In this row I have a few controls including a label that I want to align all the way to the left of the cell. The one cell has a columnspan of 7 so it runs across the entire gridview. how do i align that label programmatically?? Dim cell As New TableCell Dim lblfilter ...

Displaying a WPF window when the project is a dll, not an exe

How do I display a wpf window in my application when the application resides in a dll, not an exe? This project will be compiled to a dll and loaded into another application as an add-in. In WinForms, I would just have the following code: dim frmUserData as frmDataEntry = new frmDataEntry frmUserData.ShowDialog() How do I accomplish ...

VS 2008 Intellisense for C# static dictionaries

I have the following in a C# class: public static readonly SortedDictionary<string, string> Fields = new SortedDictionary<string, string> { ... } I was hoping there was a way to get Intellisense to provide prompts for all the keys defined in Fields. It supplies lists of the methods and properties in the class, including t...

Reusing code in .NET website (app_code folder)

I need to use some classes inside the app_code folder of a website project in visual studio 2008. I need to access this code from a class library project in the same solution. I cannot add a reference to the website, and I'm not sure of the easiest way to use the classes that already exist here. Do I need to move it to a class library...

"the outputpath property is not set for this project" error

I have a multi project solution in VS08. I just added a new Configuration called Release-VersionIncrement to the solution, specifying "use release" configuration as baseline. All project files were updated with that configuration. However, when I am trying to compile a specific project using this configuration, I get the following error:...

How to make [DebuggerDisplay] respect inherited classes or at least work with collections?

I've got a class which inherits from a List<MagicBean>. It works well and as expected in all respects except one: when I add the [DebuggerDisplay] attribute. Even though looking at List has its as [DebuggerDisplay("Count = {Count}")], if I so much as copy and paste that onto mine, I lose the ability to look directly at all of the MagicBe...

SQL Express 2005 problem with VS 2008

I have SQL Server 2005 installed and VS 2008 on Windows XP Pro SP2. I am building a VB.Net windows application and trying to add a .mdf database to it as a local db inside the project. But i always receive this message: "Local database file Failed to generate a user instance of SQL Server due to a failure in starting the process for ...

Configuration error after deploying asp.net files into iis server

I am getting the following error which deploying my code in the production server. Code is working fine in development. Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file...

ADO.Net DataReader error: Already an Open DataReader

Hello everyone, I am using C# + .Net 3.5 + VSTS 2008 + ADO.Net + SQL Server 2008. And I am sharing one single SQL Connection object (TestDBConnection variable in my below sample) within my application. The exception I met with is, "There is already an open DataReader associated with this Command which must be closed first.." Any ideas ...

WindowsSdkDir is not set correctly in Visual Studio 2008?

I'm attempting to build some C++ code that requires the Windows 7.0 SDK header files and libraries. My VC++ Directories is set to: $(VCInstallDir)include $(VCInstallDir)atlmfc\include $(WindowsSdkDir)\include $(WindowsSdkDir)\common\include $(FrameworkSDKDir)include My $(WindowsSdkDir) variable should be set to C:\Program Files\Micros...

Closing VS2008 with no files, no projects, no solution still wants to save a solution

For some reason when I open an instance of VS2008 to view a single file say a web.config file even when I make no changes and close the file I can't close VS2008 unless I save a dummy solution. I have no files or projects in it so why can't I just exit the program? I have to either kill the devenv process or simply save the dummy Solutio...

Visual Studio 2008 SP1 Closes when I try to add or open a project which contains .edmx files

I have a problem adding ADO.Net Entity Data Model to my existing project, or even while opening a project which contains *.edmx files.(In my case ) Visual Studio closes automatically. I see the following error in the event log every time this happens Googled the specific error but drew a blank. .NET Runtime version 2.0.50727.4016 - Fata...

Thread Safe Control - Crashing VS 2008

Hello, I am working on creating a thread safe control for my windows forms application. I understand I can set the text on a control thread safe by using the following code: private delegate void SetTextD(Control control, string value); private static void SetText(Control control, string value) { if(control.InvokeRequired) { ...