visual-studio

__attribute__((constructor)) equivalent in VC ?

Hey, I was wondering if it's possible to use C constructors in VC just as it is possible to use them in GCC. The gcc way is quite straight using the attribute keyword, unfortunately VC doesn't seem to even know this keyword, as I'm not a Win32 programmer I wonder if there's some sort of equivalent keyword for such things. Just to note -...

Using Source Control

I am a very new programmer, I have made a couple basic applications, however I was told that it would be good to get used to using "source control" at the near the beginning of learning so I get accustomed to it. I have gathered that source control is what is used to manage programs with multiple programmers and that it is somehow connec...

ASP.NET files necessary for development

I am just getting started in ASP.NET and have some existing projects to maintain. I have read that ASP.NET projects include a folder called app_data, a code behind DLL, .sln project files, .proj files etc Which of these files are necessary for the continued development of a ASP.NET website? Also, are there others which are key to buil...

C# - Visual Studio 2008 capable of Conditional Compilation?

Referring to the "Configuration Manager" under the Build menu. Is there a way to comment my C# code so that the commented out code does not compile while the solution is in Debug mode, but would compile if I changed it to Release mode? Update: Judging by the answers, I should have said why I wanted this. The reason I want to have code...

Crystal report is not working properly in Visual Studio 2005?

I have developed a project in VS2005(C#) which contains two crystal reports, the project is working fine and crystal reports are running properly on my system. But when my friend tries to run the project on his system, then the projects runs well but when I am opening crystal reports I am getting the error shown in image below We are ...

List of exceptions to "Remove unused usings" in VS2008

I love the "Remove unused usings" command in VS2008, however when running it on a small file I find that it can remove certain usings which I would like to always be there, even if currently unused. For example, System.Linq - because unlike actual types, one can't Alt+Shift+F10 add the usings for extension methods. Is it possible to spe...

How should I use debug/release mode in Visual Studio?

I usually test my code locally on my work machine and then move it to development environment and then finally to production environment. What is the best way to use debug/release mode for this scenario? Do I only need to care about debug mode in my machine? Should I publish debug mode or release mode to development? I know probably I sh...

Designing a "Landscape application" for a Pocket PC

I would like to create an app for a pocket pc. One of the features is that the user should rotate the pocket pc 90 degrees counterclockwise to opearate normally the app How can someone design a "counterclockwise rotated" application with Visual studio? Is there any option in VS that i am missing? ...

Does the Visual Studio Test Runner Support Other Frameworks?

Can I run nUnit tests in Visual Studio (for instance)? ...

Visual Studio - Possible to create support for other languages?

Is it possible through their add-ins to add support to other languages that c# or vb.net? I mean, like have full control of the IDE, debugging included. ...

Where can I get a list of all build properties in Visual Studio?

For example, I can use $(TargetDir). Is there a list somewhere of all the available properties? I'd like to peruse them. ...

How to compile a C file without visual studio

I have visual studio 2008. I have a written a small C program. I want to compile that C file in command prompt. How do i do that ? please point me to a place where i can learn more about working with projects without visual studio. thanks ...

How to put extended WinForms Control on ToolBox

I plan to add functionalities to TextBox with the following: public class TextBoxExt : TextBox { protected override void OnKeyPress(KeyPressEventArgs e) { base.OnKeyPress(e); } } The question is how can we use this TextBoxExt? Is there anyway to get this class onto the ToolBox so that ...

"Must have" Visual Studio addons

So - this is a question to all the Visual Studio users out there - what addons do you use, and can't live without - and why ? ...

How do you share code between projects/solutions in Visual Studio?

I have two solutions which have some common code, so I'd like to extract it out and share it between them. Furthermore, I'd like to be able to release that library independently because it might be useful to others. What's the best way to do it with Visual Studio 2008? Is a project present in more than one solution? Do I have a separate ...

How do i force VS.net in designer mode on a class?

Short backstory: My UI code uses tabs heavly and as time progresses and features get added the .cs file that has the tab controls is getting big and hard to maintain and i came up with a what i think is a clever way around this. When i create tab page its new class that are inheriting the TabPage, and therefor in its own .cs file. Now t...

What's the quickest way to navigate to the top of a class in Visual Studio

If I'm editing deep within the body of a class, what would be the quickest (ie. fewest keyboard shortcuts) way to navigate to the top of the class declaration (the line that contains "class ClassName" ...

MD5CryptoServiceProvider ComputeHash Issues between VS 2003 and VS 2008

I have a database application that generates a MD5 hash and compares the hash value to a value in our DB (SQL 2K). The original application was written in Visual Studio 2003 and a deployed version has been working for years. Recently, some new machines on the .NET framework 3.5 have been having unrelated issues with our runtime. This h...

VS2008 UnitTesting - detached RCW with Office Application objects (PowerPoint, etc.)

BACKGROUND I am automating an PowerPoint 2007 via C# I am writing unittests using the built-in unit testing of Visual Studio (Microsoft.VisualStudio.TestTools.UnitTesting) for my code I am well relatively experienced in automating the Office 2007 apps MY PROBLEM When I run my unit tests, the first unit test method runs fine, all af...

Evaluate SPListItem field values using debugger

How do I evaluate SPListItem field values using VS debugger? Best I get is only a list of Field names, but not values. ...