c# - why is my startup class not the same as all the examples? -


i've volunteered code reviewer asp.net project of buddy of mine. figured c# knowledge should able figure out enough of basics though know little of how asp.net structured , built. i'm assuming tons of packages installed nuget using mvc package version 5.2.3. 1 of suggestions use di , move data stuff data project don't have depend on ef. give examples of how started researching how add di mvc 5. 2 or 3 examples found mentioned adding few lines of code startup class, method doesn't match , throwing me loop. here class in question

using microsoft.owin; using owin;  [assembly: owinstartupattribute(typeof(permitchecker.startup))] namespace permitchecker {     public partial class startup     {         public void configuration(iappbuilder app)         {             //configureauth(app);         }     } } 

vs2015 complains partial on startup since there not multiple startup classes. compare class blog di (blog post) , says make configureservices method this, can see above don't have method.

public void configureservices(iservicecollection services) {     services.addmvc();     services.addsingleton<data>(); } 

so question, why don't i? blog post mvc 5, , think 5.2.3 qualifies mvc 5 i'm confused. sorry such basic question web development not strength @ all. if helps here listed packages.

<?xml version="1.0" encoding="utf-8"?> <packages>   <package id="antlr" version="3.4.1.9004" targetframework="net452" />   <package id="bootstrap" version="3.0.0" targetframework="net452" />   <package id="entityframework" version="6.1.3" targetframework="net452" />   <package id="jquery" version="1.10.2" targetframework="net452" />   <package id="jquery.validation" version="1.11.1" targetframework="net452" />   <package id="mandrill.net" version="2.2.12" targetframework="net452" />   <package id="microsoft.aspnet.identity.core" version="2.2.1" targetframework="net452" />   <package id="microsoft.aspnet.identity.entityframework" version="2.2.1" targetframework="net452" />   <package id="microsoft.aspnet.identity.owin" version="2.2.1" targetframework="net452" />   <package id="microsoft.aspnet.mvc" version="5.2.3" targetframework="net452" />   <package id="microsoft.aspnet.razor" version="3.2.3" targetframework="net452" />   <package id="microsoft.aspnet.web.optimization" version="1.1.3" targetframework="net452" />   <package id="microsoft.aspnet.webapi" version="5.2.3" targetframework="net452" />   <package id="microsoft.aspnet.webapi.client" version="5.2.3" targetframework="net452" />   <package id="microsoft.aspnet.webapi.core" version="5.2.3" targetframework="net452" />   <package id="microsoft.aspnet.webapi.webhost" version="5.2.3" targetframework="net452" />   <package id="microsoft.aspnet.webpages" version="3.2.3" targetframework="net452" />   <package id="microsoft.codedom.providers.dotnetcompilerplatform" version="1.0.0" targetframework="net452" />   <package id="microsoft.jquery.unobtrusive.validation" version="3.2.3" targetframework="net452" />   <package id="microsoft.net.compilers" version="1.0.0" targetframework="net452" developmentdependency="true" />   <package id="microsoft.owin" version="3.0.1" targetframework="net452" />   <package id="microsoft.owin.host.systemweb" version="3.0.1" targetframework="net452" />   <package id="microsoft.owin.security" version="3.0.1" targetframework="net452" />   <package id="microsoft.owin.security.cookies" version="3.0.1" targetframework="net452" />   <package id="microsoft.owin.security.facebook" version="3.0.1" targetframework="net452" />   <package id="microsoft.owin.security.google" version="3.0.1" targetframework="net452" />   <package id="microsoft.owin.security.microsoftaccount" version="3.0.1" targetframework="net452" />   <package id="microsoft.owin.security.oauth" version="3.0.1" targetframework="net452" />   <package id="microsoft.owin.security.twitter" version="3.0.1" targetframework="net452" />   <package id="microsoft.web.infrastructure" version="1.0.0.0" targetframework="net452" />   <package id="modernizr" version="2.6.2" targetframework="net452" />   <package id="newtonsoft.json" version="8.0.3" targetframework="net452" />   <package id="owin" version="1.0" targetframework="net452" />   <package id="respond" version="1.2.0" targetframework="net452" />   <package id="sendgrid" version="6.3.4" targetframework="net452" />   <package id="sendgrid.smtpapi" version="1.3.1" targetframework="net452" />   <package id="webgrease" version="1.5.2" targetframework="net452" /> </packages> 

there new version of asp.net known asp.net core 1.0 (previously named asp.net 5 / vnext). new version makes use of mvc 6 , 1 being described in blog post linked to.

the old / current version makes use of mvc 5. project using.

both project types supported in visual studio 2015. 1 quick way know version you're using web.config file in root of web project. if don't have 1 on new version.


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo