89

This official Microsoft page says Microsoft.AspNetCore.SpaServices and Microsoft.AspNetCore.NodeServices are obsolete and "A simpler SPA frameworks integration mechanism is available" in Microsoft.AspNetCore.SpaServices.Extensions.

I can't find any documentation at all for Microsoft.AspNetCore.SpaServices.Extensions. There doesn't seem to be a corresponding namespace so I can't even find anything using IntelliSense.

The obsolescence announcement on GitHub is similarly vague.

Specifically, I'm trying to find out how to upgrade a call to app.UseWebpackDevMiddleware.

Where is the official documentation for Microsoft.AspNetCore.SpaServices.Extensions?

9
  • 1
    Not too encouraging news but maybe this is helpful. Commented Mar 3, 2021 at 13:47
  • One of the original intentions for having the Microsoft.AspNetCore.SpaServices was to integrate Angular development into Visual Studio with it's add-in. As the versions of Angular, Node.js and .NET Core changed so rapidly over the past two years most developers (like myself) have found it quite challenging and frustrating to keep up with the various versions of these dependencies without having the projects break whenever something gets upgraded such as one of the Node packages. My preference now is to develop SPA apps separately from the Web API and manage upgrades on each side separately. Commented May 5, 2021 at 2:02
  • @AndrewHalil I'd agree - I think the functionality provided was motivated by making an easy one-click VS template but there's too much behind-the-scenes "magic" and no explanation of how it works. Having said that, after throwing away the react part of the sample and replacing it with my own react project, I have done a few platform upgrades on both sides and nothing broke, but my project is still only a year old.
    – Andy
    Commented May 6, 2021 at 7:08
  • Regarding Jeanne's post - I've found this video helpful: youtube.com/watch?v=DH2yUVQDB0I&t=1975s
    – user10706046
    Commented Sep 25, 2021 at 20:50
  • 1
    there is more discussion on this issue here github.com/dotnet/AspNetCore.Docs/issues/18405
    – Andy
    Commented Sep 27, 2021 at 7:35

2 Answers 2

1

Here are some of the docs that may help, however they are not very detailed:
https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.spaservices?view=aspnetcore-6.0
https://learn.microsoft.com/en-us/aspnet/core/client-side/spa-services?view=aspnetcore-6.0

Microsoft.AspNetCore.SpaServices Namespace Provides types for hosting a Single Page Application (SPA).

SpaOptions Describes options for hosting a Single Page Application (SPA).

ISpaBuilder Defines a class that provides mechanisms for configuring the hosting of a Single Page Application (SPA) and attaching middleware.

2
  • This does indeed seem to be new documentation added since I asked the original question. The app I was working on was .Net 3.1 and is no longer being maintained, but hopefully this is at least a start for those trying to use this functionality now
    – Andy
    Commented Dec 15, 2021 at 18:42
  • Thanks @Andy, I don't know when it was added by yes, Microsoft needs better documentations of their new features. Commented Dec 17, 2021 at 5:21
0

Seeing as you're asking specifically about upgrading the call to app.UseWebpackDevMiddleware(), I found that this NuGet package does exactly that!

Not the answer you're looking for? Browse other questions tagged or ask your own question.