After updating an app to NET 5, I was facing the following error:

‘IServiceCollection’ does not contain a definition for ‘AddSpaStaticFiles’ and no accessible extension method ‘AddSpaStaticFiles’ accepting a first argument of type ‘IServiceCollection’ could be found (are you missing a using directive or an assembly reference?)

 

Fixed this by installing 2 new packages:

 

 

https://stackoverflow.com/questions/53253526/iservicecollection-does-not-contain-a-definition-for-addspastaticfiles

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.