Enable XSD as Type Definition Language is Disabled

这一生的挚爱 提交于 2019-12-11 08:59:30

问题


I came from this question : How to install Contract-First Tool in VisualStudio 2012

When I tried to perform the steps mentioned by the answer of that question, which is also what is mentioned in the topic Contract-First Tool, I faced the following problem: The options Enable XSD as type definition language and Validate WCF configuration when building the project are disabled.

The XML Schema generated is valid and it was taken from the aforementioned tutorial.

Why is that happening?


回答1:


Your assembly needs to target .NET 4.5 for this option to be enabled.




回答2:


Just try this (based on a hunch more than any scientific reasoning). Close your project and run Visual Studio as an administrator. (Ctrl + Shift + Enter when the shortcut is selected).

Then open the project and navigate to the properties screen again and let us know what's there.

It's the language ("Enable XSD as...") that suggests to me that there may be some administrative privilege required to get this to work.

I'd imagine any subsequent instances would be fine then.

FWIW I maintain two separate shortcuts for VS, one with normal privileges and the other with elevated privileges.



来源:https://stackoverflow.com/questions/16448413/enable-xsd-as-type-definition-language-is-disabled

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!