缺少“添加域服务类"在 Windows 10 上的 Visual Studio 2012 中 [英] Missing "Add Domain Service Class" in Visual Studio 2012 on Windows 10

查看:26
本文介绍了缺少“添加域服务类"在 Windows 10 上的 Visual Studio 2012 中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个需要维护的 Silverlight 5 应用程序.我想避免使用虚拟机.

I have a Silverlight 5 app that I need to do maintenance work on. I'd like to avoid a VM.

随着 .Net Framework 4.6.2 的发布(现在预览版)此错误已修复,因此应该可以在我的 Win 10 计算机上使用.我安装了 VS2012 以及 WCF RIA Services V1.0 SP1(和 Toolkit)以及 Silverlight 5 SDK.该项目在VS2012中构建并运行...

With the release of .Net Framework 4.6.2 (in preview right now) this bug has been fixed, so it should be possible on my Win 10 machine. I have VS2012 installed along with the WCF RIA Services V1.0 SP1 (and Toolkit) plus the Silverlight 5 SDK. The project builds and runs in VS2012...

但是在 VS2012 中,我缺少添加新域服务类"向导,我需要它来进行一些比较故障排除.根据这个答案此链接 该模板在 VS2013 和 VS2015 中被删除,这两个我还为其他项目安装了.

But within VS2012 I'm missing the "Add New Domain Service Class" wizard, which I need for some comparative troubleshooting. According to this answer and this link the template was removed in VS2013 and VS2015, both of which I also have installed for other projects.

如何在 VS2012 中恢复添加新域服务类"向导?

How can I get the "Add New Domain Service Class" wizard back in VS2012?

推荐答案

LightSwitch 不需要作为域服务类库模板的一部分创建的许多类和项目.相反,您可以:

LightSwitch doesn't require much of the classes and projects that are created as part of the Domain Service Class Library template. Instead you can just:

创建类库项目

添加对 System.ServiceModel.DomainServices.Server 程序集的引用

Add a reference to System.ServiceModel.DomainServices.Server assembly

使您的类继承自 System.ServiceModel.DomainServices.Server 命名空间中的 DomainService 类.

Make your class inherit from the DomainService class found in the System.ServiceModel.DomainServices.Server namespace.

有关更多信息 为 Visual Studio LightSwitch 2013-2015 创建 WCF RIA 服务

这篇关于缺少“添加域服务类"在 Windows 10 上的 Visual Studio 2012 中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆