visual-studio-2010

Using Visual Studio DTE to analyze source code

Hello: There is an interesting coding standard in my shop that says that we don't shortcut type names with a using statement, they have to be fully qualified (so any time you reference a type, you use MyRootNamespace.ANamespace.MaybeAnotherNamespace.MyClassName, instead of just "MyClassName"). Love it or hate it, that's just how we rol...

Web.config transformation causing an error when building

I am using the new VS2010 Web.config transformation. When i do a publish under the 'Release' solution configuration, i get a folder created called ..obj\Release\TransformWebConfig, which contains the original Web.Config and the transformed Web.Config, in addition to If i was to then try to re-build my solution using the same 'Release'...

Using a .Net 2.0 Web Reference in Visual Studio 2010

I have a .Net 3.5 class library project that I've migrated to use Visual Studio 2010. It still targets .Net 3.5. This project contains two ASP.Net 2.0 style Web References (with the auto generated Reference.cs files). During the migration to VS 2010, the Reference.cs files were updated to use .Net 4.0. Specifically, the constructor att...

c++ Inheritance: Destructor does not get called...

I got my code like the following: class TimeManager { public: virtual ~TimeManager(); }; class UserManager : virtual public TimeManager { public: virtual ~UserManager(); }; class Server : virutal public UserManager { virtual ~Server(); }; CServer *pServer; DWORD WINAPI ServerHelper(void*); int main() { //Create server CreateT...

Web.config transformation option is greyed out...

In VS2010, when I right click on my web.config file the "Add Config Transforms" option is greyed out. Any idea how I can get that back? ...

Can I set Visual Studio 2010 Professional up as an IDE for C?

Not C++, not C#, just plain old C for my computer science class. I see options for C#, F#, Visual Basic, and Visual C++, but if there's an easy way to get it to work with C, I'm not seeing it. *"set up as an IDE" in this case, meaning use Visual Studio to compile, debug, and run the written programs via VS2010, just as I've been using ...

Detect duplicate code in Visual Studio 2010

Clone Detective was a great tool for finding duplicate code in VS 2008. Are there any tools for finding duplicate code which integrate into VS 2010? *Clone Detective doesn't look like its being actively developed 1 2. ...

How to get expansion of code behind files in a vb.net web app?

I'm a C# guy, but I need to work on a vb.net application. In a C# web app, you can expand the codebehind and designer files by clicking on the little arrow to the left of the .aspx file name. However, I don't see that in the vb.net project. Instead I have to open the aspx, then hit F7 to get to the code behind. How can I tell studio ...

How do I use Visual Studio 2010 Ultimate with Codeplex?

I'd like to upload a project into codeplex, but I have no idea how. I don't want to break my existing TFS + VS install. Do I need to install anything special to work with Codeplex? ...

Unable to install ghostdoc, can you help?

Hello, I am unable to install ghostdoc. The error message is "Microsoft Visual Studio.NET is not installed on your computer" Visual Studio is installed on my computer. Have you seen this problem? Is there a workaround? Is there a way to install ghostdoc by hand? ...

How do I create Windows with WPF that look like notification area windows in Windows 7?

Is there a way to create windows like the native Windows 7 notification area Windows with Windows Presentation Foundation? For example the audio controls or the power plan settings. I was able to create a Window with Windows Forms that was looking equal, but still had the resize cursor when you hovered the borders. I’m using the followi...

Create One-To-One relationship between table and view in EF4?

Hello I have a table Item (ItemId int PK, Title vc, Description vc) I created a testing view called ItemView: SELECT * FROM Item. I added this view to my model, removed all the keys but the real key, added a 1-1 association, and mapped it, but I get 2 errors: The table/view 'dbo.ItemView' does not have a primary key defined. The key...

LINQ to SQL Designer and the Geography datatype

Hi, I am having a few problems loading a table into the designer. I get the following error. One or more selected items contain a data type that is not supported by the designer Would I be correct in assuming it is the geography type used in the table that is causing this error? Any pointers much appreciated. ...

DataBound ListBox and Button inside a ScrollViewer/StackPanel construct, with Button appearing below end of ListBox content.

I have the following construct, which shows a DataBound ListBox and a Button inside a StackPanel, which again is placed inside a ScrollViewer: <ScrollViewer VerticalScrollBarVisibility="Visible" Height="400"> <StackPanel Orientation="Vertical" MaxHeight="400"> <ListBox x:Name...

Register a file type using Visual Studio 2010 setup project

I need to register a file type (e.g. .exex files) when my application is installed because I want that when the user double clicks a .exex file to be automatically opened with my application. How can I do this using Visual Studio 2010 installer project? ...

Add Subsonic 3.0.0.4 in Visual Studio 2010

I've created a console application focused on C#3.5 and added a reference to System.Web, System.Configuration and Subsonic.Core. Also have in config file <?xml version="1.0"?> <configuration> <configSections> </configSections> <connectionStrings> <add name="UpdateCotswolds.Properties.Settings.Live_IntegraConnecti...

How to identify where I am publishing to for use in the pre-build event

I would like to use Nant to create an environment-specific web.config during the build process when I'm publishing to a given location. For example, when I am publishing to my TEST server, I want the web.config's connection string to point to the TEST database. When in PROD, to the PROD database. I have Nant working in the pre-build, ...

Is it possible to verify custom code/architecture rules inside vs2010 without having a tfs server?

We have TFS. We are moving to TFS soon, but I'd like to know if it's possible to check code against a policy that is not attached to TFS. Especially, if you can do so without having a TFS server attached to VS at all. I'd like to have the policy already TFS capable, or very easily migrated. We are all on VS2010 ultimate. ...

Generate dynamic calendars based on default calendars date selection

Hi, say i have 2 asp.net default calendars. Now from one i select the date as August 20 2010 and in second i select the date as March 2011. My Question: How can i generate dynamic calendars based on dates that i have selected inclusive of the dates? Hence for above example the dynamic calendars would be say from August 2010, September...

warning C4673: throwing 'ex::traced_error<EX>' the following types will not be considered at the catch site

MSVC 10 and MSVC 9 are both generating a level 4 warning message when compiling my exception framework, although the behavior of the program seems correct. The exception framework is rather large & complex, but I have managed to boil it down to its essence. This is a complete program you can compile & run in VS10 #include <cstdlib> #...