0

I have a PCL that contains a few WCF clients. Below is the project.json:

 "dependencies": {
    "NETStandard.Library": "1.6.1",
    "Newtonsoft.Json": "9.0.1",
    "System.ComponentModel.Annotations": "4.3.0",
    "System.Net.Http": "4.3.0",
    "System.Reflection": "4.3.0",
    "System.ServiceModel.NetTcp": "4.3.0",
    "System.ServiceModel.Primitives": "4.3.0"
},
  "frameworks": {
      "netstandard1.4": {}
}

All was going fine with asp.net core 1.0.1, but upon upgrading everything in my asp.net core project, all calls made by my wcf client fail with a terrible error:

An unhandled exception of type 'System.ExecutionEngineException' occurred in System.Private.CoreLib.ni.dll

the project.json for my asp.net core application is this:

{
 "dependencies": {
    "Microsoft.AspNetCore.Diagnostics": "1.1.0",
    "Microsoft.AspNetCore.Mvc": "1.1.0",
    "Microsoft.AspNetCore.Razor.Tools": {
         "version": "1.1.0-preview4-final",
          "type": "build"
    },
    "Microsoft.AspNetCore.Routing": "1.1.0",
    "Microsoft.AspNetCore.Server.IISIntegration": "1.1.0",
    "Microsoft.AspNetCore.Server.Kestrel": "1.1.0",
    "Microsoft.AspNetCore.StaticFiles": "1.1.0",
    "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.1.0",
    "Microsoft.Extensions.Configuration.Json": "1.1.0",
    "Microsoft.Extensions.Logging": "1.1.0",
    "Microsoft.Extensions.Logging.Console": "1.1.0",
    "Microsoft.Extensions.Logging.Debug": "1.1.0",
    "Microsoft.Extensions.Options.ConfigurationExtensions": "1.1.0",
    "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.1.0"
},

"tools": {
    "BundlerMinifier.Core": "2.2.306",
    "Microsoft.AspNetCore.Razor.Tools": "1.1.0-preview4-final",
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.1.0-preview4-final"
},

"frameworks": {
   "netcoreapp1.1": {
    "dependencies": {
      "Microsoft.NETCore.App": {
        "type": "platform",
        "version": "1.1.0"
    },
    "MySharedProject": {
      "target": "project"
    }
  },
  "imports": [
    "netstandard"
  ]
}
},
}

if I leave everything the same, and just change the version to 1.0.1 on the Microsoft.NETCore.App everything works fine. The last thing I see in the VS output window is a call to load System.Xml.XmlDocument package. Then it just crashes.

Mike_G
  • 14,627
  • 11
  • 63
  • 93

1 Answers1

0

This is a know issues with .NET Core 1.1: https://github.com/dotnet/core/blob/master/release-notes/1.1/1.1-known-issues.md#systemexecutionengineexception-in-systemsecuritycryptographyx509cerificatesdll-on-windows

Workaround: Set environment variable COMPlus_ReadyToRunExcludeList=System.Security.Cryptography.X509Certificates

Mike_G
  • 14,627
  • 11
  • 63
  • 93