visual-studio-2010

C# how to treat Resharper errors as compile errors in msvs 2010?

I want to treat resharper 5.0 error "Possible NullReference Exception" as MSVS 2010 compile error. Is it possible? ...

How to get user Names of domain in Sharepoint web part ?????

Hi All !!!!!!! I want to get user names in active directory by using sharepoint webpart. any way a i can get usernames by using ASP. net but i cant convert that code in to sharepoint web part.... here is the code ......... using System; using System.Collections.Generic; using System.Linq; using...

Dark Theme for Visual Studio 2010 With Productivity Power Tools

There's a lot of new things going on in the Productivity Power Tools extensions, and I find that many of the new features come with very weird color combinations, that many times make the text completely illegible. I assume this is because I've previously set a dark theme for Visual Studio, and some, but not all, of the settings that aff...

VS 2010 Error Generating Unit Tests

I have one .NET 4 DLL for which I'm having trouble generating unit tests. I'm using VS 2010 Standard. Every other project in the solution will generate unit test stubs for classes just fine. For the other assemblies, I can go into the existing code, right click the class name, and select "Create Unit Tests". I get the selectiong wind...

VS2010 code analysis selecting types/namespaces

I'm working on a project and we have a huge assembly if hundreds of types. I would like to add some kind of code analysis, but only on new types. In FxCop I can chose the types and/or namespaces I want to have analyzed. I can't seem to find a way to do so in VS2010 code analysis. Is it just me or is this not possible? ...

project location not trusted in VS2010

How to get VS2010 to trust a location and not ask for permission before opening projects from location not trusted? There used to be a .NET 2.0 configuration tool --- is there a .NET 4 equivalent related to this http://stackoverflow.com/questions/2603144/the-project-location-is-not-trusted-error-in-visual-studio ...

T4 code generation without Visual Studio 2010?

Is it possible to run T4 code generation without needing Visual Studio 2010? Basically I have to build an in house ORM (don't ask..if I had a choice I wouldn't). I was planning to use subsonic as a base but change some things and how they work. However my main question is can I run T4 from an external application that I write, so I can u...

Visual studio app running extremly slow with debug

I have a native c++ program which runs > 20 times slower when started with Debug (F5) but runs at normal speed when using start without debug (Ctrl+F5). Is there some setting I did choose wrong or something? [Update] It does not matter whether I use a debug or release build. Also if I use Windbg the program is a magnitude slower. [/Upd...

Exception when Deploying to SharePoint 2010 from Visual Studio 2010

I've done MOSS 2007 development for some time, and am just starting to get my feet wet with SharePoint 2010. I created a SharePoint project, added a Visual Web Part, and typed "Hello, World!" into the web part's user control. Everything works fine the first time I deploy the project (by selecting Deploy from the project's context menu i...

Automatically deleteting old IntelliTrace recordings

I recently noticed that I collected 22GB worth of IntelliTrace recordings. Sadly, I was unable to find a location in the IntelliTrace settings that would allow me to automatically delete them. Is there an solution to this in Visual Studio or do I have to take care of this myself? edit: As Hans Passant suggested, I submitted a suggestion...

How to automatically generate code that has to be written for every method?

I'm working on a project and every single method I write starts off identical to: public blah blah() // my method signature { Tracing.StartOfMethod("Repositroy"); // I'll declare variables as needed try { // the content here differs for every method } catch (Exception ex) { ErrorSignal.FromC...

structure of an asp.net solution

I am in the beginning stages of creating an asp.net solution with 3 very different areas. I will have a client area, a client admin area, and an internal admin area. Each one of these areas is significantly different and there would be not be overlap in functionality. I was thinking of structuring the solution as follows: Client (Pr...

In Visual Studio, change the keyboard to use an F key for "execute sql"

In Visual Studio 2010, I have a Database Project. I can use this without issue to view, edit, create sprocs, etc. How can I change the keyboard to allow me to use an F key for "execute sql" as I would use F5 in MSSMS. I can't seem to find the right binding sequence in Tools-Options-Keyboards and figured it would be faster to ask the com...

Extending the extension manager.

I want to extend the extension manager in Visual Studio 2010. I'd rather know if that is at all possible before I get into it, but am unable to find anything about it. All the extensibility options I've read about mention nothing about being able to actually change the function of an existing VS2010 tool like the extension manager. I'd...

is there a sandcastle plugin for Visual Studio 2010?

I really like the help files generated using SandCastle on my projects... is there a plugin for Visual Studio 2010 for SandCastle, or another good alternative program that integrates directly with Visual Studio? ...

The value of the local or argument 'x' is unobtainable at this time.

I am encountering this problem [see title] when debugging a unit test in Visual Studio 2010. In the Locals menu, the error: "The value of the local or argument 'x' is unobtainable at this time." appears in the Value column of all my List<T> variables. Both my unit test project and the project being tested have the "build output debug i...

Converting VS2008 to VS2010 project "cannot find the file specified"

Hello, I am trying to upgrade a Visual C++ 2008 project to a Visual C++ 2010 project. However, when I attempt to do so, I receive the following error: The following error has occurred during XML parsing: File: C:\Documents and Settings\t-aruns\Documents\Visual Studio 2008\Projects\test\test\test.vcproj Line: 9 Column: 2 Error Message: ...

Visual Studio 2008 and 2010 for one ASP.NET-MVC-2 project?

I recently joined a team that is working on a ASP.NET MVC project.. they are all working on visual studio 2008 but i have VS 2010 on my machine... I am going to suggest we all upgrade to asp.net MVC 2 but my question is Will they have to also upgrade to VS 2010 or will a simple install of MVC 2 be enough for all of us to work on the sam...

Centering text in passwordBox in XAML

I'm trying to center the text in a PassWord box: In Blend the Text properties for alignment are all disabled. Is there another way to do this? Thank you for your help. ...

Cannot set startup object in WPF VB.NET Project

I am using VS2010 VB.NET, working on a solution that has a number of projects. I have been developing on it for a while now, and in an attempt to debug a custom class inherited from ObservableCollection (which by the way would not load symbols when debugging even though it was apparent that the breakpointed line was being called), I cha...