2

I need two dlls General.BL and General.UI from one project. I am getting an error on General.UI.dll. Error is: The type or namespace name 'Window' could not be found (are you missing a using directive or an assembly reference?)

<Target Name="General">
<Csc Condition="%(Compile.CodeType) == 'BL'" Sources="%(Compile.FullPath)" TargetType="library" OutputAssembly="$(OutputPath)General.BL.dll" EmitDebugInformation="true" AdditionalLibPaths="$(OutputPath)" 
References="MyDll.dll"/>

<Csc Condition="%(Compile.CodeType) == 'UI'" Sources="%(Compile.FullPath)" TargetType="library" OutputAssembly="$(OutputPath)General.UI.dll"
     EmitDebugInformation="true"   References="mscorlib.dll;System.dll;System.Core.dll;System.Data.Linq.dll;System.Xml.dll;Microsoft.CSharp.dll;System.Configuration.dll" />

Ahror Kayumov
  • 433
  • 4
  • 18
  • what technology does your UI uses? Winforms or WPF? I think, you just don't reference dll with Window class (etc. PresentationFramework.dll for WPF) – Alex Voskresenskiy Jul 30 '14 at 10:04
  • Please check similar post [here][1]. [1]: http://stackoverflow.com/questions/3867113/visual-studio-one-project-with-several-dlls-as-output Regards, Sandeep – SanDeep Jul 30 '14 at 10:17
  • thanks for answers i checked similar posts but couldn't solve the problem. I am using WPF. If I reference to PresentationFramework.dll it couldn'd found this dll – Ahror Kayumov Jul 30 '14 at 11:17

1 Answers1

1

You're not referencing System.Windows.Forms so it fails to find any of the Window derivatives. Try adding it to the list of references, or remove the custom list of references entirely.

Deanna
  • 23,876
  • 7
  • 71
  • 156