|
I am getting an error in a C# 2008 application since I am trying to add the NLog open source tool to 2 different solution files.
I am completing the following task:
1. I add a reference to this dll in the references section of each proejct file.
2. I then place a 'using NLog' statment in each solution file.
No matter what I do, I can not remove 'System.Runtime.CompilerServices.ExtensionAttribute' is defined in multiple assemblies in the global alias;
Can you show me code and/or tell me how to fix this problem?I am getting the following warning and error message for a C# 2008 application I am working on:
Warning 17 The predefined type 'System.Runtime.CompilerServices.ExtensionAttribute' is defined in multiple assemblies in the global alias;
using definition from 'c:\Program Files (x86)\NLog\.NET Framework 2.0\NLog.dll' sample
Error 21 The type or namespace name 'Nlog' could not be found (are you missing a using directive or an assembly reference?) C:\Sample.cs 15 7 sample
|
|
|
|
|
Problem description isn't clear.
VS Studio 2008 (not C#) open a solution (one solution) which then has multiple projects.
In there you add a dll a a reference.
Then when you compile the solution you get that error.
Presumably that is what you mean.
If so I suspect that something is wrong with the compile options for the project. You can examine that in the properties of the project. You might start by looking at the targeted version of .Net that each project is using.
|
|
|
|
|
Okay, so we've identified that you and the poster below are the same person. Stop this now. Post as one person, and one person only.
[Edit]The proof is in the wording - from the post below:
"I am getting the following warning and error message for a C# 2008 application I am working on:
Warning 17 The predefined type 'System.Runtime.CompilerServices.ExtensionAttribute' is defined in multiple assemblies in the global alias;
using definition from 'c:\Program Files (x86)\NLog\.NET Framework 2.0\NLog.dll' sample
Error 21 The type or namespace name 'Nlog' could not be found (are you missing a using directive or an assembly reference?) C:\Sample.cs 15 7 samplef
I am getting this error message since I am trying to add the NLog open source tool to the solution file for 3 different project files in this solution.
I am completing the following task:
1. I add a reference to this dll in the references section of each proejct file.
2. I then place a 'using NLog' statment in each proejct file.
Can you show me code and/or tell me how to fix this problem?"
From this post:
"I am getting an error in a C# 2008 application since I am trying to add the NLog open source tool to 2 different solution files.
I am completing the following task:
1. I add a reference to this dll in the references section of each proejct file.
2. I then place a 'using NLog' statment in each solution file.
No matter what I do, I can not remove 'System.Runtime.CompilerServices.ExtensionAttribute' is defined in multiple assemblies in the global alias;
Can you show me code and/or tell me how to fix this problem?I am getting the following warning and error message for a C# 2008 application I am working on:
Warning 17 The predefined type 'System.Runtime.CompilerServices.ExtensionAttribute' is defined in multiple assemblies in the global alias;
using definition from 'c:\Program Files (x86)\NLog\.NET Framework 2.0\NLog.dll' sample
Error 21 The type or namespace name 'Nlog' could not be found (are you missing a using directive or an assembly reference?) C:\Sample.cs 15 7 sample"
modified 14-Nov-12 17:11pm.
|
|
|
|
|
Hadn't spotted that second post yet, but reading this one I thought of another post/user(?)...
Error 19[^]
Maybe we are dealing with 'unique' users and NLog really has a problem
|
|
|
|
|
Good catch - and rachel_m has displayed a tendency to being the same user as sc steinhayse as well. Linq[^] and Linq[^].
|
|
|
|
|
We should team up mate... you can be Batman, I'll be Robin
|
|
|
|
|
The general dead giveaway for me is the use of the phrase "C# v application" where v is either 2008 or 2010. They also tend to like to use "console application" and "windows service" a lot, as well. They always seem to end the post with the same general question.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Yup. Surely one organisation can't employ that many people who can't do the job, and put them on the same task.
|
|
|
|