Home / Blog / VS2017 annoying WCF service host message on solution load
VS2017 annoying WCF service host message on solution load

VS2017 annoying WCF service host message on solution load

Since the upgrade to Visual Studio 2017 an annoying message box appears from Microsoft WCF Service Host.

The message is: "The target assembly contains no service types. You may need to adjust the Code Access Security policy of this assembly."

wcf service host warning message

This message is caused by a WCF service contract in your project. In Visual Studio 2015 this message does not appear or is silently ignored. The goods news, it will be fixed in an upcoming update of Visual Studio 2017, see the uservoice page. Thanks VS Team!

 

Update 26-10-2017:

The Visual Studio 2017 update did not fix the problem in all situations. In my case I have a service library (Class library) with WCF options enabled. The WCF options are not needed in my project as the service library is referenced by another project which is the server. The server project is hosted on a local IIS for development. The solution to get rid of the message on project load is to remove the WCF Options (<ProjectTypeGuids>{3D9AD99F-2412-4246-B90B-4EAA41C64699};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>) in the service library project.

So change this line in the project file:

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

to

<ProjectTypeGuids>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>