visual-studio-2008

Visual Studio 2008 crashing when opening empty .aspx or .js file

Visual Studio 2008 has started crashing on my machine when I open .aspx or .js files. I think that this problem started after I logged off Windows with several Visual Studio instances up and running. Windows prompted me to kill the Visual Studio processes. In an attempt to find the route cause of the problem I have discovered that simpl...

.NET Version Number (Installer Version)

I’m trying to add a feature to my winforms app that prints the version number on the main screen. I currently have this: txtVersion.Text = ProductVersion.ToString(); Which tells me the version of the program – all well and good. However, what I’d ideally like it to do is to pick up the version of the installer program that was used ...

SQL Database Publishing Wizard: Is it possible to suppress the comment lines in the generated script?

I use the Database Publishing Wizard in Visual Studio to create a script of a test database (schema and data): The wizard creates a file that I store in my source control system. When I make a few changes to the database I want to publish again in order to save the changes in the source control system. The problem for me is that the wiz...

How to duplicate asp page in visual studio 2008?

Greetings, How to duplicate asp page in visual studio 2008? If I copy and paste the page I want in new folder in the same project the rename the copied asp page with new name I will have this kind of error: Error 1 The type 'IMAM_APPLICATION.AddContact' already contains a definition for 'cmbStateWork' C:\Users\A\Documents\Visual S...

How to enforce documentation of private methods in StyleCop?

Our team has some code guidelines that I would like to enforce via stylecop rules. For most of the things a Settings.Stylecop file is used. However, I would like to enforce documentation for private methods and I can not find the way to do this in the Settings file. If I right-click on a project and select "stylecop settings", I can unch...

"Active (Debug)" versus "Debug" ~~ please explain these vs settings

Visual Studio Debugger Project Settings for C# Debug Configurations http://msdn.microsoft.com/en-us/library/2kf0yb05.aspx vs2010 http://msdn.microsoft.com/en-us/library/2kf0yb05(VS.90).aspx vs2008 http://msdn.microsoft.com/en-us/library/2kf0yb05(VS.85).aspx .NET 3.0 http://msdn.microsoft.com/en-us/library/2kf0yb05(VS.80).aspx vs2005 http...

Make Visual Studio not care about DLL versions

Is there a way to make visual studio not care about dll versions? Is this a bad idea? I am resetting up my dev machine and I just installed the latest version of Pex and Moles (version .92). All my projects are on version .91. We are in the middle of a release and don't want to upgrade right now. Also, I cannot find an installer t...

Where to find demo code of working PHP extension for VS2008 targetting PHP 5.3.x and Windows?

There seem to be so many half-documented ways of writing extensions for PHP in Windows. Can anyone point me to source code which demonstrates an extension compiled under VS2008 and working in a PHP 5.3.x environment? ...

Visual studio crashes as soon as I open aspx or ascx View from MVC 2.0 project

Hello, Visual studio crashes as soon as I open aspx or ascx View from MVC 2.0 project. If I delete all bin and obj folders from projects, I can open aspx and ascx View page. But it crashes again after compiling. It started to crash after I moved strong typed model to different project. I got stuck and cannot go further, really frustrat...

Correct way to uninstall a Windows service?

I've got a windows service, built using C#, that is installed via a VS2008 setup project, and am having a couple of problems occurring with the uninstall process: Service is not stopped prior to uninstalling When the uninstall routine runs, it throws up an error about files being in use. Clicking continue completes the installer correc...

EqualityComparer in LINQ - how can I do?

I think that the code below is good. But how can I write it in LINQ? how can I compare Employee type object in linq? namespace GenericReplacement { class Program { static void Main(string[] args) { EmployeeComparer employeeComparer = new EmployeeComparer(); Employee employee1 = new Employ...

Visual C++ 2010 compatibility with VC 2008

I am compiling a program with Visual C++ 2010 but I don't want everyone to have to download the redistributable package to run my programs. Most people that will be using my program already have the VC++ 2008 redistributable package though, so is there a way I can compile it with compatibility with VC 2008? Or is there a place I can down...

How Can i View Column Name Values on DataGridView?

CourseID, ProfessorId and StudentID are foreign keys, i want to print CourseName, ProfessorName, StudentName instead of ID's. I'm using the wizard (typed dataset). Note: the three id's are of composite pk as well fk, so no duplicate records will appear. What can i do? ...

Managing solution-common include/lib directories in visual studio 2008

I have made several projects in one solution. The problem is that the projects share same include/lib directories, but I don't want to put it into my IDE-global setting. Is there anyway to deal with it effectively? ...

Why is Intellisense not working for one unit test project?

I have a Visual Studio 2008 solution which builds a C# class library (Project X) and C# Windows Application (Project Y). In the unit test project for the C# class library (XTEST) , Intellisense works as expected and auto-completes the names of classes etc. In the unit test project for the windows application (YTEST), Intellisense has ...

Convert to UCS2

Dear all, Is there any function in Vb.net (or C#) that encodes a string in UCS2? Thanks ...

Making an installer for .net application that depends on avifil32.dll?

I am new to .net and have this problem: I want to make installer for application that uses avi wrapper described here. That library depends on avifil32.dll as I've found out in the source which contains [DllImport("avifil32.dll", PreserveSig=true)]. I've made setup project in visual studio 2008 and installer is working fine on some m...

Why does my form sometimes vanish when closing a dialog?

Occasionally, seemingly randomly, when I close a dialog form my main form seems to move back in the window order, disappearing behind the next application back (usually Visual Studio). It retains focus, so clicking it in the taskbar minimises it, requiring another click. Whenever this happens, the control colours seem to change a littl...

What is the Shadowing attribute that the VS uses when it generates unit tests?

When i generated unit tests the Visual studio added some fictive class that mocks my class and added the "Shadowing" attribute. What does it do? ...

"Go To Definition" is greyed out but I can find variable via search in same file.

I'm debugging c# good in vs2008 SP1, .NET Framework 3.5. In a .cs file, I have this code: internal protected bool Refreshing{ get { return refreshing;} set { refreshing = value;} } elsewhere, in the same file, I have this statement: if (Refreshing) return; When I am debugging and right click "Refre...