visual-studio

How to indent F# code in Visual Studio 2008 in #light mode.

Is pressing spacebar only way to indent for F# in #light mode? This seems like a serious hindrance while using #light mode. Is there a better way than keep on pressing space bar in VS 2008? [Answer] by Brian (answer) 1. Go to Tools -> Options -> Text Editor -> F# -> Tabs 2. Select Insert Spaces ...

In Visual Studio (2008), can I start up a website debug session as the web root?

I have a website in my solution, let's assume it is in a folder called /Solution/Website1. When I debug it in Visual Studio, it will come up as http://localhost:someport/Website1. I want it to start as http://localhost:someport. Is this possible? ...

How to maintain scroll position after postback in web application created in visual studio 2003

Is there a way to maintain scroll position after a postback in visual studio 2003. In visual studio 2005 I can achieve this by setting MaintainScrollPositionOnPostback attribute of page directive to true. How can I do this without setting location.href property??? ...

Exporting classes containing std:: objects (vector, map, etc) from a dll

I'm trying to export classes from a DLL that contain objects such as std::vectors and std::stings - the whole class is declared as dll export through: class DLL_EXPORT FontManager { The problem is that for members of the complex types I get this warning: warning C4251: 'FontManager::m__fonts' : class 'std::map<_Kty,_Ty>' needs...

Using Visual Studio macro names to launch external applications doesn't work?

Using Visual Studio / C#, I've been debugging some nunit tests recently, and am now trying to make sure that if we branch the code that the unit tests don't stop working in debug mode. I have this working by changing project properties to launch NUnit as an external program: C:\Program Files\NUnit 2.4.8\bin\nunit-console.exe ..and th...

VS 2008 designer "Could not find type...."

I'm getting this error in visual studio 2008 in a Mobile Desktop application .NET 3.5. Could not find type 'MyNamespace.MyType'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built. This shows up when openin...

How to delete files in Visual Studio Pre-build event command line

I am trying to delete files in my $(TargetDir) within visual studio before building a project. How do you have to format command line to get around this problem I am getting below? ...

Why does my Visual Studio Win32 project require .net 3.5 sp1 to install?

Using Visual Studio 2008, I created a c++ Win32 project. To release the program, I made a visual studio setup project within the same solution. The setup.exe prompts my users to install .Net 3.5 SP1, which is often a 15+ minute install and only allowed to administrator level accounts. If they do not there is an error along the lines o...

How can I highlight the active line in Visual Studio, without using ReSharper?

How can I highlight the active line in Visual Studio 2005 and/or 2008? I would like the current line to be highlighted as other IDE's and text editors do, such as Eclipse and UltraEdit. ReSharper can do this, but it comes at additional costs. ...

Visual Studio Extensibility, Programmatically Creating A Project

I am attempting to programmatically add a test project to a solution. However when the code below executes I receive a File IO exception on the line "vhaSolution.GetProjectTemplate("TestProject.zip", "Csharp")". The error indicates that "he language specified is not supported by any of the installed packages". Does anyone have any idea w...

Select .NET Framework to Use In Visual Studio Application

If I have different .NET frameworks installed on my machine (i.e. 1.1, 2.0. 3.0, 3.5), is it possible for VS2005 to select with which framework to create / compile an application (Winform/Webform)? ...

Synchronizing the code and class views in Visual Studio?

I really like Visual Studio as an IDE, but there are a few things about it that really bug me. Namely, its class view. Not only is the class view tree structure cluttered, but it's not synchronized to the code view. I know there's a way of manually synchronizing them, but can't this be automated like it is in Netbeans? ...

Can Visual Studio be made to debug child processes like WinDBG?

This is similar to this question, but I wanted to flesh it out a bit. (I'm new here, if I should instead do a "bump" answer on the previous question instead, please let me know.) In WinDBG, I can use the .childdbg 1 command to tell it to break when a child process is spawned, or I can launch it with the -o command-line option. This is...

Crystal Report in Visual Studio 2003

HI, I am developing a web page in which I have to use reports. For that I have created a Dataset.xsd file and dragged a new element to it. But I am not able to view the table inside the Dataset listed in the Database Expert. Is this a problem with visual studio?? ...

Git change '.git' folder name in windows

Hi, By default git init creates a folder called '.git'. In the recent Visual Studio tools (2005 and up) this works fine. But Visual Studio 2003 (and ... VB6 as well probably) crashes on this foldername. ideally I would like to change this per repository to something like 'git' instead of '.git'. Is this possible? I know this has been a...

Free plugin for reordering (C#) members in Visual Studio 2008?

After reading Just say No! to C# Regions I'd like to find a Visual Studio 2008 add-in that will reorder my class members (constructors, properties, fields, methods, etc) in a consistent manner. I know Resharper can do this, but are there any free tools? ...

Using c++ library in c#

Hey guys, I'm trying include c++ library (DLL) in my c# project but every time I do that I get following error message in VS2008, any suggestions?? EDIT: It's a C++ MFC DLL Microsoft Visual Studio A reference to 'C:\Users\cholachaguddapv\Desktop\imaging.dll' could not be added. Please make sure that the file is accessible, and that ...

One executable that starts as gui application or console application based on command line in VS2005

I have a qt application in VS2005 which is linked using \subsystem:windows such that when I run the compiled executable it does not create a command line terminal, as well. I would like to create a command line mode: when I start it with --nogui command line argument, then the gui is not presented but a simple command line program is ru...

how to write if null surround-with code snippet

I'm trying to write a vs code snippet that will take the selected and surround it with an if null check, i.e. accgrp.CREATEDATE = DateTime.Now; will become: if (accgrp.CREATEDATE == null) { accgrp.CREATEDATE = DateTime.Now; } I've got as far as the below. $selected$ only seems to work the last time it is...

HTML text rendering problem with crystal report.

HI, I am having problem in rendering html formatted text in crystal report in visual studio 2003. When the textformat attribute is set to crHTMLText the values are not being displayed in the report. When it is set to crRTFText the formatting is not applied. Is there anything I should do for achieving this? ...