Merge pull request #2 from TerribleDev/stdlib

Stdlib
This commit is contained in:
Tommy Parnell
2016-10-23 18:08:30 -04:00
committed by GitHub
30 changed files with 251 additions and 223 deletions

View File

@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14 # Visual Studio 14
VisualStudioVersion = 14.0.24720.0 VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D0D99B75-30C7-485A-B978-3008D6908B7B}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D0D99B75-30C7-485A-B978-3008D6908B7B}"
EndProject EndProject
@@ -12,7 +12,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "TurboLinks.Net", "src\TurboLinks.Net\TurboLinks.Net.xproj", "{54979581-020C-4F8B-99B0-36C28FFBBADE}" Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "TurboLinks.Net", "src\TurboLinks.Net\TurboLinks.Net.xproj", "{54979581-020C-4F8B-99B0-36C28FFBBADE}"
EndProject EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "TurboLinks.Net.Example", "src\TurboLinks.Net.Example\TurboLinks.Net.Example.xproj", "{7DB26401-AE70-47FC-8187-C8875B67196D}" Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "TurboLinksExample", "src\TurboLinksExample\TurboLinksExample.xproj", "{16DC6FE0-A511-45E0-BD49-28933EAD8A98}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -24,16 +24,16 @@ Global
{54979581-020C-4F8B-99B0-36C28FFBBADE}.Debug|Any CPU.Build.0 = Debug|Any CPU {54979581-020C-4F8B-99B0-36C28FFBBADE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{54979581-020C-4F8B-99B0-36C28FFBBADE}.Release|Any CPU.ActiveCfg = Release|Any CPU {54979581-020C-4F8B-99B0-36C28FFBBADE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{54979581-020C-4F8B-99B0-36C28FFBBADE}.Release|Any CPU.Build.0 = Release|Any CPU {54979581-020C-4F8B-99B0-36C28FFBBADE}.Release|Any CPU.Build.0 = Release|Any CPU
{7DB26401-AE70-47FC-8187-C8875B67196D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {16DC6FE0-A511-45E0-BD49-28933EAD8A98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7DB26401-AE70-47FC-8187-C8875B67196D}.Debug|Any CPU.Build.0 = Debug|Any CPU {16DC6FE0-A511-45E0-BD49-28933EAD8A98}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7DB26401-AE70-47FC-8187-C8875B67196D}.Release|Any CPU.ActiveCfg = Release|Any CPU {16DC6FE0-A511-45E0-BD49-28933EAD8A98}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7DB26401-AE70-47FC-8187-C8875B67196D}.Release|Any CPU.Build.0 = Release|Any CPU {16DC6FE0-A511-45E0-BD49-28933EAD8A98}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(NestedProjects) = preSolution GlobalSection(NestedProjects) = preSolution
{54979581-020C-4F8B-99B0-36C28FFBBADE} = {D0D99B75-30C7-485A-B978-3008D6908B7B} {54979581-020C-4F8B-99B0-36C28FFBBADE} = {D0D99B75-30C7-485A-B978-3008D6908B7B}
{7DB26401-AE70-47FC-8187-C8875B67196D} = {D0D99B75-30C7-485A-B978-3008D6908B7B} {16DC6FE0-A511-45E0-BD49-28933EAD8A98} = {D0D99B75-30C7-485A-B978-3008D6908B7B}
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal

View File

@@ -8,15 +8,13 @@ init:
- git config --global core.autocrlf true - git config --global core.autocrlf true
before_build: before_build:
- ps: "&{$Branch='dev';iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))}" - ps: invoke-webrequest https://go.microsoft.com/fwlink/?LinkID=827524 -OutFile core.exe
- ps: dnvm upgrade - ps: .\core.exe /install /quiet /norestart
- ps: dnvm update-self - ps: dotnet restore
- ps: dnvm install 1.0.0-rc1-final
- ps: dnvm list build_script:
- ps: dnvm use 1.0.0-rc1-final - ps: dotnet build .\src\TurboLinks.Net
- ps: npm cache clean - ps: dotnet build .\src\TurboLinksExample
- ps: dnu restore
- cmd: set PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%
artifacts: artifacts:
- path: artifacts\bin\TurboLinks.Net\Release\*.nupkg - path: artifacts\bin\TurboLinks.Net\Release\*.nupkg

View File

@@ -1,6 +1,6 @@
{ {
"projects": [ "src", "test" ], "projects": [ "src", "test" ],
"sdk": { "sdk": {
"version": "1.0.0-beta8" "version": "1.0.0-preview2-003131"
} }
} }

View File

@@ -1,6 +0,0 @@
@{
ViewData["Title"] = "Error";
}
<h1 class="text-danger">Error.</h1>
<h2 class="text-danger">An error occurred while processing your request.</h2>

View File

@@ -1,2 +0,0 @@
@using TurboLinks.Net.Example
@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers"

View File

@@ -1,10 +0,0 @@
{
"name": "ASP.NET",
"private": true,
"dependencies": {
"bootstrap": "3.3.5",
"jquery": "2.1.4",
"jquery-validation": "1.14.0",
"jquery-validation-unobtrusive": "3.2.4"
}
}

View File

@@ -1,45 +0,0 @@
/// <binding Clean='clean' />
"use strict";
var gulp = require("gulp"),
rimraf = require("rimraf"),
concat = require("gulp-concat"),
cssmin = require("gulp-cssmin"),
uglify = require("gulp-uglify");
var paths = {
webroot: "./wwwroot/"
};
paths.js = paths.webroot + "js/**/*.js";
paths.minJs = paths.webroot + "js/**/*.min.js";
paths.css = paths.webroot + "css/**/*.css";
paths.minCss = paths.webroot + "css/**/*.min.css";
paths.concatJsDest = paths.webroot + "js/site.min.js";
paths.concatCssDest = paths.webroot + "css/site.min.css";
gulp.task("clean:js", function (cb) {
rimraf(paths.concatJsDest, cb);
});
gulp.task("clean:css", function (cb) {
rimraf(paths.concatCssDest, cb);
});
gulp.task("clean", ["clean:js", "clean:css"]);
gulp.task("min:js", function () {
return gulp.src([paths.js, "!" + paths.minJs], { base: "." })
.pipe(concat(paths.concatJsDest))
.pipe(uglify())
.pipe(gulp.dest("."));
});
gulp.task("min:css", function () {
return gulp.src([paths.css, "!" + paths.minCss])
.pipe(concat(paths.concatCssDest))
.pipe(cssmin())
.pipe(gulp.dest("."));
});
gulp.task("min", ["min:js", "min:css"]);

View File

@@ -1,11 +0,0 @@
{
"name": "ASP.NET",
"version": "0.0.0",
"devDependencies": {
"gulp": "3.8.11",
"gulp-concat": "2.5.2",
"gulp-cssmin": "0.1.7",
"gulp-uglify": "1.2.0",
"rimraf": "2.2.8"
}
}

View File

@@ -1,44 +0,0 @@
{
"version": "1.0.0-*",
"compilationOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.AspNet.Diagnostics": "1.0.0-rc1-final",
"Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final",
"Microsoft.AspNet.Mvc": "6.0.0-rc1-final",
"Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-rc1-final",
"Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final",
"Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final",
"Microsoft.AspNet.Tooling.Razor": "1.0.0-rc1-final",
"Microsoft.Extensions.Configuration.FileProviderExtensions": "1.0.0-rc1-final",
"Microsoft.Extensions.Configuration.Json": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final",
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-rc1-final",
"TurboLinks.Net": ""
},
"commands": {
"web": "Microsoft.AspNet.Server.Kestrel"
},
"frameworks": {
"dnx451": { },
"dnxcore50": { }
},
"exclude": [
"wwwroot",
"node_modules"
],
"publishExclude": [
"**.user",
"**.vspscc"
],
"scripts": {
"prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ]
}
}

View File

@@ -1,8 +1,8 @@
using System; using System;
using System.IO; using System.IO;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNet.Builder; using Microsoft.AspNetCore.Builder;
using Microsoft.AspNet.Http; using Microsoft.AspNetCore.Http;
namespace TurboLinks.Net namespace TurboLinks.Net
{ {

View File

@@ -1,23 +1,22 @@
{ {
"version": "1.1.0", "version": "1.1.1",
"description": "Add support for Turbolinks", "description": "Add support for Turbolinks",
"authors": [ "Tommy Parnell" ], "authors": [ "Tommy Parnell" ],
"packOptions": {
"tags": [ "TurboLinks Middlewear" ], "tags": [ "TurboLinks Middlewear" ],
"projectUrl": "https://github.com/tparnell8/TurboLinks.Net", "projectUrl": "https://github.com/tparnell8/TurboLinks.Net",
"licenseUrl": "https://opensource.org/licenses/MIT", "licenseUrl": "https://opensource.org/licenses/MIT"
"dependencies": {
"Microsoft.AspNet.Http.Abstractions": "1.0.0-rc1-final"
}, },
"frameworks": {
"net451": { },
"dotnet5.4": {
"dependencies": { "dependencies": {
"Microsoft.CSharp": "4.0.1-beta-23516", "NETStandard.Library": "1.6.0",
"System.Collections": "4.0.11-beta-23516", "Microsoft.AspNetCore.Http.Abstractions": "1.0.0",
"System.Linq": "4.0.1-beta-23516", "Microsoft.AspNetCore.Hosting.Abstractions": "1.0.0",
"System.Runtime": "4.0.21-beta-23516", "Microsoft.AspNetCore.StaticFiles": "1.0.0"
"System.Threading": "4.0.11-beta-23516" },
}
"frameworks": {
"netstandard1.6": {
"imports": "dnxcore50"
} }
} }
} }

View File

@@ -2,9 +2,9 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNet.Mvc; using Microsoft.AspNetCore.Mvc;
namespace TurboLinks.Net.Example.Controllers namespace TurboLinksExample.Controllers
{ {
public class HomeController : Controller public class HomeController : Controller
{ {

View File

@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
namespace TurboLinksExample
{
public class Program
{
public static void Main(string[] args)
{
var host = new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseStartup<Startup>()
.Build();
host.Run();
}
}
}

View File

@@ -2,7 +2,7 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<title>Welcome to ASP.NET 5</title> <title>Welcome to ASP.NET Core</title>
<style> <style>
html { html {
background: #f1f1f1; background: #f1f1f1;
@@ -128,20 +128,20 @@
<body> <body>
<div id="header"> <div id="header">
<h1>Welcome to ASP.NET 5</h1> <h1>Welcome to ASP.NET Core</h1>
<span> <span>
We've made some big updates in this release, so its <b>important</b> that you spend We've made some big updates in this release, so its <b>important</b> that you spend
a few minutes to learn whats new. a few minutes to learn whats new.
</span> </span>
<p>You've created a new ASP.NET 5 project. <a href="http://go.microsoft.com/fwlink/?LinkId=518016">Learn what's new</a></p> <p>You've created a new ASP.NET Core project. <a href="http://go.microsoft.com/fwlink/?LinkId=518016">Learn what's new</a></p>
</div> </div>
<div id="main"> <div id="main">
<div class="section first"> <div class="section first">
<h2>This application consists of:</h2> <h2>This application consists of:</h2>
<ul> <ul>
<li>Sample pages using ASP.NET MVC 6</li> <li>Sample pages using ASP.NET Core MVC</li>
<li><a href="http://go.microsoft.com/fwlink/?LinkId=518007">Gulp</a> and <a href="http://go.microsoft.com/fwlink/?LinkId=518004">Bower</a> for managing client-side libraries</li> <li><a href="http://go.microsoft.com/fwlink/?LinkId=518004">Bower</a> for managing client-side libraries</li>
<li>Theming using <a href="http://go.microsoft.com/fwlink/?LinkID=398939">Bootstrap</a></li> <li>Theming using <a href="http://go.microsoft.com/fwlink/?LinkID=398939">Bootstrap</a></li>
</ul> </ul>
</div> </div>
@@ -160,8 +160,8 @@
<div class="section"> <div class="section">
<h2>Overview</h2> <h2>Overview</h2>
<ul> <ul>
<li><a href="http://go.microsoft.com/fwlink/?LinkId=518008">Conceptual overview of what is ASP.NET 5</a></li> <li><a href="http://go.microsoft.com/fwlink/?LinkId=518008">Conceptual overview of what is ASP.NET Core</a></li>
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699320">Fundamentals of ASP.NET 5 such as Startup and middleware.</a></li> <li><a href="http://go.microsoft.com/fwlink/?LinkId=699320">Fundamentals of ASP.NET Core such as Startup and middleware.</a></li>
<li><a href="http://go.microsoft.com/fwlink/?LinkId=398602">Working with Data</a></li> <li><a href="http://go.microsoft.com/fwlink/?LinkId=398602">Working with Data</a></li>
<li><a href="http://go.microsoft.com/fwlink/?LinkId=398603">Security</a></li> <li><a href="http://go.microsoft.com/fwlink/?LinkId=398603">Security</a></li>
<li><a href="http://go.microsoft.com/fwlink/?LinkID=699321">Client side development</a></li> <li><a href="http://go.microsoft.com/fwlink/?LinkID=699321">Client side development</a></li>
@@ -173,8 +173,7 @@
<h2>Run & Deploy</h2> <h2>Run & Deploy</h2>
<ul> <ul>
<li><a href="http://go.microsoft.com/fwlink/?LinkID=517851">Run your app</a></li> <li><a href="http://go.microsoft.com/fwlink/?LinkID=517851">Run your app</a></li>
<li><a href="http://go.microsoft.com/fwlink/?LinkID=517852">Run your app on .NET Core</a></li> <li><a href="http://go.microsoft.com/fwlink/?LinkID=517853">Run tools such as EF migrations and more</a></li>
<li><a href="http://go.microsoft.com/fwlink/?LinkID=517853">Run commands in your project.json</a></li>
<li><a href="http://go.microsoft.com/fwlink/?LinkID=398609">Publish to Microsoft Azure Web Apps</a></li> <li><a href="http://go.microsoft.com/fwlink/?LinkID=398609">Publish to Microsoft Azure Web Apps</a></li>
</ul> </ul>
</div> </div>

View File

@@ -3,7 +3,7 @@
"windowsAuthentication": false, "windowsAuthentication": false,
"anonymousAuthentication": true, "anonymousAuthentication": true,
"iisExpress": { "iisExpress": {
"applicationUrl": "http://localhost:62323/", "applicationUrl": "http://localhost:53033/",
"sslPort": 0 "sslPort": 0
} }
}, },
@@ -12,13 +12,15 @@
"commandName": "IISExpress", "commandName": "IISExpress",
"launchBrowser": true, "launchBrowser": true,
"environmentVariables": { "environmentVariables": {
"Hosting:Environment": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
} }
}, },
"web": { "TurboLinksExample": {
"commandName": "web", "commandName": "Project",
"launchBrowser": true,
"launchUrl": "http://localhost:5000",
"environmentVariables": { "environmentVariables": {
"Hosting:Environment": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
} }
} }
} }

View File

@@ -2,26 +2,27 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNet.Builder; using Microsoft.AspNetCore.Builder;
using Microsoft.AspNet.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using TurboLinks.Net;
namespace TurboLinks.Net.Example namespace TurboLinksExample
{ {
public class Startup public class Startup
{ {
public Startup(IHostingEnvironment env) public Startup(IHostingEnvironment env)
{ {
// Set up configuration sources.
var builder = new ConfigurationBuilder() var builder = new ConfigurationBuilder()
.AddJsonFile("appsettings.json") .SetBasePath(env.ContentRootPath)
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true)
.AddEnvironmentVariables(); .AddEnvironmentVariables();
Configuration = builder.Build(); Configuration = builder.Build();
} }
public IConfigurationRoot Configuration { get; set; } public IConfigurationRoot Configuration { get; }
// This method gets called by the runtime. Use this method to add services to the container. // This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services) public void ConfigureServices(IServiceCollection services)
@@ -38,19 +39,16 @@ namespace TurboLinks.Net.Example
if (env.IsDevelopment()) if (env.IsDevelopment())
{ {
app.UseBrowserLink();
app.UseDeveloperExceptionPage(); app.UseDeveloperExceptionPage();
app.UseBrowserLink();
} }
else else
{ {
app.UseExceptionHandler("/Home/Error"); app.UseExceptionHandler("/Home/Error");
} }
app.UseIISPlatformHandler();
app.UseStaticFiles(); app.UseStaticFiles();
app.UseTurboLinks(); app.UseTurboLinks();
app.UseMvc(routes => app.UseMvc(routes =>
{ {
routes.MapRoute( routes.MapRoute(
@@ -58,8 +56,5 @@ namespace TurboLinks.Net.Example
template: "{controller=Home}/{action=Index}/{id?}"); template: "{controller=Home}/{action=Index}/{id?}");
}); });
} }
// Entry point for the application.
public static void Main(string[] args) => WebApplication.Run<Startup>(args);
} }
} }

View File

@@ -4,12 +4,13 @@
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion> <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" /> <Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<ProjectGuid>7db26401-ae70-47fc-8187-c8875b67196d</ProjectGuid> <ProjectGuid>16dc6fe0-a511-45e0-bd49-28933ead8a98</ProjectGuid>
<RootNamespace>TurboLinks.Net.Example</RootNamespace> <RootNamespace>TurboLinksExample</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath> <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin\$(MSBuildProjectName)\</OutputPath> <OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<SchemaVersion>2.0</SchemaVersion> <SchemaVersion>2.0</SchemaVersion>
@@ -17,7 +18,6 @@
<ItemGroup> <ItemGroup>
<DnxInvisibleContent Include="bower.json" /> <DnxInvisibleContent Include="bower.json" />
<DnxInvisibleContent Include=".bowerrc" /> <DnxInvisibleContent Include=".bowerrc" />
<DnxInvisibleContent Include="package.json" />
</ItemGroup> </ItemGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" /> <Import Project="$(VSToolsPath)\DotNet.Web\Microsoft.DotNet.Web.targets" Condition="'$(VSToolsPath)' != ''" />
</Project> </Project>

View File

@@ -11,44 +11,44 @@
</ol> </ol>
<div class="carousel-inner" role="listbox"> <div class="carousel-inner" role="listbox">
<div class="item active"> <div class="item active">
<img src="~/images/ASP-NET-Banners-01.png" alt="ASP.NET" class="img-responsive" /> <img src="~/images/banner1.svg" alt="ASP.NET" class="img-responsive" />
<div class="carousel-caption"> <div class="carousel-caption" role="option">
<p> <p>
Learn how to build ASP.NET apps that can run anywhere. Learn how to build ASP.NET apps that can run anywhere.
<a class="btn btn-default btn-default" href="http://go.microsoft.com/fwlink/?LinkID=525028&clcid=0x409"> <a class="btn btn-default" href="http://go.microsoft.com/fwlink/?LinkID=525028&clcid=0x409">
Learn More Learn More
</a> </a>
</p> </p>
</div> </div>
</div> </div>
<div class="item"> <div class="item">
<img src="~/images/Banner-02-VS.png" alt="Visual Studio" class="img-responsive" /> <img src="~/images/banner2.svg" alt="Visual Studio" class="img-responsive" />
<div class="carousel-caption"> <div class="carousel-caption" role="option">
<p> <p>
There are powerful new features in Visual Studio for building modern web apps. There are powerful new features in Visual Studio for building modern web apps.
<a class="btn btn-default btn-default" href="http://go.microsoft.com/fwlink/?LinkID=525030&clcid=0x409"> <a class="btn btn-default" href="http://go.microsoft.com/fwlink/?LinkID=525030&clcid=0x409">
Learn More Learn More
</a> </a>
</p> </p>
</div> </div>
</div> </div>
<div class="item"> <div class="item">
<img src="~/images/ASP-NET-Banners-02.png" alt="Package Management" class="img-responsive" /> <img src="~/images/banner3.svg" alt="Package Management" class="img-responsive" />
<div class="carousel-caption"> <div class="carousel-caption" role="option">
<p> <p>
Bring in libraries from NuGet, Bower, and npm, and automate tasks using Grunt or Gulp. Bring in libraries from NuGet, Bower, and npm, and automate tasks using Grunt or Gulp.
<a class="btn btn-default btn-default" href="http://go.microsoft.com/fwlink/?LinkID=525029&clcid=0x409"> <a class="btn btn-default" href="http://go.microsoft.com/fwlink/?LinkID=525029&clcid=0x409">
Learn More Learn More
</a> </a>
</p> </p>
</div> </div>
</div> </div>
<div class="item"> <div class="item">
<img src="~/images/Banner-01-Azure.png" alt="Microsoft Azure" class="img-responsive" /> <img src="~/images/banner4.svg" alt="Microsoft Azure" class="img-responsive" />
<div class="carousel-caption"> <div class="carousel-caption" role="option">
<p> <p>
Learn how Microsoft's Azure cloud platform allows you to build, deploy, and scale web apps. Learn how Microsoft's Azure cloud platform allows you to build, deploy, and scale web apps.
<a class="btn btn-default btn-default" href="http://go.microsoft.com/fwlink/?LinkID=525027&clcid=0x409"> <a class="btn btn-default" href="http://go.microsoft.com/fwlink/?LinkID=525027&clcid=0x409">
Learn More Learn More
</a> </a>
</p> </p>
@@ -69,8 +69,8 @@
<div class="col-md-3"> <div class="col-md-3">
<h2>Application uses</h2> <h2>Application uses</h2>
<ul> <ul>
<li>Sample pages using ASP.NET MVC 6</li> <li>Sample pages using ASP.NET Core MVC</li>
<li><a href="http://go.microsoft.com/fwlink/?LinkId=518007">Gulp</a> and <a href="http://go.microsoft.com/fwlink/?LinkId=518004">Bower</a> for managing client-side libraries</li> <li><a href="http://go.microsoft.com/fwlink/?LinkId=518004">Bower</a> for managing client-side libraries</li>
<li>Theming using <a href="http://go.microsoft.com/fwlink/?LinkID=398939">Bootstrap</a></li> <li>Theming using <a href="http://go.microsoft.com/fwlink/?LinkID=398939">Bootstrap</a></li>
</ul> </ul>
</div> </div>
@@ -78,7 +78,7 @@
<h2>How to</h2> <h2>How to</h2>
<ul> <ul>
<li><a href="http://go.microsoft.com/fwlink/?LinkID=398600">Add a Controller and View</a></li> <li><a href="http://go.microsoft.com/fwlink/?LinkID=398600">Add a Controller and View</a></li>
<li><a href="http://go.microsoft.com/fwlink/?LinkID=699314">Add an appsetting in config and access it in app.</a></li> <li><a href="http://go.microsoft.com/fwlink/?LinkID=699562">Add an appsetting in config and access it in app.</a></li>
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699315">Manage User Secrets using Secret Manager.</a></li> <li><a href="http://go.microsoft.com/fwlink/?LinkId=699315">Manage User Secrets using Secret Manager.</a></li>
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699316">Use logging to log a message.</a></li> <li><a href="http://go.microsoft.com/fwlink/?LinkId=699316">Use logging to log a message.</a></li>
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699317">Add packages using NuGet.</a></li> <li><a href="http://go.microsoft.com/fwlink/?LinkId=699317">Add packages using NuGet.</a></li>
@@ -89,8 +89,8 @@
<div class="col-md-3"> <div class="col-md-3">
<h2>Overview</h2> <h2>Overview</h2>
<ul> <ul>
<li><a href="http://go.microsoft.com/fwlink/?LinkId=518008">Conceptual overview of what is ASP.NET 5</a></li> <li><a href="http://go.microsoft.com/fwlink/?LinkId=518008">Conceptual overview of what is ASP.NET Core</a></li>
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699320">Fundamentals of ASP.NET 5 such as Startup and middleware.</a></li> <li><a href="http://go.microsoft.com/fwlink/?LinkId=699320">Fundamentals of ASP.NET Core such as Startup and middleware.</a></li>
<li><a href="http://go.microsoft.com/fwlink/?LinkId=398602">Working with Data</a></li> <li><a href="http://go.microsoft.com/fwlink/?LinkId=398602">Working with Data</a></li>
<li><a href="http://go.microsoft.com/fwlink/?LinkId=398603">Security</a></li> <li><a href="http://go.microsoft.com/fwlink/?LinkId=398603">Security</a></li>
<li><a href="http://go.microsoft.com/fwlink/?LinkID=699321">Client side development</a></li> <li><a href="http://go.microsoft.com/fwlink/?LinkID=699321">Client side development</a></li>
@@ -102,8 +102,7 @@
<h2>Run & Deploy</h2> <h2>Run & Deploy</h2>
<ul> <ul>
<li><a href="http://go.microsoft.com/fwlink/?LinkID=517851">Run your app</a></li> <li><a href="http://go.microsoft.com/fwlink/?LinkID=517851">Run your app</a></li>
<li><a href="http://go.microsoft.com/fwlink/?LinkID=517852">Run your app on .NET Core</a></li> <li><a href="http://go.microsoft.com/fwlink/?LinkID=517853">Run tools such as EF migrations and more</a></li>
<li><a href="http://go.microsoft.com/fwlink/?LinkID=517853">Run commands in your project.json</a></li>
<li><a href="http://go.microsoft.com/fwlink/?LinkID=398609">Publish to Microsoft Azure Web Apps</a></li> <li><a href="http://go.microsoft.com/fwlink/?LinkID=398609">Publish to Microsoft Azure Web Apps</a></li>
</ul> </ul>
</div> </div>

View File

@@ -0,0 +1,14 @@
@{
ViewData["Title"] = "Error";
}
<h1 class="text-danger">Error.</h1>
<h2 class="text-danger">An error occurred while processing your request.</h2>
<h3>Development Mode</h3>
<p>
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
</p>
<p>
<strong>Development environment should not be enabled in deployed applications</strong>, as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment can be enabled by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>, and restarting the application.
</p>

View File

@@ -3,14 +3,14 @@
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@ViewData["Title"] - TurboLinks.Net.Example</title> <title>@ViewData["Title"] - TurboLinksExample</title>
<environment names="Development"> <environment names="Development">
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" /> <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" />
<link rel="stylesheet" href="~/css/site.css" /> <link rel="stylesheet" href="~/css/site.css" />
</environment> </environment>
<environment names="Staging,Production"> <environment names="Staging,Production">
<link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.5/css/bootstrap.min.css" <link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.6/css/bootstrap.min.css"
asp-fallback-href="~/lib/bootstrap/dist/css/bootstrap.min.css" asp-fallback-href="~/lib/bootstrap/dist/css/bootstrap.min.css"
asp-fallback-test-class="sr-only" asp-fallback-test-property="position" asp-fallback-test-value="absolute" /> asp-fallback-test-class="sr-only" asp-fallback-test-property="position" asp-fallback-test-value="absolute" />
<link rel="stylesheet" href="~/css/site.min.css" asp-append-version="true" /> <link rel="stylesheet" href="~/css/site.min.css" asp-append-version="true" />
@@ -26,13 +26,13 @@
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> </button>
<a asp-controller="Home" asp-action="Index" class="navbar-brand">TurboLinks.Net.Example</a> <a asp-area="" asp-controller="Home" asp-action="Index" class="navbar-brand">TurboLinksExample</a>
</div> </div>
<div class="navbar-collapse collapse"> <div class="navbar-collapse collapse">
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
<li><a asp-controller="Home" asp-action="Index">Home</a></li> <li><a asp-area="" asp-controller="Home" asp-action="Index">Home</a></li>
<li><a asp-controller="Home" asp-action="About">About</a></li> <li><a asp-area="" asp-controller="Home" asp-action="About">About</a></li>
<li><a asp-controller="Home" asp-action="Contact">Contact</a></li> <li><a asp-area="" asp-controller="Home" asp-action="Contact">Contact</a></li>
</ul> </ul>
</div> </div>
</div> </div>
@@ -41,7 +41,7 @@
@RenderBody() @RenderBody()
<hr /> <hr />
<footer> <footer>
<p>&copy; 2016 - TurboLinks.Net.Example</p> <p>&copy; 2016 - TurboLinksExample</p>
</footer> </footer>
</div> </div>
@@ -51,17 +51,17 @@
<script src="~/js/site.js" asp-append-version="true"></script> <script src="~/js/site.js" asp-append-version="true"></script>
</environment> </environment>
<environment names="Staging,Production"> <environment names="Staging,Production">
<script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.1.4.min.js" <script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.2.0.min.js"
asp-fallback-src="~/lib/jquery/dist/jquery.min.js" asp-fallback-src="~/lib/jquery/dist/jquery.min.js"
asp-fallback-test="window.jQuery"> asp-fallback-test="window.jQuery">
</script> </script>
<script src="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.5/bootstrap.min.js" <script src="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.6/bootstrap.min.js"
asp-fallback-src="~/lib/bootstrap/dist/js/bootstrap.min.js" asp-fallback-src="~/lib/bootstrap/dist/js/bootstrap.min.js"
asp-fallback-test="window.jQuery && window.jQuery.fn && window.jQuery.fn.modal"> asp-fallback-test="window.jQuery && window.jQuery.fn && window.jQuery.fn.modal">
</script> </script>
<script src="~/js/turbolinks.js"></script>
<script src="~/js/site.min.js" asp-append-version="true"></script> <script src="~/js/site.min.js" asp-append-version="true"></script>
</environment> </environment>
<script src="~/js/turbolinks.js" asp-append-version="true"></script>
@RenderSection("scripts", required: false) @RenderSection("scripts", required: false)
</body> </body>

View File

@@ -0,0 +1,2 @@
@using TurboLinksExample
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

View File

@@ -2,7 +2,7 @@
"Logging": { "Logging": {
"IncludeScopes": false, "IncludeScopes": false,
"LogLevel": { "LogLevel": {
"Default": "Verbose", "Default": "Debug",
"System": "Information", "System": "Information",
"Microsoft": "Information" "Microsoft": "Information"
} }

View File

@@ -0,0 +1,10 @@
{
"name": "asp.net",
"private": true,
"dependencies": {
"bootstrap": "3.3.6",
"jquery": "2.2.0",
"jquery-validation": "1.14.0",
"jquery-validation-unobtrusive": "3.2.6"
}
}

View File

@@ -0,0 +1,24 @@
// Configure bundling and minification for the project.
// More info at https://go.microsoft.com/fwlink/?LinkId=808241
[
{
"outputFileName": "wwwroot/css/site.min.css",
// An array of relative input file paths. Globbing patterns supported
"inputFiles": [
"wwwroot/css/site.css"
]
},
{
"outputFileName": "wwwroot/js/site.min.js",
"inputFiles": [
"wwwroot/js/site.js"
],
// Optionally specify minification options
"minify": {
"enabled": true,
"renameLocals": true
},
// Optinally generate .map file
"sourceMap": false
}
]

View File

@@ -0,0 +1,66 @@
{
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.1",
"type": "platform"
},
"Microsoft.AspNetCore.Diagnostics": "1.0.0",
"Microsoft.AspNetCore.Mvc": "1.0.1",
"Microsoft.AspNetCore.Razor.Tools": {
"version": "1.0.0-preview2-final",
"type": "build"
},
"Microsoft.AspNetCore.Routing": "1.0.1",
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.1",
"Microsoft.AspNetCore.StaticFiles": "1.0.0",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
"Microsoft.Extensions.Configuration.Json": "1.0.0",
"Microsoft.Extensions.Logging": "1.0.0",
"Microsoft.Extensions.Logging.Console": "1.0.0",
"Microsoft.Extensions.Logging.Debug": "1.0.0",
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0",
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0",
"TurboLinks.Net": "1.1.1"
},
"tools": {
"BundlerMinifier.Core": "2.0.238",
"Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview2-final",
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
},
"frameworks": {
"netcoreapp1.0": {
"imports": [
"dotnet5.6",
"portable-net45+win8"
]
}
},
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},
"runtimeOptions": {
"configProperties": {
"System.GC.Server": true
}
},
"publishOptions": {
"include": [
"wwwroot",
"**/*.cshtml",
"appsettings.json",
"web.config"
]
},
"scripts": {
"prepublish": [ "bower install", "dotnet bundle" ],
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
}
}

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!--
Configure your application settings in appsettings.json. Learn more at http://go.microsoft.com/fwlink/?LinkId=786380
-->
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/>
</handlers>
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"/>
</system.webServer>
</configuration>