emmanueltissera / umbraco-headless-uduf

Tee-Phrase website running on .NET Core 2.2 MVC with Umbraco Headless (beta)
1 stars 2 forks source link

Need to run in .NET Core 2.1 Compatibility mode #2

Open emmanueltissera opened 5 years ago

emmanueltissera commented 5 years ago

Setting the following to services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2); causes the following exception

System.InvalidOperationException
  HResult=0x80131509
  Message=Cannot use 'Umbraco.Headless.Client.Net.Web.UmbracoRouter' with Endpoint Routing.
  Source=Microsoft.AspNetCore.Mvc.Core
  StackTrace:
   at Microsoft.AspNetCore.Builder.MvcApplicationBuilderExtensions.UseMvc(IApplicationBuilder app, Action`1 configureRoutes)
   at TeePhrase.Startup.Configure(IApplicationBuilder app, IHostingEnvironment env) in ...\umbraco\umbraco-headless-uduf\TeePhrase\Startup.cs:line 54

https://github.com/emmanueltissera/umbraco-headless-uduf/blob/70b504875fbf46b84c8b04e01af0fc1206e8d3b7/TeePhrase/Startup.cs#L33

sitereactor commented 5 years ago

For the web assembly we don't set any explicit Compatibility version in the library as far as I can tell. We <TargetFramework>netstandard2.0</TargetFramework> in the csproj, but maybe we need to be more explicit in order for the library to work on newer versions of .net core as well.

sitereactor commented 5 years ago

I'm not sure why this is a problem, but I would suggest that you grab Shannon at uduf ... he would know :)