我刚刚更新到最新版(1.4.91),当涉及到属性的camelCasing时,一切都被打破了:(
不幸的是,发布中似乎没有任何重大变化,但我怀疑这方面的设置方式发生了重大变化。之前我们使用的是标准的Reinforced.Typings.settings.xml,我看到那里有一个新的TsGlobal,但即便设置似乎没什么帮助。
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<RtTargetFile>$(ProjectDir)\Scripts\typings\css\CS.Interfaces.ts</RtTargetFile>
<RtConfigurationMethod></RtConfigurationMethod>
<RtWriteWarningComment>true</RtWriteWarningComment>
<RtExportPureTypings>false</RtExportPureTypings>
<RtDivideTypesAmongFiles>false</RtDivideTypesAmongFiles>
<RtTargetDirectory>$(ProjectDir)Scripts\MyApplication</RtTargetDirectory>
<RtRootNamespace>CabMD</RtRootNamespace>
<RtBypassTypeScriptCompilation>false</RtBypassTypeScriptCompilation>
<RtCamelCaseForMethods>false</RtCamelCaseForMethods>
<RtCamelCaseForProperties>true</RtCamelCaseForProperties>
<RtGenerateDocumentation>true</RtGenerateDocumentation>
<RtDisable>false</RtDisable>
</PropertyGroup>
<ItemGroup>
<RtAdditionalAssembly Include="CabMD.Schedule.dll"/>
</ItemGroup>
</Project>
<Assembly: TsGlobal(CamelCaseForMethods:=False, CamelCaseForProperties:=True, RootNamespace:="CabMD", GenerateDocumentation:=True)>
<TsInterface(Namespace:="CabMD.Models.WebAPI.Response")>
Public Class MasterNumberResult
<JsonProperty(PropertyName:="code")>
Public Property Code As String
<JsonProperty(PropertyName:="fullName")>
Public Property FullName As String
<JsonProperty(PropertyName:="category")>
Public Property Category As String
<JsonProperty(PropertyName:="name")>
Public Property Name As String
<JsonProperty(PropertyName:="shortName")>
Public Property ShortName As String
End Class
export interface IMasterNumberResult
{
Code: string;
FullName: string;
Category: string;
Name: string;
ShortName: string;
}
答案 0 :(得分:0)
我尝试使用RT单元测试调查此错误,但发现一切都按预期工作。
哪个汇编包含您的<Assembly: TsGlobal>
attribtue?它必须位于同一个程序集中,包含MasterNumberResult
类。