How to Add a Reference to System.ServiceModel (WCF) to an ASP.NET 5 Application

I ran into a situation yesterday wherein I needed to add a reference to System.ServiceModel to an application using DNX RC1 Final Update 1 (if it's "final", why is there an update? I digress...).

To do this, I had to add a frameworkAssemblies property to the JSON object for dnx451 declared under frameworks in my project.json file, and then add the System.ServiceModel reference there, as shown below:

  "frameworks": {
    "dnx451": {
      "dependencies": {
        "CMS.Services.Contracts": "1.0.0-*",
        "CSharpSDK": "1.0.0-*"
      },
      "frameworkAssemblies": {
        "System.ServiceModel": "4.0.0.0"
      }
    }
  },

Comments

Popular Posts

How to Get Norton Security Suite Firewall to Allow Remote Desktop Connections in Windows

Resolving the "n timer(s) still in the queue" Error In Angular Unit Tests

The Cause and Solution for the "System.Runtime.Serialization.InvalidDataContractException: Type 'System.Threading.Tasks.Task`1[YourTypeHere]' cannot be serialized." Exception

How to Determine if a Column Exists in a DataReader

Setting Default Values in an Angular Reactive Form