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

Platform not supported errors since update from 2.3.0-beta5 to 2.3.0-rc1 #1478

Closed
axelheer opened this issue Oct 3, 2017 · 10 comments
Closed

Comments

@axelheer
Copy link

axelheer commented Oct 3, 2017

Since upgrading to the newest version all integration tests using sql connections fail with:

System.NotSupportedException : The keyword 'integrated security' is not supported on this platform.

Repro:

using System;
using System.Data.SqlClient;
using Xunit;

namespace XUnitIssue
{
    public class UnitTest1
    {
        [Fact]
        public void Test1()
        {
            var connectionString = @"Data Source=(LocalDB)\MSSQLLocalDB; Initial Catalog=master; Integrated Security=true;";

            new SqlConnection(connectionString).Open();
        }
    }
}
<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>netcoreapp1.1</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="System.Data.SqlClient" Version="4.3.1" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
    <PackageReference Include="xunit" Version="2.3.0-rc1-build3809" />
    <PackageReference Include="xunit.runner.visualstudio" Version="2.3.0-rc1-build3809" />
  </ItemGroup>

  <ItemGroup>
    <DotNetCliToolReference Include="dotnet-xunit" Version="2.3.0-rc1-build3809" />
  </ItemGroup>

</Project>

Notes:

  • executing dotnet test succeeds, only dotnet xunit fails
  • changing the version numbers back to 2.3.0-beta5-build3769 solves the problem
@bradwilson
Copy link
Member

What target platform (OS, .NET SDK version #, etc.) are you running this on?

@axelheer
Copy link
Author

axelheer commented Oct 3, 2017

Windows 7, .NET Core 1.1.4, .NET Core SDK 2.0.0

@bradwilson
Copy link
Member

Found the bug... it was trying to use the unix version of the SqlClient assembly instead of the win version. Glad you caught this! Thanks!

@bradwilson
Copy link
Member

Hmm, not quite finished yet:

System.DllNotFoundException : Unable to load DLL 'sni.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

@bradwilson bradwilson reopened this Oct 4, 2017
@bradwilson
Copy link
Member

Finally got it figured out, once again due to the awesomeness of @natemcmaster. :) This will be fixed in RC 2.

@andreabalducci
Copy link

same issue updating dotnet-xunit from 2.3.0-beta1-build3642 to 2.3.1.
Platform MacOs
Dotnet 2.0.0

2.3.0-beta1-build3642
test ok

2.3.1
System.PlatformNotSupportedException : System.Data.SqlClient is not supported on this platform.

@andreabalducci
Copy link

Failing on appveyor too (with different message) https://ci.appveyor.com/project/andreabalducci/nstore/build/1.0.418

Working build (2.3.0 beta1)
https://ci.appveyor.com/project/andreabalducci/nstore/build/1.0.417

@bradwilson
Copy link
Member

@andreabalducci Please open an new issue with a repro project.

@bradwilson
Copy link
Member

Also, your AppVeyor error is unrelated, and is actually this non-bug: #1573

@andreabalducci
Copy link

related issue with repro prj #1585

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