marc_s
marc_s

Reputation: 754388

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 :-():

In order to make things work on our build server, I also created a Library folder inside the Winforms app's project directory with the CR X runtime files I need, as well as a Library folder inside the web app's project directory with the CR XI runtime files.

In VS 2008, I was able to pick the necessary assemblies from the respective library folder in my Winforms projects (several class libraries etc.), and in my web apps. Everything worked great.

When I updated to Visual Studio 2010, now suddenly I'm seeing:

What the h*** is going on with VS 2010 here?? Why can't it leave my selections alone and let me choose my runtime files from a Library folder instead of insisting on going to the GAC?? What has changed between VS 2008 and VS 2010 in this respect?? Does anyone have any insights into this??

Upvotes: 0

Views: 277

Answers (1)

Brian
Brian

Reputation: 118865

It may be useful to either

(1) go to Tools\Options\Project&Solutions\Build&Run and change MSBuild verbosity to 'diagnostic' and then build and in the Output window see how the MSBuild reference resolution logic is working for those assemblies. That is, if VS hasn't already done something ridiculous to the underlying .csproj file

(2) compare the XML in the VS2008 project file versus the VS2010 project file to see what's in the <Reference> nodes

A wild speculative guess: the VS2010 project is targeting ".NET 4.0 Client" (rather than ".NET 4.0 (full framework)", and the libraries need the full framework, and MSBuild sees this dependency and is using fallback logic.

Upvotes: 1

Related Questions