我正在使用服務堆棧在.Net Core上構建api,並且它一切正常,但我想訪問服務生成的類型鏈接,但是當我請求類型清單打字稿在/類型/打字稿我得到:服務堆棧InvalidOperationException當請求/ types/typescript
Response Status Error CodeInvalidOperationExceptionMessageSequence contains no elementsStack Trace[TypesTypeScript: 11/12/2016 6:45:10 AM]: [REQUEST: {baseUrl:"http://localhost:55000"}] System.InvalidOperationException: Sequence contains no elements at System.Linq.Enumerable.First[TSource](IEnumerable
1在ServiceStack.NativeTypes.MetadataTypesGenerator.ToType(type類型)來源)在/ opt/lib中/ TeamCity的代理/工作/ d09206570215629/src目錄/ServiceStack/NativeTypes/NativeTypesMetadata.cs:line 331 at /opt/lib/teamcity-agent/work/d09206570215629/src/ServiceStack/NativeTypes/NativeTypesService.cs中的ServiceStack.NativeTypes.NativeTypesService.GenerateTypeScript(NativeTypesBase請求,MetadataTypesConfig typesConfig):第209行ServiceStack.Host.ServiceRunner 1.Execute(IRequest request, Object instance, TRequest requestDto) in /opt/lib/teamcity-agent/work/d09206570215629/src/ServiceStack/Host/ServiceRunner.cs:line 107Errors
鍵入所有其他類型工作的鏈接。我已經在Windows和Linux上確認了這種行爲。
以下是我的項目json。
{
"version": "1.0.0-*",
"buildOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.1"
},
"Microsoft.AspNetCore.Server.Kestrel": "1.0.1",
"Microsoft.AspNetCore.StaticFiles": "1.0.0",
"Microsoft.Data.SQLite": "1.0.*",
"ServiceStack.Core": "1.0.*",
"ServiceStack.Interfaces.Core": "1.0.*",
"ServiceStack.Text.Core": "1.0.*",
"ServiceStack.Client.Core": "1.0.*",
"ServiceStack.Common.Core": "1.0.*",
"ServiceStack.Server.Core": "1.0.*",
"ServiceStack.Admin.Core": "1.0.*",
"Npgsql": "3.1.*",
"ServiceStack.OrmLite.PostgreSQL.Core": "1.0.*",
"ServiceStack.OrmLite.Sqlite.Core": "1.0.*"
},
"frameworks": {
"netcoreapp1.0": {
"imports": "dnxcore50"
}
}
}
什麼是得到這個信息服務棧球隊最好的方法是什麼?我不是商業客戶(尚未)
這可以在servicestacks .net核心演示應用程序中複製https://github.com/NetCoreApps/Hello – on3al