Skip to content
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

Serializable attribute exists in both System.Runtime.Serialization.Formatters and nunit.framework #248

Closed
SerhiiS-in6k opened this issue Aug 16, 2016 · 2 comments

Comments

@SerhiiS-in6k
Copy link

Hi I have issue with Serializable attribute

The type 'SerializableAttribute' exists in both 'System.Runtime.Serialization.Formatters, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'nunit.framework, Version=3.4.1.0.

How can I specify the package to use? My project.json :

{
  "version": "1.0.0-*",
  "testRunner": "nunit",
  "buildOptions": {
    "debugType": "portable",
    "allowUnsafe": true,
    "define": [ "WIN64" ]
  },
  "frameworks": {
    "netcoreapp1.0": {
      "buildOptions": {
        "compile": {
          "exclude": [ "Tests/**/*.cs", "Examples/**/**/AssemblyInfo.cs" ]
        },
        "define": [ "NETSTANDARD1_6" ]
      },
      "dependencies": {
        "NETStandard.Library": "1.6.0",
        "System.Runtime": "4.1.0",
        "System.Runtime.Serialization.Formatters": "4.0.0-rc3-24212-01",
        "System.Dynamic.Runtime": "4.0.11",
        "System.Threading.ThreadPool": "4.0.10",
        "System.Reflection.TypeExtensions": "4.1.0",
        "System.Diagnostics.StackTrace": "4.0.1",
        "System.Diagnostics.Process": "4.1.0",
        "System.Threading.Thread": "4.0.0",
        "dotnet-test-nunit": "3.4.0-beta-1",
        "NUnit": "3.4.1"
      },
      "imports": "dnxcore50"
    },
    "net451": {
      "dependencies": {
        "NUnit": "3.4.1",
        "dotnet-test-nunit": "3.4.0-alpha-2"
      },
      "buildOptions": {
        "compile": {
          "exclude": [ "Tests/**/*.cs", "Tests/service-bus-tests-net4/Properties/AssemblyInfo.cs", "Examples/service-example-csharp-dispatcher/Properties/AssemblyInfo.cs", "Examples/service-example-csharp/Properties/AssemblyInfo.cs" ]
        }
      }
    }
  },
  "runtimes": {
    "ubuntu.14.04-x64": {},
    "win10-x64": {},
    "win7-x64": {}
  }
}

@svick
Copy link
Contributor

svick commented Aug 16, 2016

The issue is that nunit.framework declares System.SerializableAttribute. I think you will have to ask NUnit to stop doing that, at least for the future released version of netstandard that will contain SerializableAttribute. What you're using is a pre-release version of System.Runtime.Serialization.Formatters, I don't think NUnit should be made to depend on that.

@weshaggard
Copy link
Member

lets use https://github.com/dotnet/corefx/issues/10822 for this issue so closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants