-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The predefined type 'System.Runtime.CompilerServices.ExtensionAttribute' is defined in multiple assemblies in the global alias #194
Comments
What references to test adapter classes exist in your project after adding the package? |
Hello, I just minimized number of refereferences and it still fails. We have quite agressive error treatment - all warnings are considered as errors (due of management requirements). May be this is due of this fact. |
Your project contains a bunch of MS test references as well as NUnit references. Why is that? Are you trying to use both kinds of tests in the same assembly? |
Generally we are migrating from MSTest to NUnit. So some artifacts could remain. |
Can we close this or is there still an issue? |
Still have error. |
So,if you still have the error after removing the extraneous references, does it indicate to you which assemblies provide duplicate definitions or is only one assembly listed in the message? |
Got same issue. The test project targets .Net fx 4.5.2. |
Are you saying your test project has a reference to nunit.engine? If so did you add it or did the nuget install do so? The adapter has a reference to the engine, but your project should have no need of it. |
Yes, the test project does have a direct reference to |
I confirm that adding the NuGet |
I had the same problem on my tfs build machine. There was a warning because of the nunit.engine reference. After removing the reference the warning is gone. I think the reference was set by nuget install. |
I believe the nuspec should be specifying the intended project references with I don't use the adapter. I assume it's just the Edit: Ah, just found the related #221. That would be another solution! |
The adapter is a tool and shouldn't be referenced at all. However, it was originally created using the lib directory because some old version of VS needed it to be there. We have an issue to fix this for 3.5. |
@CharliePoole Afaic see, this is fixed. The adapter is no longer added as reference to the project, so we should have no such issues. Suggest we can close this. |
I agree. |
After adding NUnit3TestAdapter to project (nuget) with tests stops building:
The predefined type 'System.Runtime.CompilerServices.ExtensionAttribute' is defined in
multiple assemblies in the global alias; using definition from 'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.1\mscorlib.dll' C:\Projects\WebProject\WebProject.Tests\error CS1685 WebProject.Tests
The text was updated successfully, but these errors were encountered: