visual-studio-2010

Alternative to nested type of type Expression<Func<T>>

I have a function used when calling a service. Before it call the service, it will create a log entry: protected TResult CallService<TService, TResult>(TService service, Expression<Func<TService, TResult>> functionSelector) { Logger.LogServiceCall(service, functionSelector); return functionSelector.Compile()(service); } Th...

How to share visual studio boomarks between developers?

I've recently stumbled across the ability to use boomarks in Visual Studio. (http://www.codeproject.com/Articles/42973/Using-Bookmark-in-Visual-Studio.aspx) As far as I've googled, I've found out that the bookmarks are stored in the .suo file of the project, that holds userspecific information is that therefore not stored in sourcecontr...

Hosted source code repositories

I primarily work on small, personal projects. One of my challenges has been source code repository maintenance. I have used the basic version of Team Foundation Server provided by my MSDN license and while it works great, it's not ideal (I'm not doing backups like I should, etc). I'd really rather pay to have it hosted. I like TFS, b...

one project with multiple build configurations in VS2010?

I have a c# windows application project. I want to build two .exe files, one is run as 64bit on 64 bit OS (by platform targeting 'Any CPU'), the other is run as 32 bit on 64 bit OS (by platform targeting x86). Currently, I should change my build configuration whenever i need the other configuration, and rename the compiled file to disti...

What are some good beginners resources for learning MSBuild?

I'm looking for resources for learning MS Build (not just books). At this point I'm mostly concerned with merging assemblies and automating build tasks. (nightly builds etc.) ...

Traversing arbitrarily large binary tree inorder

I'm stuck at finding a solution. C#, .NET 4.0, VS2010 I can easily write a recursive one, but can't for the life of me figure out something that won't overflow the stack if the tree is arbitrarily large. This is a binary tree question, and i am trying to write a public IEnumerable<T> Values() method. Here is the full code in case ...

unblocking Ribbon WPF assembly for use in VS2010

I'm trying to open the sample Solution for the Microsoft Ribbon for WPF, but I get this error about being unable to load metadata. The solution on that site, and the one linked in the error, is How to: Use an Assembly from the Web in Visual Studio. However, I don't see any 'Unblock' option when I check the Properties dialog for RibbonC...

VS plugin from 2008 to 2010

Hello, I have a plug-in that I use with Visual Studio 2008. I am testing 2010 and one of the problems I am seeing is the fact that the plug-in doesn't get loaded anymore. This is the command I am using to add my plug-in: toolsMenuName = "Tools"; Microsoft.VisualStudio.CommandBars.CommandBar menuBarCommandBar = ((CommandBars)_applic...

Will VS2008 compile binaries compatible with Windows 7

I'm using Microsoft Visual Studio 2008 (VC9) to compile a project that has a .dsw file. I already have the 2010 and would prefer to use it, but it seems this dsw was built for 2008. I'd like to compile and produce a binary that's also compatible with Windows 7. My questions: if I compile with 2008, will the resulting binary be compat...

Best way to browse an mdf file from a local computer?

I'm working on an ASP.NET MVC site which will have a database. While I'm in this very early testing/concept phase I'm not hosting the database anywhere, just inside the local mdf file. What are some tools I can use to connect to the local test server so I can browse the tables and run test queries against the information in them without ...

Visual Studio 2010 Unit Testing

Hi, I am trying to find out in Visual Studio 2010 Unit Testing how to keep a transaction of the data I have either added, updated, or deleted during my tests so on my TestCleanup I can rollback their values. What search terms should I be using to find more about this? Cheers Paul ...

"Cannot evaluate expression because the code of the current method is optimized" in Visual Studio 2010

I am using Visual Studio 2010 in debug mode and I have "optimize code" unchecked. I can't quick watch (or hover on) any variable in the debugger. I get this error "Cannot evaluate expression because the code of the current method is optimized". Even a line like: int i = -3, doing a quick watch on i, I get "Cannot obtain value of local o...

How to put a UserControl into Visual Studio toolBox

I made a usercontrol in my project, and after building project, I need to put it in my toolbox, and use it as a common control. but i can't. the usercontrol is in my project namespace, and I tried Choose Item in rightclick menu, but I didn't find a way to add it. ...

Visual Studio 2008 and 2010 behave differently when referencing assemblies in the file system??

I am seeing a strange phenomenon in Visual Studio 2010. My project setup is this (I inherited this - can't change it any time soon, unfortunately :-(): a Winforms app that uses Crystal Reports X (v10) as its reporting engine; full CR X Developer Edition is installed on my dev box several Webforms apps that use Crystal Reports XI (v11)...

Schema compare fails, SQL Server 2008 R2 & VS2010 Premium with time out expired error

I have a VS2010 DB Project migrated form VS2008 and a couple of schema comparisons created. I get the following error: Error 1 An error was received from SQL Server while attempting to reverse engineer elements of type Microsoft.Data.Schema.Sql.SchemaModel.ISqlUser: Timeout expired. The timeout period elapsed prior to completion of th...

Visual Studio 2010 Express installation. Error 1935

I'm trying to install Visual Studio 2010 Express. I got error 1935 during installation process. I tried many workarounds but still cant install it. I don't want to reinstall windows. Could some one help me? Error messages: The installer has encountered an unexpected error installing this package. This may indicate a problem with this p...

howto get access to list view labels when i submit the page?

hi, how can i access the labels from a list view when i submit the page? for example i have a ListView with 5 items and each item contains a label calles Label1 and i want to read out each of this labels when i push the submit button ...

Visual Studio 2010 - files in folders without ../../Include.h

My physical file structure for a project I have is something like: Source folder Engine Folder1 Folder2 etc. I have some files in 'Source', some in 'Engine', some in 'Engine/Folder1', etc. On my project, I have gone All Configurations->Source Directories and included Source, Engine, Engine/Folder2, etc. However, I still get error...

How to reference multiple files for javascript IntelliSense in VS2010

Hi. I have large solution with about 40 separate javascript files, which are referenced to web page via special js-service. I want to use new IntelliSense features in VS2010, but it is very hard to add about 40 individual references like this: /// <reference path="../../lib/jquery-1.3.2.js" /> to each js file in solution. Maybe there...

After in VS2010 include other library, app fail on start with error 0xC000007b

Hello, I have a problem, downloaded curl developemnt package but if i add in my visual studio .lib file form this program fail with 0xC000007b on startup. I trying download all complete source in this i can download simple vs6 project but without errors i convert it to visual studio 2010, i compile this solution normally, libcurl with...