-
Notifications
You must be signed in to change notification settings - Fork 440
Support on MVC5 (.Net 4.5.1) #18
Comments
Just and update - this works with Beta6, not sure what is up with Beta8? Hopefully this will get resolved with RC1, but would be good to know the fix once it's addressed. |
It's a weird issue (and I think a bug in how references are resolved). If you manually add an assembly reference to your project to System.IO then it will work. That is, open the project manually and add a line like this "<Reference Include="System.IO" />" . |
@rposener it sounds like you're using MVC 6 on ASP.NET 5, not MVC 5 on ASP.NET 4.6. Are you sure which one it is? |
Yes, its an new branch of an old project. Actually found that installing beta 6 instead of the beta 8 build eliminates the issue. It is the data.protection package which will not resolve the system.io reference. Where would you get system.io anyway? I thought that was a nuget thing for .net 5 runtime? System.io as i understood was just a namespace within system for .net 4.5.1. |
I'm still confused - are you using MVC 6 on ASP.NET 5, or MVC 5 on ASP.NET 4.x? They cannot be mixed and matched - only those two configurations are supported. |
I am using MVC 5 on asp.net 4 - have not upgraded or changed my asp.net project. |
Oh, sorry, my bad - I completely forgot that WebHooks uses the new configuration and data protection APIs. |
So does that mean support for it ends with beta 6, or is that dependency expected to be fixed or changed? |
I just tried reproducing this issue and I couldn't see any errors. I created a new .NET 4.6 ASP.NET MVC 5 project (using all the defaults). Then I tried installing each of these packages:
And I had no issues compiling and running the app. Do you have more specific repro steps for this issue? |
BTW I should add that I can't think of any reason why DataProtection 1.0.0-beta6 would be the last version that works, so this is quite odd. |
It is the AzureStorage package. Looking at the Dependencies for https://www.nuget.org/packages/Microsoft.AspNet.WebHooks.Custom.AzureStorage/1.2.0-beta3a shows "beta6" and "beta5" dependencies which I believe are just not updated. When using the "Lowest" dependency match option in nuget it would create the dependency back to "System.IO" package. Can we get that package updated to point to all the current beta versions? |
The latest packages point all to beta 8, see a072ebf |
Hi, Im still getting this System.IO error with beta 8 dependencies trying to add Microsoft.AspNet.WebHooks.Custom.SqlStorage. The manual reference in the project file works though. Thanks. |
@vindberg Quick question: Did you try and add an assembly reference like this |
@HenrikFrystykNielsen Yes it works if the reference is added manually to the project file. Just thought it was fixed with the beta 8 update :) |
I'm still having the System.IO issue with rc1. |
Had the same System.IO issue and adding it manually to the project worked for me. |
Still the same issue, System.IO doesn't exist in the .net framework installed locally. Tried referencing the nuget package https://www.nuget.org/packages/System.IO/4.1.0-rc2-24027 and the .net 4.5 folder contains no dll?? |
Did you try and add this manually to the csproj file: Btw, this issue has been fixed with the upcoming RC2 drop of .NET core which we use a component from. |
Yeah I did try manually added a reference to the csproj. However System.IO doesn't seem to exist for .NET 4.5.* Does Microsoft.AspNet.WebHooks.Custom.AzureStorage need the reference? |
It isn't a real dll -- it's what's called a façade assembly which shouldn't be referenced under normal conditions. However, there is a bug in the ASP.NET DataProtection nugget package explicitly referencing it (see aspnet/DataProtection#117 for details). Regardless, if you just add the reference to your project then it will work on .NET 4.5.* |
That's new to me. Thanks for the info! |
When adding the required dependency to a .Net 4.6. MVC5 project, the Nuget package Microsoft.AspNet.DataProtection fails to add reporting
"Failed to add reference to 'System.IO'. Please make sure that it is in the Global Assembly Cache."
Not sure how to determine the best way to resolve since this occurs at the nuget package add. Any tips would be appreciated, or confirmation that this is a current bug in the build? Maybe is there a nightly build that I could get which would resolve?
The text was updated successfully, but these errors were encountered: