2

I'm attempting to follow David Betz' wonderful advice on how to use a library project in both your .NET and Silverlight code. In particular, I'm using his File-Level technique: I have a .NET library project already set up, so I created a Silverlight project, and added links in the latter to the former's files.

Unfortunately, there is a problem. I get compilation errors like crazy, of the form:

The type '...' exists in both 'Util.dll' and 'Util (Silverlight).dll'

In all of my other projects, I only reference one or the other. Neither Util dll has a reference to the other, so I'm not sure why the compiler can see both DLLs from any of the other projects.

Any ideas?

frank
  • 1,322
  • 1
  • 10
  • 28
  • 1
    What is the first error in the Output? – codemonkeh Aug 12 '10 at 01:12
  • The type or namespace name '...' could not be found (are you missing a using directive or an assembly reference?) I'm going to fix all of these and see if that helps. – frank Aug 12 '10 at 01:57
  • Argh! It really was this simple :) I just fixed the compilation issues other then this one, and it suddenly stopped complaining. I also added to the linked projects Project Dependencies (http://msdn.microsoft.com/en-us/library/cb8t5a6t(v=VS.80).aspx) on the real projects, and that helped keep the errors more consistent, at least. – frank Aug 12 '10 at 02:32

1 Answers1

2

Answer posted by frank in comments. Porting to answer and community wikiing it in hopes that it'll be accepted as the answer.

Comment

Argh! It really was this simple :) I just fixed the compilation issues other then this one, and it suddenly stopped complaining.

I also added to the linked projects Project Dependencies on the real projects, and that helped keep the errors more consistent, at least.

– frank

Community
  • 1
  • 1
Brian Dishaw
  • 5,767
  • 34
  • 49