visual-studio-2010

How can I automatically set Build action=Content for all files with the specified extension

How to set build action=content for new and existing *.vm files in vs2010 solution? ...

VS 2010 Extensibility - How do you get programmatic access to call hierarchy?

I'm trying to use Visual Studio's Extensibility model to access call hierarchy for a particular method and then to populate my own control with the results. I'm pretty sure the answer must lie in the ICallHierarchyMemberItem interface but I can't work out how to get an instance of the something that implements this interface. Can anyone ...

How to make selection color be "on top" when background color for any text element is set in Visual Studio 2010 editor

Faced problem while setting background color for any element in Visual Studio 2010 editor. Selection color doesn't override this background color. So then it's very inconvenient to work with selections in editor. Case when only string literal is selected it's almost impossible to distinguish colors and see what part of string is select...

Weird Visual Studio Bug - Recurring Exception Thrown

I've encountered some very strange behaviour when debugging in VS 2010 with a WCF Service. Here's a snippet: public MapFileInfo[] ListFiles(string user, string pass) { return s.ListFiles(user, pass); } I want an exception to bubble up to the main application if authentication fails. However, what actually happens during debug mod...

Debugging a Visual Studio 2010 extension or addin, always gives me LoaderLock...

Title says it all. I'm trying to write an extension for VS2010, but I get this every time: Hit F5 to start debugging A new instance of visual studio starts up I can see a bunch of DLLs loading in the debug host while the new instance is starting It then fails with a "LoaderLock". When I continue after that, the new instance is fully...

How to apply VS2010 web.config transformation to an element with a namespace attribute?

I'd like to use the new VS2010 web.config transformation feature to change the connection string within the nhibernate configuration in my web.config file. The relevant snippet is something like this: <?xml version="1.0"?> <configuration> <configSections> <section name="hibernate-configuration" type="NHibernate.Cfg.ConfigurationSe...

ASP.NET 4.0 Rendering problems with the menu control after removing of controlRenderingCompatibilityVersion="3.5"

I am actually migrating websites to ASP.NET 4.0, having problems with the new rendering of menu controls. My websites make heavy use of nested menus. Hover effects are used and the layout is defined by a combination of themes and skins with linked CSS. If I remove the pages controlRenderingCompatibilityVersion attribute, they are no lon...

Solution Folder can't be checked into TFS?

A solution created with VS2010 with solution folder. When checking into this solution to TFS, the solution folders are missed on TFS. How to sync TFS and VS2010 with solution folder? ...

How do I debug into an ILMerged assembly?

Summary I want to alter the build process of a 2-assembly solution, such that a call to ILMerge is invoked, and the build results in a single assembly. Further I would like to be able to debug into the resultant assembly. Preparation - A simple example New Solution - ClassLibrary1 Create a static function 'GetMessage' in Class1 whic...

Can you build Sharepoint 2010 webparts with VS 2010 Express?

Can you? I'm looking to build the Sharepoint Visual Web Parts. I downloaded C# express and Web Developer Express but neither have the templates that all of the walkthroughs start from. Is there any way I can get the template or do I HAVE to get the professional version. ...

How can I default WPF Items to private instead of internal?

I would like all WPF XAML items to default to private instead of internal. Is this possible within Visual Studio 2010? ...

Is there a way to add extra fields to an association in the ADO.NET Entity Framework?

I would like to be able to model a many-to-many relationship that has extra details about the relationship. For example: Person: int id, String name Project: int id, String name ProjectPerson: Person.id, Project.id, String role Whenever I create the ProjectPerson association in the EF, I am unable to add the role attribute to the as...

Where Do I Place Data Generation Scripts in VS2010 Database Project?

I am working on a database project within VS2010. I have created a few INSERT INTO scripts so I can populate the database with data which I can then test against. However, I am unsure of where to put these scripts so that they are automatically run on deployment. (For example, if I put items under the Schemas/Tables folder of the VS20...

Making a simple app that logs and reads in command line arguments with Visual Studio 2010 Express, google glog and google gflags?

I've written the following simple program: #include "stdafx.h" #include <gflags/gflags.h> #include <glog/logging.h> #include <ostream> int _tmain(int argc, char* argv[]) { google::InitGoogleLogging(argv[0]); LOG(INFO) << "Found"; return 0; } I checked out google-glog from here: http://code.google.com/p/google-glog/sourc...

VS2010 Threads window shows 25 threads and Process.Threads.Count.50 Why?

VS2010 Threads window shows 25 threads and Process.Threads.Count.50 What are the other 25 are doing? ...

How to use profiler?

Can anyone provide me with link to a website/book in which would be well explainded how to use profiler in VS2010 for native code? I tried to search the web but all I'm getting is tutorials from Microsoft and those tutorials use C#. Thank you. ...

Different connection string for each publish profile in VS2010

Is it possible to change connection string (or just server host) relying on selected web publish profile? Maybe using Web.config transform or someway else? I mean for profile "Test" change connection string "MyConnString" (in published Web.config) to "Data Source='example.com,14333;..." and for profile "Production" - to "Data Source=./S...

Which VS 2010 version to get?

I want to download VS 2010 Ultimate through my MSDN licence, but I don't see one for the 64-bit. There's Visual Studio Team Foundation Server 2010 (x86 and x64) - DVD (English), but is that just the server or can I use it for dev too? ...

VS2010 and local databases

Is it possible to connect to a local database (in the app_data folder) using the Data -> Transact SQL Editor in Visual Studio 2010? When I launch the Transact SQL Editor from VS2010 I get the "Microsoft SQL Server 2008 RC" connect to server dialog. The options I have for Server type are "Database Engine" and "SQL Server Compact" ...

Creating a 'Custom Designer' Visual Studio 2010 Add-in

A major part of our work is creating and manipulating certain XML files, for which have a custom editor. The editor is starting to get creaky and we are looking at building a replacement. Since VS2010 has recently arrived, ostensibly with an improved add-in architecture (MEF?), I am interested in the possibility of building the editor as...