Second WPF project in one solution gives log4Net error

I am completely confused with the following error.

I have my application that works fine and uses log4net for logging.

Now I will implement my own update system. And I want this to be part of my decision.

I added a new WPF application for my solution, and when I try to edit the main window or any other window in this project, I get the following error message:

/Microsoft.VisualStudio.Xaml;Component/MS/Internal/Designer/PropertyEditing/Resources/StylesCore.Constants.xaml' value cannot be assigned to property 'Source' of object 'System.Windows.ResourceDictionary'. 
Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one of its dependencies. 
The system cannot find the file specified.  Error at object 'ResourceDictionary_2' in markup file 'Microsoft.VisualStudio.Xaml;component/MS/Internal/Designer/PropertyEditing/Resources/StylesCore.xaml.

Anyone have any suggestions?

EDIT: The designer works when I refer to log4net.dll in a new project, but why should I refer to it in every project?

+3
source share
2 answers

log4net , ResourceDictionary log4net. , WPF, log4net. , , .

+1

, , TargetFramework WPF ".NET Framework 4" ".NET- .NET Framework 4" ( VS2010 WPF) . , - dll ( ) dll Log4Net.

+2

Source: https://habr.com/ru/post/1742986/


All Articles