Jaysvcutil不生成任何类 [英] Jaysvcutil generates no classes
本文介绍了Jaysvcutil不生成任何类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我跑步:
JaySvcUtil.exe --metadataUri http://localhost:1578/Service.svc/$metadata --out Model.js -- namespace Model --v V2
输出为:
Requesting: http://localhost:1578/Service.svc/$metadata... done.
OData version: V2
结果文件:
(function(global, $data, undefined) {
})(window, $data);
推荐答案
有多种用于各种OData版本的edm命名空间.我首先尝试避免使用--v开关,而让JaySvcUtil.exe尝试确定正确的开关.
There are several edm-namespaces for various OData versions. I'd first try to avoid the --v switch and let JaySvcUtil.exe trying to determine the correct one.
如果这样不起作用,请在 https上检查受支持的名称空间版本. ://github.com/jaydata/JaySvcUtil/blob/master/Program.cs
If that doesn't work check the supported version of name-spaces at https://github.com/jaydata/JaySvcUtil/blob/master/Program.cs
public static Dictionary<string, string> NamespaceVersions = new Dictionary<string,string>
{
{"http://schemas.microsoft.com/ado/2007/05/edm", "V11" },
{"http://schemas.microsoft.com/ado/2006/04/edm", "V1" },
{"http://schemas.microsoft.com/ado/2008/09/edm", "V2" },
{"http://schemas.microsoft.com/ado/2009/08/edm", "V21" },
{"http://schemas.microsoft.com/ado/2009/11/edm", "V3" }
};
如果不在本地的主机是:1578/Service.svc/$ metadata,则在
If the one that is produced by localhost:1578/Service.svc/$metadata is not in there add an request at https://github.com/jaydata/JaySvcUtil/issues
这篇关于Jaysvcutil不生成任何类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文