ServiceStack using DotNetStandard Service Model in .Net framework web project

前端 未结 1 383
梦如初夏
梦如初夏 2021-01-22 03:45

We recently created a new DotNetCore web service using ServiceStack. The ServiceModel project is a DotNet Standard class library v2.0.

I am getting compiling errors w

相关标签:
1条回答
  • 2021-01-22 04:43

    If you want to support both classic ASP.NET Framework project and a .NET Core project you need to multi target. See this previous answer for details:

    https://stackoverflow.com/a/49417944/85785

    If you just want to support an ASP.NET Core .NET Framework project and a .NET Core project (I.e. both ASP.NET Core projects) you can reference ServiceStack’s *.Core projects which only contains .NET Standard builds.

    Alternatively you can avoid the binary coupling of sharing your ServiceModel.dll project and have the classic ASP.NET projects reference your DTOs via C# Add ServiceStack Reference.

    0 讨论(0)
提交回复
热议问题