{"id":21962,"date":"2013-10-22T11:50:17","date_gmt":"2013-10-22T18:50:17","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/aspnet\/?p=21962"},"modified":"2013-10-22T11:50:17","modified_gmt":"2013-10-22T18:50:17","slug":"adding-core-references-support-in-an-asp-net-empty-project","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/adding-core-references-support-in-an-asp-net-empty-project\/","title":{"rendered":"Adding Core References Support in an ASP.NET Empty Project"},"content":{"rendered":"<p>Adding Core References Support in an ASP.NET Empty Project<\/p>\n<h2>Brief<\/h2>\n<p>In Visual Studio 2013 we introduced the core reference framework to ASP.NET project creation. You can choose what core references you want in your to-be-created project.<\/p>\n<h2>How<\/h2>\n<p>Let\u2019s take the example of adding Web API core references in an<br \/>\nEmpty ASP.NET Project<\/p>\n<ul>\n<li>Open Visual Studio 2013 New Project Dialog<\/li>\n<li>Choose \u201cASP.NET Web Application\u201d under \u201cWeb\u201d\u00a0<br \/>\n<a href=\"https:\/\/msdnshared.blob.core.windows.net\/media\/MSDNBlogsFS\/prod.evol.blogs.msdn.com\/CommunityServer.Blogs.Components.WeblogFiles\/00\/00\/00\/63\/56\/7103.fig1.png\"><img decoding=\"async\" src=\"https:\/\/msdnshared.blob.core.windows.net\/media\/MSDNBlogsFS\/prod.evol.blogs.msdn.com\/CommunityServer.Blogs.Components.WeblogFiles\/00\/00\/00\/63\/56\/7103.fig1.png\" alt=\"\" border=\"0\" \/><\/a><\/li>\n<li>Select any template in the New ASP.NET Project<br \/>\ndialog.<br \/>\n<a href=\"https:\/\/msdnshared.blob.core.windows.net\/media\/MSDNBlogsFS\/prod.evol.blogs.msdn.com\/CommunityServer.Blogs.Components.WeblogFiles\/00\/00\/00\/63\/56\/8422.fig2.png\"><img decoding=\"async\" src=\"https:\/\/msdnshared.blob.core.windows.net\/media\/MSDNBlogsFS\/prod.evol.blogs.msdn.com\/CommunityServer.Blogs.Components.WeblogFiles\/00\/00\/00\/63\/56\/8422.fig2.png\" alt=\"\" border=\"0\" \/><\/a><br \/>\n<em>Notice the three check boxes under \u201cAdd<br \/>\nfolders and core references for:\u201d<\/em><\/li>\n<li>The availability of <strong>Web Forms<\/strong>, <strong>MVC<\/strong> and <strong>Web API<\/strong> depend on which template you choose. For example, MVC is always selected for the MVC template. When you select <strong>Empty<\/strong>, all three are optional since it<br \/>\nis an empty template.<\/li>\n<li>To add Web API core reference, select Web API, then OK, \u00a0and then create project.<\/li>\n<li>Examine the packages.config:<br \/>\n<a href=\"https:\/\/msdnshared.blob.core.windows.net\/media\/MSDNBlogsFS\/prod.evol.blogs.msdn.com\/CommunityServer.Blogs.Components.WeblogFiles\/00\/00\/00\/63\/56\/1440.fig3.png\"><img decoding=\"async\" src=\"https:\/\/msdnshared.blob.core.windows.net\/media\/MSDNBlogsFS\/prod.evol.blogs.msdn.com\/CommunityServer.Blogs.Components.WeblogFiles\/00\/00\/00\/63\/56\/1440.fig3.png\" alt=\"\" border=\"0\" \/><\/a><br \/>\n<em>Web API NuGet packages are all added.<\/em><\/li>\n<li>Examine the Global.asax.cs:<br \/>\n<a href=\"https:\/\/msdnshared.blob.core.windows.net\/media\/MSDNBlogsFS\/prod.evol.blogs.msdn.com\/CommunityServer.Blogs.Components.WeblogFiles\/00\/00\/00\/63\/56\/2555.fig4.png\"><img decoding=\"async\" src=\"https:\/\/msdnshared.blob.core.windows.net\/media\/MSDNBlogsFS\/prod.evol.blogs.msdn.com\/CommunityServer.Blogs.Components.WeblogFiles\/00\/00\/00\/63\/56\/2555.fig4.png\" alt=\"\" border=\"0\" \/><\/a><br \/>\n<em>Web API is also registered.<\/em><\/li>\n<\/ul>\n<h2>Summary<\/h2>\n<p>As you can see, adding the core references will not only add the required NuGet packages but also correctly configure the app for the selected core reference.<\/p>\n<p>Similarly you can add MVC and \u00a0or Web Forms support in the same way. And the supported core references are not limited to empty template only. They\u2019re supported on all six template.<\/p>\n<p>This approach is a very helpful function to set up a customized ASP.NET project quickly.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Adding Core References Support in an ASP.NET Empty Project Brief In Visual Studio 2013 we introduced the core reference framework to ASP.NET project creation. You can choose what core references you want in your to-be-created project. How Let\u2019s take the example of adding Web API core references in an Empty ASP.NET Project Open Visual Studio [&hellip;]<\/p>\n","protected":false},"author":434,"featured_media":58792,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[197],"tags":[9,433],"class_list":["post-21962","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aspnet","tag-net-core","tag-preview"],"acf":[],"blog_post_summary":"<p>Adding Core References Support in an ASP.NET Empty Project Brief In Visual Studio 2013 we introduced the core reference framework to ASP.NET project creation. You can choose what core references you want in your to-be-created project. How Let\u2019s take the example of adding Web API core references in an Empty ASP.NET Project Open Visual Studio [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/21962","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/434"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=21962"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/21962\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/58792"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=21962"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=21962"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=21962"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}