Question

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?

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top