Missing references in source

I am trying to build ServiceStack.Core from source using the solution file in src folder. When I try to build it fails due to a lot of missing references, incompatible messages and downgrade alerts.

I tried installing the latest version of the sdk but still the same issue. Also tried running the bat files but didn’t help.

What is the process for getting ServiceStack compiling? I am trying to get it running from source so I can go to definition and have a look at code from my calling code and step through it to help me be able to figure some stuff out.

Each repo is self encapsulating, just restore all packages, open ServiceStack.sln and rebuild.

But you should checkout one of the releases instead as they’re only guaranteed to build as master could have pending .dll’s that are only checked in at each release.

A fresh checkout of tags/v5.2.0 and then build results in these errors:

Same thing with 5.1.

I ran restore from command prompt and it failed with this exception:

  Installing Microsoft.AspNetCore.Mvc.Razor.Host 1.1.2.
E:\Projects\ServiceStackSource\ServiceStack\tests\ServiceStack.Core.SelfHostTests\ServiceStack.Core.SelfHostTests.csproj : error NU1605: Detected package downgrade: System.Reflection.TypeExtensions from 4.3.0 to 4.1.0. Reference the package directly from the project to select a different version.
  [E:\Projects\ServiceStackSource\ServiceStack\src\ServiceStack.Core.sln]
E:\Projects\ServiceStackSource\ServiceStack\tests\ServiceStack.Core.SelfHostTests\ServiceStack.Core.SelfHostTests.csproj : error NU1605:  ServiceStack.Core.SelfHostTests -> Microsoft.NETCore.App 1.1.1 -> System.Reflection.TypeExtensions (>= 4.3.0)  [E:\Projects\ServiceStackSource\ServiceStack\src\ServiceStack.Core.sln]
E:\Projects\ServiceStackSource\ServiceStack\tests\ServiceStack.Core.SelfHostTests\ServiceStack.Core.SelfHostTests.csproj : error NU1605:  ServiceStack.Core.SelfHostTests -> System.Reflection.TypeExtensions (>= 4.1.0) [E:\Projects\ServiceStackSource\ServiceStack\src\ServiceStack.Core.sln]
E:\Projects\ServiceStackSource\ServiceStack\tests\ServiceStack.Core.SelfHostTests\ServiceStack.Core.SelfHostTests.csproj : error NU1605: Detected package downgrade: System.Reflection.TypeExtensions from 4.3.0 to 4.1.0. Reference the package directly from the project to select a different version.
  [E:\Projects\ServiceStackSource\ServiceStack\src\ServiceStack.Core.sln]
E:\Projects\ServiceStackSource\ServiceStack\tests\ServiceStack.Core.SelfHostTests\ServiceStack.Core.SelfHostTests.csproj : error NU1605:  ServiceStack.Core.SelfHostTests -> Microsoft.Data.Sqlite 1.1.0 -> NETStandard.Library 1.6.1 -> System.Linq.Expressions 4.3.0 -> System.Reflection.TypeExtensions (>= 4.3.0)  [E:\Projects\ServiceStackSource\ServiceStack\src\ServiceStack.Core.sln]
E:\Projects\ServiceStackSource\ServiceStack\tests\ServiceStack.Core.SelfHostTests\ServiceStack.Core.SelfHostTests.csproj : error NU1605:  ServiceStack.Core.SelfHostTests -> System.Reflection.TypeExtensions (>= 4.1.0) [E:\Projects\ServiceStackSource\ServiceStack\src\ServiceStack.Core.sln]
E:\Projects\ServiceStackSource\ServiceStack\tests\ServiceStack.Core.SelfHostTests\ServiceStack.Core.SelfHostTests.csproj : error NU1201: Project ServiceStack is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Project ServiceStack supports: [E:\Projects\ServiceStackSource\ServiceStack\src\ServiceStack.Core.sln]
E:\Projects\ServiceStackSource\ServiceStack\tests\ServiceStack.Core.SelfHostTests\ServiceStack.Core.SelfHostTests.csproj : error NU1201:   - net45 (.NETFramework,Version=v4.5) [E:\Projects\ServiceStackSource\ServiceStack\src\ServiceStack.Core.sln]
E:\Projects\ServiceStackSource\ServiceStack\tests\ServiceStack.Core.SelfHostTests\ServiceStack.Core.SelfHostTests.csproj : error NU1201:   - netstandard2.0 (.NETStandard,Version=v2.0) [E:\Projects\ServiceStackSource\ServiceStack\src\ServiceStack.Core.sln]
E:\Projects\ServiceStackSource\ServiceStack\tests\ServiceStack.Core.SelfHostTests\ServiceStack.Core.SelfHostTests.csproj : error NU1201: Project ServiceStack.Client is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Project ServiceStack.Client supports: [E:\Projects\ServiceStackSource\ServiceStack\src\ServiceStack.Core.sln]
E:\Projects\ServiceStackSource\ServiceStack\tests\ServiceStack.Core.SelfHostTests\ServiceStack.Core.SelfHostTests.csproj : error NU1201:   - net45 (.NETFramework,Version=v4.5) [E:\Projects\ServiceStackSource\ServiceStack\src\ServiceStack.Core.sln]
E:\Projects\ServiceStackSource\ServiceStack\tests\ServiceStack.Core.SelfHostTests\ServiceStack.Core.SelfHostTests.csproj : error NU1201:   - netstandard2.0 (.NETStandard,Version=v2.0) [E:\Projects\ServiceStackSource\ServiceStack\src\ServiceStack.Core.sln]
E:\Projects\ServiceStackSource\ServiceStack\tests\ServiceStack.Core.SelfHostTests\ServiceStack.Core.SelfHostTests.csproj : error NU1201: Project ServiceStack.HttpClient is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Project ServiceStack.HttpClient supports: [E:\Projects\ServiceStackSource\ServiceStack\src\ServiceStack.Core.sln]
E:\Projects\ServiceStackSource\ServiceStack\tests\ServiceStack.Core.SelfHostTests\ServiceStack.Core.SelfHostTests.csproj : error NU1201:   - net45 (.NETFramework,Version=v4.5) [E:\Projects\ServiceStackSource\ServiceStack\src\ServiceStack.Core.sln]
E:\Projects\ServiceStackSource\ServiceStack\tests\ServiceStack.Core.SelfHostTests\ServiceStack.Core.SelfHostTests.csproj : error NU1201:   - netstandard2.0 (.NETStandard,Version=v2.0) [E:\Projects\ServiceStackSource\ServiceStack\src\ServiceStack.Core.sln]
E:\Projects\ServiceStackSource\ServiceStack\tests\ServiceStack.Core.SelfHostTests\ServiceStack.Core.SelfHostTests.csproj : error NU1201: Project ServiceStack.Common is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Project ServiceStack.Common supports: [E:\Projects\ServiceStackSource\ServiceStack\src\ServiceStack.Core.sln]
E:\Projects\ServiceStackSource\ServiceStack\tests\ServiceStack.Core.SelfHostTests\ServiceStack.Core.SelfHostTests.csproj : error NU1201:   - net45 (.NETFramework,Version=v4.5) [E:\Projects\ServiceStackSource\ServiceStack\src\ServiceStack.Core.sln]
E:\Projects\ServiceStackSource\ServiceStack\tests\ServiceStack.Core.SelfHostTests\ServiceStack.Core.SelfHostTests.csproj : error NU1201:   - netstandard2.0 (.NETStandard,Version=v2.0) [E:\Projects\ServiceStackSource\ServiceStack\src\ServiceStack.Core.sln]
E:\Projects\ServiceStackSource\ServiceStack\tests\ServiceStack.Core.SelfHostTests\ServiceStack.Core.SelfHostTests.csproj : error NU1201: Project ServiceStack.Mvc is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Project ServiceStack.Mvc supports: [E:\Projects\ServiceStackSource\ServiceStack\src\ServiceStack.Core.sln]
E:\Projects\ServiceStackSource\ServiceStack\tests\ServiceStack.Core.SelfHostTests\ServiceStack.Core.SelfHostTests.csproj : error NU1201:   - net45 (.NETFramework,Version=v4.5) [E:\Projects\ServiceStackSource\ServiceStack\src\ServiceStack.Core.sln]
E:\Projects\ServiceStackSource\ServiceStack\tests\ServiceStack.Core.SelfHostTests\ServiceStack.Core.SelfHostTests.csproj : error NU1201:   - netstandard2.0 (.NETStandard,Version=v2.0) [E:\Projects\ServiceStackSource\ServiceStack\src\ServiceStack.Core.sln]
E:\Projects\ServiceStackSource\ServiceStack\tests\ServiceStack.Core.SelfHostTests\ServiceStack.Core.SelfHostTests.csproj : error NU1201: Project ServiceStack.Server is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Project ServiceStack.Server supports: [E:\Projects\ServiceStackSource\ServiceStack\src\ServiceStack.Core.sln]
E:\Projects\ServiceStackSource\ServiceStack\tests\ServiceStack.Core.SelfHostTests\ServiceStack.Core.SelfHostTests.csproj : error NU1201:   - net45 (.NETFramework,Version=v4.5) [E:\Projects\ServiceStackSource\ServiceStack\src\ServiceStack.Core.sln]
E:\Projects\ServiceStackSource\ServiceStack\tests\ServiceStack.Core.SelfHostTests\ServiceStack.Core.SelfHostTests.csproj : error NU1201:   - netstandard2.0 (.NETStandard,Version=v2.0) [E:\Projects\ServiceStackSource\ServiceStack\src\ServiceStack.Core.sln]
E:\Projects\ServiceStackSource\ServiceStack\tests\ServiceStack.Core.SelfHostTests\ServiceStack.Core.SelfHostTests.csproj : error NU1201: Project ServiceStack.Kestrel is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Project ServiceStack.Kestrel supports: netstandard2.0 (.NETStandard,Version=v2.0) [E:\Projects\ServiceStackSource\ServiceStack\src\ServiceStack.Core.sln]
E:\Projects\ServiceStackSource\ServiceStack\tests\ServiceStack.Core.SelfHostTests\ServiceStack.Core.SelfHostTests.csproj : error NU1201: Project ServiceStack.Api.Swagger is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Project ServiceStack.Api.Swagger supports: [E:\Projects\ServiceStackSource\ServiceStack\src\ServiceStack.Core.sln]
E:\Projects\ServiceStackSource\ServiceStack\tests\ServiceStack.Core.SelfHostTests\ServiceStack.Core.SelfHostTests.csproj : error NU1201:   - net45 (.NETFramework,Version=v4.5) [E:\Projects\ServiceStackSource\ServiceStack\src\ServiceStack.Core.sln]
E:\Projects\ServiceStackSource\ServiceStack\tests\ServiceStack.Core.SelfHostTests\ServiceStack.Core.SelfHostTests.csproj : error NU1201:   - netstandard2.0 (.NETStandard,Version=v2.0) [E:\Projects\ServiceStackSource\ServiceStack\src\ServiceStack.Core.sln]
  Restore failed in 25.7 sec for E:\Projects\ServiceStackSource\ServiceStack\tests\ServiceStack.Core.SelfHostTests\ServiceStack.Core.SelfHostTests.csproj.
  Restore completed in 33.32 sec for E:\Projects\ServiceStackSource\ServiceStack\tests\Mvc.Core.Tests\Mvc.Core.Tests.csproj.

I tried clearing all nuget caches. Any idea why the restore is failing? It seems to be conflicting versions of System.Reflection.TypeExtensions.

dotnet restore ServiceStack.sln runs fine without any errors. It is dotnet restore ServiceStack.Core.sln that has the error

Open ServiceStack.sln not ServiceStack.Core.sln, each project multi-targets both .NET Standard and .NET Framework builds.

ahhh, ok sorry I didn’t understand this.