Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/aspnetcore.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorglennc <glennc@microsoft.com>2015-12-01 22:41:04 +0300
committerglennc <glennc@microsoft.com>2015-12-01 22:41:04 +0300
commit060f99428b6a3f8f5fba7389bd58d63f3004c68b (patch)
tree8eab084fea7c150dcce60790888872ad97ee0176
parent55692574b4dad17326b46e0b09f954b2a99e1cab (diff)
rc1-update1 samples for Docker build
-rw-r--r--samples/1.0.0-rc1-update1/ConsoleApp/ConsoleApp.xproj17
-rw-r--r--samples/1.0.0-rc1-update1/ConsoleApp/Program.cs9
-rw-r--r--samples/1.0.0-rc1-update1/ConsoleApp/project.json16
-rw-r--r--samples/1.0.0-rc1-update1/HelloMvc/Controllers/HomeController.cs24
-rw-r--r--samples/1.0.0-rc1-update1/HelloMvc/Dockerfile8
-rw-r--r--samples/1.0.0-rc1-update1/HelloMvc/HelloMvc.xproj18
-rw-r--r--samples/1.0.0-rc1-update1/HelloMvc/Models/User.cs13
-rw-r--r--samples/1.0.0-rc1-update1/HelloMvc/NuGet.config8
-rw-r--r--samples/1.0.0-rc1-update1/HelloMvc/Properties/launchSettings.json16
-rw-r--r--samples/1.0.0-rc1-update1/HelloMvc/Startup.cs27
-rw-r--r--samples/1.0.0-rc1-update1/HelloMvc/Views/Home/Index.cshtml16
-rw-r--r--samples/1.0.0-rc1-update1/HelloMvc/Views/Shared/_Layout.cshtml40
-rw-r--r--samples/1.0.0-rc1-update1/HelloMvc/project.json26
-rw-r--r--samples/1.0.0-rc1-update1/HelloMvc/wwwroot/image.jpgbin0 -> 310647 bytes
-rw-r--r--samples/1.0.0-rc1-update1/HelloWeb/Dockerfile8
-rw-r--r--samples/1.0.0-rc1-update1/HelloWeb/HelloWeb.xproj18
-rw-r--r--samples/1.0.0-rc1-update1/HelloWeb/NuGet.config8
-rw-r--r--samples/1.0.0-rc1-update1/HelloWeb/Properties/launchSettings.json16
-rw-r--r--samples/1.0.0-rc1-update1/HelloWeb/Startup.cs16
-rw-r--r--samples/1.0.0-rc1-update1/HelloWeb/project.json27
-rw-r--r--samples/1.0.0-rc1-update1/HelloWeb/wwwroot/image.jpgbin0 -> 310647 bytes
-rw-r--r--samples/1.0.0-rc1-update1/NuGet.Config8
22 files changed, 339 insertions, 0 deletions
diff --git a/samples/1.0.0-rc1-update1/ConsoleApp/ConsoleApp.xproj b/samples/1.0.0-rc1-update1/ConsoleApp/ConsoleApp.xproj
new file mode 100644
index 0000000000..a7330acb5e
--- /dev/null
+++ b/samples/1.0.0-rc1-update1/ConsoleApp/ConsoleApp.xproj
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
+ <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
+ </PropertyGroup>
+ <Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>d4f684c8-b6a4-45f0-aca0-0d95632ff946</ProjectGuid>
+ <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
+ <OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin\$(MSBuildProjectName)\</OutputPath>
+ </PropertyGroup>
+ <PropertyGroup>
+ <SchemaVersion>2.0</SchemaVersion>
+ </PropertyGroup>
+ <Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
+</Project> \ No newline at end of file
diff --git a/samples/1.0.0-rc1-update1/ConsoleApp/Program.cs b/samples/1.0.0-rc1-update1/ConsoleApp/Program.cs
new file mode 100644
index 0000000000..7ee7ee1dc5
--- /dev/null
+++ b/samples/1.0.0-rc1-update1/ConsoleApp/Program.cs
@@ -0,0 +1,9 @@
+using System;
+
+public class Program
+{
+ public static void Main()
+ {
+ Console.WriteLine("Hello World");
+ }
+}
diff --git a/samples/1.0.0-rc1-update1/ConsoleApp/project.json b/samples/1.0.0-rc1-update1/ConsoleApp/project.json
new file mode 100644
index 0000000000..3fe7770650
--- /dev/null
+++ b/samples/1.0.0-rc1-update1/ConsoleApp/project.json
@@ -0,0 +1,16 @@
+{
+ "dependencies": {
+
+ },
+ "commands": {
+ "ConsoleApp": "ConsoleApp"
+ },
+ "frameworks": {
+ "dnx451": { },
+ "dnxcore50": {
+ "dependencies": {
+ "System.Console": "4.0.0-beta-23516"
+ }
+ }
+ }
+}
diff --git a/samples/1.0.0-rc1-update1/HelloMvc/Controllers/HomeController.cs b/samples/1.0.0-rc1-update1/HelloMvc/Controllers/HomeController.cs
new file mode 100644
index 0000000000..b05b713929
--- /dev/null
+++ b/samples/1.0.0-rc1-update1/HelloMvc/Controllers/HomeController.cs
@@ -0,0 +1,24 @@
+using Microsoft.AspNet.Mvc;
+using MvcSample.Web.Models;
+
+namespace MvcSample.Web
+{
+ public class HomeController : Controller
+ {
+ public IActionResult Index()
+ {
+ return View(CreateUser());
+ }
+
+ public User CreateUser()
+ {
+ User user = new User()
+ {
+ Name = "My name",
+ Address = "My address"
+ };
+
+ return user;
+ }
+ }
+} \ No newline at end of file
diff --git a/samples/1.0.0-rc1-update1/HelloMvc/Dockerfile b/samples/1.0.0-rc1-update1/HelloMvc/Dockerfile
new file mode 100644
index 0000000000..030d9a4b32
--- /dev/null
+++ b/samples/1.0.0-rc1-update1/HelloMvc/Dockerfile
@@ -0,0 +1,8 @@
+FROM microsoft/aspnet:1.0.0-rc1-final
+
+COPY . /app/
+WORKDIR /app
+RUN ["dnu", "restore"]
+
+EXPOSE 5004
+ENTRYPOINT ["dnx", "-p", "project.json", "web"]
diff --git a/samples/1.0.0-rc1-update1/HelloMvc/HelloMvc.xproj b/samples/1.0.0-rc1-update1/HelloMvc/HelloMvc.xproj
new file mode 100644
index 0000000000..37ce6abf15
--- /dev/null
+++ b/samples/1.0.0-rc1-update1/HelloMvc/HelloMvc.xproj
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
+ <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
+ </PropertyGroup>
+ <Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>78627bb3-851e-4c1a-91c0-629fc7c15f8f</ProjectGuid>
+ <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
+ <OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin\$(MSBuildProjectName)\</OutputPath>
+ </PropertyGroup>
+ <PropertyGroup>
+ <SchemaVersion>2.0</SchemaVersion>
+ <DevelopmentServerPort>26425</DevelopmentServerPort>
+ </PropertyGroup>
+ <Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
+</Project> \ No newline at end of file
diff --git a/samples/1.0.0-rc1-update1/HelloMvc/Models/User.cs b/samples/1.0.0-rc1-update1/HelloMvc/Models/User.cs
new file mode 100644
index 0000000000..9869e92d13
--- /dev/null
+++ b/samples/1.0.0-rc1-update1/HelloMvc/Models/User.cs
@@ -0,0 +1,13 @@
+using System.ComponentModel.DataAnnotations;
+
+namespace MvcSample.Web.Models
+{
+ public class User
+ {
+ [Required]
+ [MinLength(4)]
+ public string Name { get; set; }
+ public string Address { get; set; }
+ public int Age { get; set; }
+ }
+} \ No newline at end of file
diff --git a/samples/1.0.0-rc1-update1/HelloMvc/NuGet.config b/samples/1.0.0-rc1-update1/HelloMvc/NuGet.config
new file mode 100644
index 0000000000..d2e1f206a0
--- /dev/null
+++ b/samples/1.0.0-rc1-update1/HelloMvc/NuGet.config
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <packageSources>
+ <clear />
+ <add key="NuGetorg" value="https://nuget.org/api/v2/" />
+ <add key="AspNetRC1" value="https://www.myget.org/F/aspnetrc1/api/v2/" />
+ </packageSources>
+</configuration> \ No newline at end of file
diff --git a/samples/1.0.0-rc1-update1/HelloMvc/Properties/launchSettings.json b/samples/1.0.0-rc1-update1/HelloMvc/Properties/launchSettings.json
new file mode 100644
index 0000000000..d800b7c8bf
--- /dev/null
+++ b/samples/1.0.0-rc1-update1/HelloMvc/Properties/launchSettings.json
@@ -0,0 +1,16 @@
+{
+ "profiles": {
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNET_ENV": "Development"
+ }
+ },
+ "web": {
+ "commandName": "web",
+ "launchBrowser": true,
+ "launchUrl": "http://localhost:5004"
+ }
+ }
+} \ No newline at end of file
diff --git a/samples/1.0.0-rc1-update1/HelloMvc/Startup.cs b/samples/1.0.0-rc1-update1/HelloMvc/Startup.cs
new file mode 100644
index 0000000000..0dda2be962
--- /dev/null
+++ b/samples/1.0.0-rc1-update1/HelloMvc/Startup.cs
@@ -0,0 +1,27 @@
+using Microsoft.AspNet.Builder;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Logging;
+
+namespace HelloMvc
+{
+ public class Startup
+ {
+ public void ConfigureServices(IServiceCollection services)
+ {
+ services.AddMvc();
+ }
+
+ public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
+ {
+ loggerFactory.AddConsole();
+
+ app.UseIISPlatformHandler();
+
+ app.UseDeveloperExceptionPage();
+
+ app.UseMvcWithDefaultRoute();
+
+ app.UseWelcomePage();
+ }
+ }
+} \ No newline at end of file
diff --git a/samples/1.0.0-rc1-update1/HelloMvc/Views/Home/Index.cshtml b/samples/1.0.0-rc1-update1/HelloMvc/Views/Home/Index.cshtml
new file mode 100644
index 0000000000..b786e64b5e
--- /dev/null
+++ b/samples/1.0.0-rc1-update1/HelloMvc/Views/Home/Index.cshtml
@@ -0,0 +1,16 @@
+@using MvcSample.Web.Models
+@model User
+@{
+ Layout = "/Views/Shared/_Layout.cshtml";
+ ViewBag.Title = "Home Page";
+ string helloClass = null;
+}
+
+<div class="jumbotron">
+ <h1>ASP.NET</h1>
+ <p class="lead">ASP.NET is a free web framework for building great Web sites and Web applications using HTML, CSS and JavaScript.</p>
+ <p><a href="http://asp.net" class="btn btn-primary btn-large">Learn more &raquo;</a></p>
+</div>
+<div class="row">
+ <h3 title="@Model.Name" class="@helloClass">Hello @Model.Name!</h3>
+</div>
diff --git a/samples/1.0.0-rc1-update1/HelloMvc/Views/Shared/_Layout.cshtml b/samples/1.0.0-rc1-update1/HelloMvc/Views/Shared/_Layout.cshtml
new file mode 100644
index 0000000000..3377694bed
--- /dev/null
+++ b/samples/1.0.0-rc1-update1/HelloMvc/Views/Shared/_Layout.cshtml
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>@ViewBag.Title - My ASP.NET Application</title>
+ <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" />
+</head>
+<body>
+ <div class="navbar navbar-inverse navbar-fixed-top">
+ <div class="container">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ </div>
+ <div class="navbar-collapse collapse">
+ <ul class="nav navbar-nav">
+ <li><a href="/">Home</a></li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ <div class="container body-content">
+ @RenderBody()
+ <hr />
+ <address>
+ @if (@Model != null)
+ {
+ @Model.Address
+ }
+ </address>
+ <footer>
+ <p>&copy; @DateTime.Now.Year - My ASP.NET Application</p>
+ </footer>
+ </div>
+</body>
+</html>
diff --git a/samples/1.0.0-rc1-update1/HelloMvc/project.json b/samples/1.0.0-rc1-update1/HelloMvc/project.json
new file mode 100644
index 0000000000..ab32c65695
--- /dev/null
+++ b/samples/1.0.0-rc1-update1/HelloMvc/project.json
@@ -0,0 +1,26 @@
+{
+ "version": "1.0.0-*",
+ "webroot": "wwwroot",
+ "exclude": [
+ "wwwroot"
+ ],
+ "packExclude": [
+ "**.kproj",
+ "**.user",
+ "**.vspscc"
+ ],
+ "dependencies": {
+ "Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final",
+ "Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final",
+ "Microsoft.AspNet.Diagnostics": "1.0.0-rc1-final",
+ "Microsoft.AspNet.Mvc": "6.0.0-rc1-final",
+ "Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final"
+ },
+ "commands": {
+ "web": "Microsoft.AspNet.Server.Kestrel --server.urls http://*:5004"
+ },
+ "frameworks": {
+ "dnx451": { },
+ "dnxcore50": { }
+ }
+}
diff --git a/samples/1.0.0-rc1-update1/HelloMvc/wwwroot/image.jpg b/samples/1.0.0-rc1-update1/HelloMvc/wwwroot/image.jpg
new file mode 100644
index 0000000000..899595259f
--- /dev/null
+++ b/samples/1.0.0-rc1-update1/HelloMvc/wwwroot/image.jpg
Binary files differ
diff --git a/samples/1.0.0-rc1-update1/HelloWeb/Dockerfile b/samples/1.0.0-rc1-update1/HelloWeb/Dockerfile
new file mode 100644
index 0000000000..2d83a4dcf4
--- /dev/null
+++ b/samples/1.0.0-rc1-update1/HelloWeb/Dockerfile
@@ -0,0 +1,8 @@
+FROM microsoft/aspnet:1.0.0-rc1-final
+
+COPY . /app
+WORKDIR /app
+RUN ["dnu", "restore"]
+
+EXPOSE 5004
+ENTRYPOINT ["dnx", "-p", "project.json", "web"]
diff --git a/samples/1.0.0-rc1-update1/HelloWeb/HelloWeb.xproj b/samples/1.0.0-rc1-update1/HelloWeb/HelloWeb.xproj
new file mode 100644
index 0000000000..130b1d14d3
--- /dev/null
+++ b/samples/1.0.0-rc1-update1/HelloWeb/HelloWeb.xproj
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
+ <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
+ </PropertyGroup>
+ <Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>8d4b2ab5-c2d2-4ee0-b751-f4126c7d0539</ProjectGuid>
+ <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
+ <OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin\$(MSBuildProjectName)\</OutputPath>
+ </PropertyGroup>
+ <PropertyGroup>
+ <SchemaVersion>2.0</SchemaVersion>
+ <DevelopmentServerPort>26235</DevelopmentServerPort>
+ </PropertyGroup>
+ <Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
+</Project> \ No newline at end of file
diff --git a/samples/1.0.0-rc1-update1/HelloWeb/NuGet.config b/samples/1.0.0-rc1-update1/HelloWeb/NuGet.config
new file mode 100644
index 0000000000..d2e1f206a0
--- /dev/null
+++ b/samples/1.0.0-rc1-update1/HelloWeb/NuGet.config
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <packageSources>
+ <clear />
+ <add key="NuGetorg" value="https://nuget.org/api/v2/" />
+ <add key="AspNetRC1" value="https://www.myget.org/F/aspnetrc1/api/v2/" />
+ </packageSources>
+</configuration> \ No newline at end of file
diff --git a/samples/1.0.0-rc1-update1/HelloWeb/Properties/launchSettings.json b/samples/1.0.0-rc1-update1/HelloWeb/Properties/launchSettings.json
new file mode 100644
index 0000000000..d800b7c8bf
--- /dev/null
+++ b/samples/1.0.0-rc1-update1/HelloWeb/Properties/launchSettings.json
@@ -0,0 +1,16 @@
+{
+ "profiles": {
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNET_ENV": "Development"
+ }
+ },
+ "web": {
+ "commandName": "web",
+ "launchBrowser": true,
+ "launchUrl": "http://localhost:5004"
+ }
+ }
+} \ No newline at end of file
diff --git a/samples/1.0.0-rc1-update1/HelloWeb/Startup.cs b/samples/1.0.0-rc1-update1/HelloWeb/Startup.cs
new file mode 100644
index 0000000000..a10e96cf90
--- /dev/null
+++ b/samples/1.0.0-rc1-update1/HelloWeb/Startup.cs
@@ -0,0 +1,16 @@
+using Microsoft.AspNet.Builder;
+using Microsoft.Extensions.Logging;
+
+namespace HelloWeb
+{
+ public class Startup
+ {
+ public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
+ {
+ loggerFactory.AddConsole();
+ app.UseIISPlatformHandler();
+ app.UseStaticFiles();
+ app.UseWelcomePage();
+ }
+ }
+} \ No newline at end of file
diff --git a/samples/1.0.0-rc1-update1/HelloWeb/project.json b/samples/1.0.0-rc1-update1/HelloWeb/project.json
new file mode 100644
index 0000000000..3de562081d
--- /dev/null
+++ b/samples/1.0.0-rc1-update1/HelloWeb/project.json
@@ -0,0 +1,27 @@
+{
+ "version": "1.0.0-*",
+ "webroot": "wwwroot",
+ "exclude": [
+ "wwwroot"
+ ],
+ "packExclude": [
+ "**.kproj",
+ "**.user",
+ "**.vspscc"
+ ],
+ "dependencies": {
+ "Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final",
+ "Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final",
+ "Microsoft.AspNet.Diagnostics": "1.0.0-rc1-final",
+ "Microsoft.AspNet.Hosting": "1.0.0-rc1-final",
+ "Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final",
+ "Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final"
+ },
+ "commands": {
+ "web": "Microsoft.AspNet.Server.Kestrel --server.urls http://*:5004"
+ },
+ "frameworks": {
+ "dnx451": { },
+ "dnxcore50": { }
+ }
+}
diff --git a/samples/1.0.0-rc1-update1/HelloWeb/wwwroot/image.jpg b/samples/1.0.0-rc1-update1/HelloWeb/wwwroot/image.jpg
new file mode 100644
index 0000000000..899595259f
--- /dev/null
+++ b/samples/1.0.0-rc1-update1/HelloWeb/wwwroot/image.jpg
Binary files differ
diff --git a/samples/1.0.0-rc1-update1/NuGet.Config b/samples/1.0.0-rc1-update1/NuGet.Config
new file mode 100644
index 0000000000..d2e1f206a0
--- /dev/null
+++ b/samples/1.0.0-rc1-update1/NuGet.Config
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <packageSources>
+ <clear />
+ <add key="NuGetorg" value="https://nuget.org/api/v2/" />
+ <add key="AspNetRC1" value="https://www.myget.org/F/aspnetrc1/api/v2/" />
+ </packageSources>
+</configuration> \ No newline at end of file