C# 如何将 WCF 模板添加到 Visual Studio Express?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/110451/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-03 14:18:59  来源:igfitidea点击:

How to add WCF templates to Visual Studio Express?

提问by Mike Kantor

I am working through the book Learning WCF by Michele Bustamante, and trying to do it using Visual Studio C# Express 2008. The instructions say to use WCF project and item templates, which are not included with VS C# Express. There aretemplates for these types included with Visual Studio Web Developer Express, and I've tried to copy them over into the right directories for VS C# Express to find, but the IDE doesn't find them. Is there some registration process? Or config file somewhere?

我正在阅读 Michele Bustamante 的《Learning WCF》一书,并尝试使用 Visual Studio C# Express 2008 来完成。说明中说要使用 WCF 项目和项模板,VS C# Express 中不包含这些模板。有这些类型包括与Visual Studio Web Developer速成模板,我试图在它们复制到正确的目录为VS C#Express来寻找,但是IDE不容易找到他们。有注册流程吗?还是某处的配置文件?

采纳答案by adondai

If you have both Visual Web Developer (VWD) 2008 and Visual C# (VC#) 2008 installed you can copy templates between them. The VWD template files live in (by default):

如果您同时安装了 Visual Web Developer (VWD) 2008 和 Visual C# (VC#) 2008,则可以在它们之间复制模板。VWD 模板文件位于(默认情况下):

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\VWDExpress

The VC# templates live in:

VC# 模板位于:

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\VCSExpress

Simply copy the templates between the two directories, they might not match exactly but they should be close enough to make sense, for instance I copied the project templates from VC# into VWD by copying files from:

只需在两个目录之间复制模板,它们可能不完全匹配,但它们应该足够接近以有意义,例如我通过从以下位置复制文件将项目模板从 VC# 复制到 VWD:

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\VCSExpress\ProjectTemplates33

into:

进入:

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\VWDExpress\ProjectTemplates\CSharp\Windows33

The templates won't appear straight away in the template browser. For VWD you need to run:

模板不会立即出现在模板浏览器中。对于 VWD,您需要运行:

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\VWDExpress.exe /installvstemplates

For VC# you run:

对于 VC#,您运行:

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\VCSExpress.exe /installvstemplates

回答by adondai

If you are a student you could get the full Visual Studio 2008 from DreamSparkfor free.

如果您是学生,您可以从DreamSpark免费获得完整的 Visual Studio 2008 。

回答by adondai

Mike,

麦克风,

Visual Web Developer 2008 Express will help you in working with WCF Projects.

Visual Web Developer 2008 Express 将帮助您处理 WCF 项目。

I have the following...

我有以下...

Microsoft Visual Studio 2008 Version 9.0.30729.1 SP Microsoft .NET Framework Version 3.5 SP1

Microsoft Visual Studio 2008 版本 9.0.30729.1 SP Microsoft .NET Framework 版本 3.5 SP1

Hope this helps.

希望这可以帮助。

Sanjeev

桑吉夫

回答by Jminadeo

As a be aware follow-up, I also had to run

作为一个注意后续行动,我也不得不跑

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\VWDExpress.exe /ResetSettings

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\VWDExpress.exe /ResetSettings

Aftercopying the templates and running the

经过复制的模板和运行

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\VWDExpress.exe /installvstemplats

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\VWDExpress.exe /installvstemplats

The IDE was crashing when it tried to enumerate the C# project templates tree. After running the ResetSettings, the tree iterated and the new templates were present.

IDE 在尝试枚举 C# 项目模板树时崩溃。运行 ResetSettings 后,树迭代并出现新模板。