In Visual Studio 2015 Preview (Pre Release), how can I add a service reference for a WCF service?
Edit: The new extension for adding a connected service as posted in other answers still did not work for me, but I found another working configuration, though it requires you don`t use dnxcore50:
Have Service model and needed serialization dll in "framework" section of project.json (dnxcore need to be removed)
"dnx451": {
"dependencies": {
"YourClassLibWillAppearHere": "1.0.0-*" // after you reference it
},
"frameworkAssemblies": {
"System.ServiceModel": "4.0.0.0",
"System.ServiceModel.Http": "4.0.0.0",
"System.Runtime.Serialization": "4.0.0.0"
}
}
You should be able to do where u need it:
using YourNameSpace.ServiceReference
Old Answer:
this worked for me:
I followed both the instructions at the same time provided under known issues for beta4 (find in page "WCF") at this link:
https://github.com/aspnet/Home/releases
so my steps where:
copied the whole
from app.config to web.config
copied all those missing dependencies list from the link above in project.json, under common dependencies, leaving alone the specific frameworks ones (trying to reference the dotnet4.6 class library as an aspnet framework dependency gave many missing types in that framework)
"dependencies": { >> here << }
"frameworks": {
"dnx451": { },
"dnxcore50": { }
}