You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
Error adding Microsoft.AspNetCore.SpaServices.1.0.0-beta-000007 to net451 project #181
Looking at the issues and nugets it seems like I should be able to use some of features on an existing
asp.net mvc app targeting net451?
But adding the SpaServices packages fails:
Attempting to gather dependency information for package 'Microsoft.AspNetCore.SpaServices.1.0.0-beta-000007' with respect to project 'WebApplication1', targeting '.NETFramework,Version=v4.5.1' Attempting to resolve dependencies for package 'Microsoft.AspNetCore.SpaServices.1.0.0-beta-000007' with DependencyBehavior 'Lowest' Resolving actions to install package 'Microsoft.AspNetCore.SpaServices.1.0.0-beta-000007' Resolved actions to install package 'Microsoft.AspNetCore.SpaServices.1.0.0-beta-000007' Removed package 'Newtonsoft.Json.6.0.4' from 'packages.config' Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)) Successfully uninstalled 'Newtonsoft.Json.6.0.4' from WebApplication1 Adding package 'Microsoft.AspNetCore.Cryptography.Internal.1.0.0' to folder 'C:\foo\WebApplication1\packages' Added package 'Microsoft.AspNetCore.Cryptography.Internal.1.0.0' to folder 'C:\foo\WebApplication1\packages' Install failed. Rolling back... Package 'Microsoft.AspNetCore.Cryptography.Internal.1.0.0' does not exist in project 'WebApplication1' Package 'Newtonsoft.Json.6.0.4' already exists in folder 'C:\foo\WebApplication1\packages' Removing package 'Microsoft.AspNetCore.Cryptography.Internal.1.0.0' from folder 'C:\foo\WebApplication1\packages' Removed package 'Microsoft.AspNetCore.Cryptography.Internal.1.0.0' from folder 'C:\foo\WebApplication1\packages' Failed to add reference to 'Microsoft.AspNetCore.Cryptography.Internal'.
I've tried with and existing 4.6.1 mvc app and a new empty mvc 451 app - all in vs2015 update 3
When you say "an existing MVC app", do you mean MVC 5 or less, or do you mean the new Microsoft.AspNetCore.Mvc framework running on the .NET 4.6.1 runtime?
The SpaServices package has a dependency on Microsoft.AspNetCore.Mvc, so it's only going to work with ASP.NET Core (though that can run on .NET 4.6.1). It doesn't support MVC 5 or earlier.
thanks Steve - as I expected - my scenario is an MVC5 app - got excited when I saw 451 as the target.
The reason its an MVC5 app is because it makes use of OData and SignalR - I think these are some way off for ASP.NET core?
Do you think its feasible to back port the spa services features to MVC5 ?
Do you think its feasible to back port the spa services features to MVC5 ?
I don't see any reason why it couldn't be made to work - there's nothing we do in SpaServices that fundamentally requires anything that's different in ASP.NET Core. So if you want to have a go at porting it, I'm sure you can succeed (even if it's a fair bit of work).
If this becomes a common request, we might even consider factoring out as much of Microsoft.AspNetCore.SpaServices as we could into some new package (e.g., Microsoft.AspNetCore.SpaServices.Implementation), and have the .Implementation package not take a dependency on ASP.NET Core, but just have .SpaServices take that dependency and act as an adapter on to the ASP.NET Core APIs. Then there could be a different package (e.g., Microsoft.AspNetCore.SpaServices.Mvc5) that also provides an adapter to the ASP.NET MVC 5 APIs.
I can't promise that we will do this, because I don't know that either (a) there'd be enough demand for it, or (b) that it would be clean and simple enough not to add maintenance costs in the future. It's just a thought in case lots of people ask for this.
I'll close this because there's no action for us to take at this moment, but please let us know if you choose to pursue any sort of porting or refactoring on your own. Would love to hear how easy or hard that turns out to be.
Looking at the issues and nugets it seems like I should be able to use some of features on an existing
asp.net mvc app targeting net451?
But adding the SpaServices packages fails:
Attempting to gather dependency information for package 'Microsoft.AspNetCore.SpaServices.1.0.0-beta-000007' with respect to project 'WebApplication1', targeting '.NETFramework,Version=v4.5.1' Attempting to resolve dependencies for package 'Microsoft.AspNetCore.SpaServices.1.0.0-beta-000007' with DependencyBehavior 'Lowest' Resolving actions to install package 'Microsoft.AspNetCore.SpaServices.1.0.0-beta-000007' Resolved actions to install package 'Microsoft.AspNetCore.SpaServices.1.0.0-beta-000007' Removed package 'Newtonsoft.Json.6.0.4' from 'packages.config' Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)) Successfully uninstalled 'Newtonsoft.Json.6.0.4' from WebApplication1 Adding package 'Microsoft.AspNetCore.Cryptography.Internal.1.0.0' to folder 'C:\foo\WebApplication1\packages' Added package 'Microsoft.AspNetCore.Cryptography.Internal.1.0.0' to folder 'C:\foo\WebApplication1\packages' Install failed. Rolling back... Package 'Microsoft.AspNetCore.Cryptography.Internal.1.0.0' does not exist in project 'WebApplication1' Package 'Newtonsoft.Json.6.0.4' already exists in folder 'C:\foo\WebApplication1\packages' Removing package 'Microsoft.AspNetCore.Cryptography.Internal.1.0.0' from folder 'C:\foo\WebApplication1\packages' Removed package 'Microsoft.AspNetCore.Cryptography.Internal.1.0.0' from folder 'C:\foo\WebApplication1\packages' Failed to add reference to 'Microsoft.AspNetCore.Cryptography.Internal'.I've tried with and existing 4.6.1 mvc app and a new empty mvc 451 app - all in vs2015 update 3
Should this work?