Windows Communication Foundation (WCF) has been a part of the full .NET framework for years. This WCF repository contains source code for all the client libraries originally available for the Windows Store but made compatible with the new .NET Core Runtime.
Microsoft published WCF to GitHub, with the following goals:
- Establish a high-quality open source .NET implementation of the WCF client libraries.
- Work with the open source community to manage and extend the available libraries.
To report an issue or just to open the discussion for a proposed feature, open a New Issue. Please assign labels to associate it with the appropriate library if you know it. Example: "System.ServiceModel.Http".
Please read Contributing to .NET Core before making your first contribution.
The WCF repository can be built from a regular, non-admin command prompt using build.cmd on Windows or build.sh on other platforms. This build produces assets including a single System.Private.ServiceModel assembly that implements the individual client libraries.
Microsoft uses this repository to create and publish separate NuGet packages for each library.
The repository is a work in progress, and not all of the libraries are complete yet.
Unit tests are those that test aspects of the WCF libraries that don't require network interactions. To build the product and run the unit tests, from the root of the repository simply execute this command on Windows:
build.cmd
or this command on Linux or OS X:
./build.sh
Scenario tests are those tests that involve network activity between the client tests and WCF test services. By default, they are not run with normal build.cmd or build.sh.
To run the scenario tests on Windows, execute this CMD from the root of the repository. It will automatically start a self-hosted WCF test service on the same Windows machine and shut it down at the end of execution of all tests.
build.cmd /p:WithCategories=OuterLoop
To run scenario tests against an already running WCF test service, you will need to specify the base address
of the WCF test service by using the /p:ServiceUri
parameter. This is also necessary when running
scenario tests on Linux or OS X as the WCF service can only run on Windows.
From the root of the repository, run this command to run scenario tests on Windows:
build.cmd /p:WithCategories=OuterLoop /p:ServiceUri=[WCFTestServiceBaseAddress]
or run this command to run scenario tests on Linux or OS X. Note some of security related tests require extra manual setup to work, see Linux manual test guide for details.
./build.sh /p:WithCategories=OuterLoop /p:ServiceUri=[WCFTestServiceBaseAddress]
You will need to replace [WCFTestServiceBaseAddress]
in above commands with an actual value.
See Scenario test guide
for further details including how to start a WCF test service.
Note: in case you need to run scenario tests against a different WCF service, you can either use environment variable ServiceUri
to override the old value passed by /p:ServiceUri
or clean up Infrastructure.Common
directory of your current build under bin
before calling above commands again.
You can also obtain detailed code coverage information by including an additional property when you run the build script. For example, this CMD runs the scenario tests and collects code coverage numbers on Windows:
build.cmd /p:WithCategories=OuterLoop /p:Coverage=true
Once it is done, the result can be found at bin\tests\coverage\index.html
.