Compiler errors after updating Microsoft.Aspnet.Identity in MVC5

Using the Vs2013 preview, I created C # webapp by selecting MVC and WebAPI from the dialog box. It is compiled. If I update links from the nuget package manager to beta2 (including Prerelease), then it will not compile. I get 21 errors located in AccountController.cs and IdentityConfig.cs. I tried updating to the latest nightly libraries that gave the same errors. Appreciate the preview code, so start again with the template. I wonder if anyone knew which link I could avoid updating.

Error 1 The call is ambiguous between the following methods or properties: 'Microsoft.AspNet.Identity.IdentityExtensions.GetUserId (System.Security.Principal.IIdentity)' as well as' Microsoft.AspNet.Identity.IdentityExtensions.GetUserId (System.Security.Principal.IIdentity ) 'C: \ Users \ Administrator \ Documents \ Visual Studio 2013 \ Projects \ vs2013bootstrap \ vs2013bootstrap \ Controllers \ AccountController.cs 115 29 vs2013bootstrap Error 2 The call is ambiguous between the following methods or properties:' Microsoft.AspNet.Identity.IdentityExtensions.GetUserId ( System.Security.Principal.IIdentity) 'as well as' Microsoft.AspNet.Identity.IdentityExtensions.GetUserId (System.Security.Principal.IIdentity)' C: \ Users \ Administrator \ Documents \ Visual studio 2013 \ Projects \ vs2013bootstrap \ vs2013bootstrap \ Controllers \ AccountController.cs 138 64 vs2013bootstrap Error 3 Call neod assigned between the following methods or properties: 'Microsoft.AspNet.Identity.IdentityExtensions.GetUserId (System.Security.Principal.IIdentity)' and also 'Microsoft.AspNet.Identity.IdentityExtensions.GetUserId (System.Security.Principal.IIdentity)' C : \ Users \ Administrator \ Documents \ Visual Studio 2013 \ Projects \ vs2013bootstrap \ vs2013bootstrap \ Controllers \ AccountController.cs 151 29 vs2013bootstrap Error 4 The call is ambiguous between the following methods or properties: 'Microsoft.AspNet.Identity.IdentityExtensions.GetUserId (System.Security .Principal.IIdentity) 'as well as' Microsoft.AspNet.Identity.IdentityExtensions.GetUserId (System.Security.Principal.IIdentity)' C: \ Users \ Administrator \ Documents \ Visual studio 2013 \ Projects \ vs2013bootstrap \ vs2013bootstrap \ Controllers \ AccountController .cs 152 64 vs2013bootstrap Error 5 The call is ambiguous between methods or properties: 'Microsoft.AspNet.Identity.IdentityExtensions.GetUserName (System.Security.Principal.IIdentity)' and also 'Microsoft.AspNet.Identity.IdentityExtensions.GetUserName (System.Security.Principal.IIdentity)' C: \ Users \ Administrator \ Documents \ Visual Studio 2013 \ Projects \ vs2013bootstrap \ vs2013bootstrap \ Controllers \ AccountController.cs 185 41 vs2013bootstrap Error 6 The call is ambiguous between the following methods or properties: 'Microsoft.AspNet.Identity.IdentityExtensions.GetUserId (System.Security.Pral .IIdentity) 'as well as' Microsoft.AspNet.Identity.IdentityExtensions.GetUserId (System.Security.Principal.IIdentity)' C: \ Users \ Administrator \ Documents \ Visual studio 2013 \ Projects \ vs2013bootstrap \ vs2013bootstrap \ Controllers \ AccountController.cs 249 52 vs2013bootstrap Error 7 The call is ambiguous between the following methods and or properties: "Microsoft.AspNet.Identity.IdentityExtensions.FindFirstValue (System.Security.Claims.ClaimsIdentity, string) and" Microsoft.AspNet.Identity.IdentityExtensions.FindFirstValue (System.Security.Claims.ClaimsIdentity, string) 'C: \ Users \ Administrator \ Documents \ Visual Studio 2013 \ Projects \ vs2013bootstrap \ vs2013bootstrap \ Controllers \ AccountController.cs 286 86 vs2013bootstrap Error 8 The call is ambiguous between the following methods or properties: 'Microsoft.AspNet.Identity.IdentityExtensions.GetUserId (System.Security. Principal.IIdentity) 'as well as' Microsoft.AspNet.Identity.IdentityExtensions.GetUserId (System.Security.Principal.IIdentity)' C: \ Users \ Administrator \ Documents \ Visual Studio 2013 \ Projects \ vs2013bootstrap \ vs2013bootstrap \ Controllers \ AccountController. cs 338 61 vs2013bootstrap Error 9 'Microsoft.AspNet.Identity.IUserSecretStore' does not contain the definition "Update Secret "and the extension method 'UpdateSecret' Taking the first argument of the type" Microsoft.AspNet.Identity.IUserSecretStore "you can find (are you missing the using directive or assembly link?) C: \ Users \ Administrator \ Documents \ Visual Studio 2013 \ Projects \ vs2013bootstrap \ vs2013bootstrap \ Controllers \ AccountController.cs 376 57 vs2013bootstrap Error 10 The metadata file 'C: \ Users \ Administrator \ Documents \ Visual Studio 2013 \ Projects \ vs2013bootstrap \ vs2013bootstrap \ Bin \ vs2013bootstrap.dll "could not be found. C: \ Users \ Administrator \ Documents \ Visual Studio 2013 \ Projects \ vs2013bootstrap \ vs2013bootstrap.Tests \ CSC vs2013bootstrap.Tests Error 11 The type or name of the namespace 'DbContextFactory' cannot be (do you miss the use directive or build link?) C : \ Users \ Administrator \ Documents \ Visual Studio 2013 \ Projects \ vs2013bootstrap \ vs2013bootstrap \ App_Start \ IdentityConfig.cs 32 40 vs2013bootstrap Error 12 "UserSecret" is an ambiguous link between "Microsoft.AspNet.Identity.EntityFramework.UserSecret" vs'. Models.UserSecret 'C: \ Users \ Administrator \ Documents \ Visual Studio 2013 \ Projects \ vs2013bootstrap \ vs2013bootstrap \ App_Start \ IdentityConfig.cs 33 45 vs2013bootstrap Error 13 The type or name of the EFUserSecretStore namespace cannot be (you are missing the directive used ia or assembly link?) C: \ Users \ Administrator \ Documents \ Visual Studio 2013 \ Projects \ vs2013bootstrap \ vs2013bootstrap \ App_Start \ IdentityConfig.cs 33 27 vs2013bootstrap Error 14 "UserLogin" - ambiguous link between "Microsoft.AspNet.Identity.EntityFramework .UserLogin "and 'vs2013bootstrap.Models.UserLogin' C: \ Users \ Administrator \ Documents \ Visual studio 2013 \ Projects \ vs2013bootstrap \ vs2013bootstrap \ App_Start \ IdentityConfig.cs 34 43 vs2013bootstrap Error 15 Type or namespace name EFUoreLog do you miss the use directive or build link?) C: \ Users \ Administrator \ Documents \ Visual Studio 2013 \ Projects \ vs2013bootstrap \ vs2013bootstrap \ App_Start \ IdentityConfig.cs 34 26 vs2013bootstrap Error 16 "User" is an ambiguous link between "Microsoft.AspNet .Identity.EntityFramework.User "and 'vs2013bootstrap.Models.User' C: \ Users \ Administrator \ Documents \ Visual studio 2013 \ Projects \ vs2013bootstrap \ vs2013bootstrap \ App_Start \ IdentityConfig.cs 35 37 vs2013bootstrap Error 17 Type or namespace EUF namespace could not be found (do you miss the use directive or build link?) C: \ Users \ Administrator \ Documents \ Visual Studio 2013 \ Projects \ vs2013bootstrap \ vs2013bootstrap \ App_Start \ IdentityConfig.cs 35 25 vs2013bootstrap Error 18 "Role" is an ambiguous link between "Microsoft.AspNet.Identity.EntityFramework.Role" and 'vs2013bootstrap.Models.Role' C: \ Users \ Administrator \ Documents \ Visual studio 2013 \ Projects \ vs2013bootstrap \ vs2013bootstrap \ App_Start \ IdentityConfig.cs 36 37 vs2013bootRolestrap Error 19 " "- ambiguous link between" Microsoft.AspNet.Identity.En tityFramework.UserRole "and 'vs2013bootstrap.Models.UserRole' C: \ Users \ Administrator \ Documents \ Visual studio 2013 \ Projects \ vs2013bootstrap \ vs2013bootstrap \ App_Start \ IdentityConfig.cs 36 43 vs2013bootstrap Error 20 Type or namespace name EFRole could not be found (Do you miss the use directive or build link?) C: \ Users \ Administrator \ Documents \ Visual Studio 2013 \ Projects \ vs2013bootstrap \ vs2013bootstrap \ App_Start \ IdentityConfig.cs 36 25 vs2013bootstrap Error 21 The call is ambiguous between the following methods or properties: "Microsoft .AspNet.Identity.IdentityExtensions.FindFirstValue (System.Security.Claims.ClaimsIdentity, string) and Microsoft.AspNet.Identity.IdentityExtensions.FindFirstValue (System.Security.Claims.ClaimsIdentity, string) 'C: \ Users \ Administrator \ Documents \ Visual Studio 2013 \ Projects \ vs2013boots trap \ vs2013bootstrap \ App_Start \ IdentityConfig.cs 95 24 vs2013bootstrap

UPDATE If I start from scratch with the same template and upgrade only MVC and WEBAPI libraries to 5.0.0-beta2 (or 3.0.3-beta2 in case of Razor). then my application is still compiling. The updates I used were those that were flagged with 1.1.0-beta2 and are called since Microsoft.Owin.Security

UPDATE2 if I then add all the Owin security links that it still compiles. Leaving two libraries

  • Microsoft.Aspnet.Identity.Core, which is currently 1.0.0-Alpha1 (Update 1.0.0-Beta1)
  • Microsoft.AspNet.Identity.EntityFramework, which is currently 1.0.0-Alpha1 (update 1.0.0-beta1).

If I update the first library, I get the above fat error, if I then update the second, I get all other errors.

Therefore, these updates are not compatible with other beta versions.

+2
visual-studio-2013 asp.net-mvc-5 asp.net-identity
Jul 03 '13 at 6:31
source share
1 answer

I think I finally found a resource that meets this. There is an asp.net/vs2013 update that updates templates to Identity beta preview and removes breaking changes

+3
Jul 04 '13 at 6:45
source share



All Articles