on3al
on3al

Reputation: 2140

Service Stack InvalidOperationException When Requesting /types/typescript

I'm using service stack to build an api on .Net Core and it all works well, but I would like to have access to the type links generated by the service, but when I request the type listing for typescript at /types/typescript I get:

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](IEnumerable1 source) at ServiceStack.NativeTypes.MetadataTypesGenerator.ToType(Type type) in /opt/lib/teamcity-agent/work/d09206570215629/src/ServiceStack/NativeTypes/NativeTypesMetadata.cs:line 331 at ServiceStack.NativeTypes.NativeTypesService.GenerateTypeScript(NativeTypesBase request, MetadataTypesConfig typesConfig) in /opt/lib/teamcity-agent/work/d09206570215629/src/ServiceStack/NativeTypes/NativeTypesService.cs:line 209 at ServiceStack.Host.ServiceRunner1.Execute(IRequest request, Object instance, TRequest requestDto) in /opt/lib/teamcity-agent/work/d09206570215629/src/ServiceStack/Host/ServiceRunner.cs:line 107Errors

Type links for all the other types work. I've confirmed this behavior on windows and linux.

Below is my project 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"
    }
  }
}

What is the best way to get this information to the service stack team? I'm not a commercial customer (yet)

Upvotes: 1

Views: 163

Answers (1)

mythz
mythz

Reputation: 143359

This should now be resolved from the v1.0.29 NuGet .Core packages on NuGet.

If you're referencing ServiceStack dependencies via wild card, e.g 1.0.* then running dotnet restore will install the latest version.

Upvotes: 1

Related Questions