5
votes

Several months ago I created an ASP.NET MVC project and I created it with the default authentification option: "Individual User Account", not on purpose.

My project runs well now but I don't need any authentification methods and so I don't need the Identity and OWIN packages.

Is there a clean way to delete all of those? Those packages are not needed by any other features right?

Thx!

1
One idea is to read this article from the bottom to the top: asp.net/identity/overview/getting-started/…Razvan Dumitru

1 Answers

18
votes

It is simple just some uninstalling an removing some files. First uninstall following package in package manage console:

PM> uninstall-Package Microsoft.Owin.Security.Facebook
PM> uninstall-Package Microsoft.Owin.Security.Google
PM> uninstall-Package Microsoft.Owin.Security.MicrosoftAccount
PM> uninstall-Package Microsoft.Owin.Security.Twitter
PM> uninstall-Package Microsoft.Owin.Host.SystemWeb
PM> uninstall-Package Microsoft.AspNet.Identity.EntityFramework
PM> uninstall-Package Microsoft.AspNet.Identity.Owin

If everything goes right your project must clean up with following packeges:

Microsoft.AspNet.Identity.Core
Microsoft.AspNet.Identity.EntityFramework
Microsoft.AspNet.Identity.Owin
Microsoft.Owin
Microsoft.Owin.Host.SystemWeb
Microsoft.Owin.Security
Microsoft.Owin.Security.Cookies
Microsoft.Owin.Security.Facebook
Microsoft.Owin.Security.Google
Microsoft.Owin.Security.MicrosoftAccount
Microsoft.Owin.Security.OAuth
Microsoft.Owin.Security.Twitter
Owin

So if anyone still exist simply uninstall them also.

Now you could remove following files from your project:

App_Start\IdentityConfig.cs
App_Start\Startup.Auth.cs
Models\IdentityModels.cs
Startup.cs