What steps do I need to take to convert from a class library to a WCF?

前端 未结 2 1175
我在风中等你
我在风中等你 2021-01-18 06:51

I created a project as a Class Library. Now I need to make it into a WCF. I can create a WCF project, but I would like to avoid all that fuss with TFS. I\'ve done the App.co

2条回答
  •  孤街浪徒
    2021-01-18 07:29

    I discovered the following doing the opposite to what you are trying to achieve, i.e. changing a service library to a console application..

    some of the settings in the csproj files cannot be edited from the settings screen from within VS to convert an class library to a WCF Service Library you need to add the following to your project file

    Add the following to the first PropertyGroup [these are the guids for a C# WCF Project]

    {3D9AD99F-2412-4246-B90B-4EAA41C64699};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
    

    See here for further information on ProjectTypeGuids

    You may also need to add the following line immediately below:

    /client:"WcfTestClient.exe"
    

    But ultimately it's the PropertyTypeGuids that you need to manually insert to get VS to recognise the project as a WCF Service Library Project.

提交回复
热议问题