Remove old artifacts from Home repo (#1754)
|
|
@ -1,154 +0,0 @@
|
|||
|
||||
# Getting started with ASP.NET 5 and Docker
|
||||
|
||||
It is possible to run the sample apps using [Docker](https://www.docker.com/) and the [ASP.NET 5 Preview Docker Image](https://registry.hub.docker.com/u/microsoft/aspnet/).
|
||||
|
||||
### Get the source code
|
||||
```
|
||||
git clone git@github.com:aspnet/Home.git aspnet-home
|
||||
cd aspnet-home/samples/latest/HelloWeb
|
||||
```
|
||||
|
||||
### Build a docker image
|
||||
```
|
||||
docker build -t aspnet-home-helloweb .
|
||||
```
|
||||
|
||||
### Run a docker container
|
||||
```
|
||||
docker run -it -p 5004:5004 aspnet-home-helloweb
|
||||
```
|
||||
|
||||
### See the HelloWeb sample in action
|
||||
The URL to the sample app depends on how you are running Docker.
|
||||
|
||||
If you are using [boot2docker](https://github.com/boot2docker/boot2docker):
|
||||
|
||||
```
|
||||
open http://$(boot2docker ip):5004
|
||||
```
|
||||
|
||||
Otherwise, you can access the sample app directly on localhost:
|
||||
|
||||
```
|
||||
open http://localhost:5004
|
||||
```
|
||||
|
||||
### Stop the container
|
||||
You can stop the docker container by pressing <kbd>Enter</kbd> in the console, or by using ```docker ps``` to identify the container id followed by ```docker stop <container id>```.
|
||||
|
||||
|
||||
### Learn more
|
||||
Detailed instructions on how to use the [ASP.NET 5 Preview Docker Image](https://registry.hub.docker.com/u/microsoft/aspnet/) can be found on http://blogs.msdn.com/b/webdev/archive/2015/01/14/running-asp-net-5-applications-in-linux-containers-with-docker.aspx. Please note that the ```kpm``` and ```k``` tools have been renamed since that article was published.
|
||||
|
||||
|
||||
|
||||
# Getting started with ASP.NET 5 and Linux
|
||||
|
||||
> Tested on: Ubuntu 14.04, Mint 17.01
|
||||
|
||||
This section deals with setting up a machine to run applications without the Docker image.
|
||||
|
||||
As with all other operating systems you need DNVM to get going with ASP.NET 5. To get it you run `curl` to download a `.sh` file and then run it. To configure a Linux machine to run an ASP.NET 5 application use the following instructions.
|
||||
|
||||
The steps to set up a Linux machine are:
|
||||
|
||||
* Get a working version of Mono
|
||||
* Get and compile libuv (Required for the Kestrel server)
|
||||
* Get DNVM
|
||||
* Add sources to NuGet.config (For package restore)
|
||||
|
||||
|
||||
---
|
||||
|
||||
### Prerequisites
|
||||
|
||||
* `Unzip`
|
||||
* `Curl`
|
||||
|
||||
---
|
||||
|
||||
### Get Unzip
|
||||
|
||||
`Unzip` is needed to unpack runtime packages.
|
||||
|
||||
```
|
||||
sudo apt-get install unzip
|
||||
```
|
||||
|
||||
### Get Curl
|
||||
|
||||
`Curl` is a command line tool for transferring data specified with URL syntax.
|
||||
|
||||
```
|
||||
sudo apt-get install curl
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Get Mono
|
||||
|
||||
Mono is how .NET applications can run on platforms other than Windows. Mono is an ongoing effort to port the .NET Framework to other platforms. In the process of developing ASP.NET 5 we worked with the Mono team to fix some bugs and add features that are needed to run ASP.NET applications. These changes are only in builds of mono that are greater than 4.0.1.
|
||||
|
||||
To get these builds you need to run:
|
||||
|
||||
```
|
||||
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
|
||||
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
|
||||
sudo apt-get update
|
||||
sudo apt-get install mono-complete
|
||||
```
|
||||
|
||||
### Get libuv
|
||||
|
||||
[Libuv](https://github.com/libuv/libuv) is a multi-platform asynchronous IO library that is used by the [KestrelHttpServer](https://github.com/aspnet/KestrelHttpServer) that we will use to host our web applications.
|
||||
|
||||
To build libuv you should do the following:
|
||||
|
||||
```
|
||||
sudo apt-get install automake libtool
|
||||
curl -sSL https://github.com/libuv/libuv/archive/v1.4.2.tar.gz | sudo tar zxfv - -C /usr/local/src
|
||||
cd /usr/local/src/libuv-1.4.2
|
||||
sudo sh autogen.sh
|
||||
sudo ./configure
|
||||
sudo make
|
||||
sudo make install
|
||||
sudo rm -rf /usr/local/src/libuv-1.4.2 && cd ~/
|
||||
sudo ldconfig
|
||||
```
|
||||
|
||||
**NOTE:** `make install` puts `libuv.so.1` in `/usr/local/lib`, in the above commands `ldconfig` is used to update `ld.so.cache` so that `dlopen` (see `man dlopen`) can load it. If you are getting libuv some other way or not running `make install` then you need to ensure that dlopen is capable of loading `libuv.so.1`.
|
||||
|
||||
### Get DNVM
|
||||
|
||||
Now let's get DNVM. To do this run:
|
||||
|
||||
```
|
||||
sudo apt-get install unzip
|
||||
curl -sSL https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.sh | DNX_BRANCH=dev sh && source ~/.dnx/dnvm/dnvm.sh
|
||||
```
|
||||
|
||||
Once this step is complete you should be able to run `dnvm` and see some help text.
|
||||
|
||||
### Add Sources to NuGet.config
|
||||
|
||||
Now that we have DNVM and the other tools needed to run an ASP.NET application we need to add the development configuration sources to get nightly builds of all the ASP.NET packages.
|
||||
|
||||
The nightly package source is: `https://www.myget.org/F/aspnetvnext/api/v2/`
|
||||
|
||||
To add this to your package sources you need to edit the NuGet.config.
|
||||
|
||||
Edit: ~/.config/NuGet/NuGet.config
|
||||
|
||||
The NuGet.config file should look something like the following:
|
||||
```xml
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<add key="AspNetVNext" value="https://www.myget.org/F/aspnetvnext/api/v2/" />
|
||||
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
|
||||
</packageSources>
|
||||
<disabledPackageSources />
|
||||
</configuration>
|
||||
```
|
||||
The important part of this is that you have a package source with aspnetvnext and nuget.org in it.
|
||||
10
dnvm.cmd
|
|
@ -1,10 +0,0 @@
|
|||
@Echo off
|
||||
|
||||
for /f "delims=" %%i in ('PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.IO.Path]::GetTempFileName()"') do set DNVM_CMD_PATH_FILE="%%i.cmd"
|
||||
|
||||
PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';$CmdPathFile='%DNVM_CMD_PATH_FILE%';& '%~dp0dnvm.ps1' %*"
|
||||
|
||||
IF EXIST %DNVM_CMD_PATH_FILE% (
|
||||
CALL %DNVM_CMD_PATH_FILE%
|
||||
DEL %DNVM_CMD_PATH_FILE%
|
||||
)
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
$tempPath = Join-Path $env:TEMP "dnvminstall"
|
||||
$dnvmPs1Path = Join-Path $tempPath "dnvm.ps1"
|
||||
$dnvmCmdPath = Join-Path $tempPath "dnvm.cmd"
|
||||
|
||||
Write-Host "Using temporary directory: $tempPath"
|
||||
if (!(Test-Path $tempPath)) { md $tempPath | Out-Null }
|
||||
|
||||
|
||||
$webClient = New-Object System.Net.WebClient
|
||||
$webClient.Proxy = [System.Net.WebRequest]::DefaultWebProxy
|
||||
$webClient.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials
|
||||
Write-Host "Downloading DNVM.ps1 to $dnvmPs1Path"
|
||||
$webClient.DownloadFile('https://raw.githubusercontent.com/aspnet/Home/dev/dnvm.ps1', $dnvmPs1Path)
|
||||
Write-Host "Downloading DNVM.cmd to $dnvmCmdPath"
|
||||
$webClient.DownloadFile('https://raw.githubusercontent.com/aspnet/Home/dev/dnvm.cmd', $dnvmCmdPath)
|
||||
Write-Host "Installing DNVM"
|
||||
& $dnvmCmdPath setup
|
||||
|
|
@ -1,88 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
_dnvmsetup_has() {
|
||||
type "$1" > /dev/null 2>&1
|
||||
return $?
|
||||
}
|
||||
|
||||
_dnvmsetup_update_profile() {
|
||||
local profile="$1"
|
||||
local sourceString="$2"
|
||||
if ! grep -qc 'dnvm.sh' $profile; then
|
||||
echo "Appending source string to $profile"
|
||||
echo "" >> "$profile"
|
||||
echo $sourceString >> "$profile"
|
||||
else
|
||||
echo "=> Source string already in $profile"
|
||||
fi
|
||||
}
|
||||
|
||||
if [ -z "$DNX_USER_HOME" ]; then
|
||||
eval DNX_USER_HOME=~/.dnx
|
||||
fi
|
||||
|
||||
if ! _dnvmsetup_has "curl"; then
|
||||
echo "dnvmsetup requires curl to be installed"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -z "$DNVM_SOURCE" ]; then
|
||||
DNVM_SOURCE="https://raw.githubusercontent.com/aspnet/Home/dev/dnvm.sh"
|
||||
fi
|
||||
|
||||
# Downloading to $DNVM_DIR
|
||||
mkdir -p "$DNX_USER_HOME/dnvm"
|
||||
if [ -s "$DNX_USER_HOME/dnvm/dnvm.sh" ]; then
|
||||
echo "dnvm is already installed in $DNX_USER_HOME/dnvm, trying to update"
|
||||
else
|
||||
echo "Downloading dnvm as script to '$DNX_USER_HOME/dnvm'"
|
||||
fi
|
||||
|
||||
curl -s "$DNVM_SOURCE" -o "$DNX_USER_HOME/dnvm/dnvm.sh" || {
|
||||
echo >&2 "Failed to download '$DNVM_SOURCE'.."
|
||||
return 1
|
||||
}
|
||||
|
||||
echo
|
||||
|
||||
# Detect profile file if not specified as environment variable (eg: PROFILE=~/.myprofile).
|
||||
if [ -z "$PROFILE" ]; then
|
||||
if [ -f "$HOME/.bash_profile" ]; then
|
||||
PROFILE="$HOME/.bash_profile"
|
||||
elif [ -f "$HOME/.bashrc" ]; then
|
||||
PROFILE="$HOME/.bashrc"
|
||||
elif [ -f "$HOME/.profile" ]; then
|
||||
PROFILE="$HOME/.profile"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$ZPROFILE" ]; then
|
||||
if [ -f "$HOME/.zshrc" ]; then
|
||||
ZPROFILE="$HOME/.zshrc"
|
||||
fi
|
||||
fi
|
||||
|
||||
SOURCE_STR="[ -s \"$DNX_USER_HOME/dnvm/dnvm.sh\" ] && . \"$DNX_USER_HOME/dnvm/dnvm.sh\" # Load dnvm"
|
||||
|
||||
if [ -z "$PROFILE" -a -z "$ZPROFILE" ] || [ ! -f "$PROFILE" -a ! -f "$ZPROFILE" ] ; then
|
||||
if [ -z "$PROFILE" ]; then
|
||||
echo "Profile not found. Tried ~/.bash_profile ~/.zshrc and ~/.profile."
|
||||
echo "Create one of them and run this script again"
|
||||
elif [ ! -f "$PROFILE" ]; then
|
||||
echo "Profile $PROFILE not found"
|
||||
echo "Create it (touch $PROFILE) and run this script again"
|
||||
else
|
||||
echo "Profile $ZPROFILE not found"
|
||||
echo "Create it (touch $ZPROFILE) and run this script again"
|
||||
fi
|
||||
echo " OR"
|
||||
echo "Append the following line to the correct file yourself:"
|
||||
echo
|
||||
echo " $SOURCE_STR"
|
||||
echo
|
||||
else
|
||||
[ -n "$PROFILE" ] && _dnvmsetup_update_profile "$PROFILE" "$SOURCE_STR"
|
||||
[ -n "$ZPROFILE" ] && _dnvmsetup_update_profile "$ZPROFILE" "$SOURCE_STR"
|
||||
fi
|
||||
|
||||
echo "Type 'source $DNX_USER_HOME/dnvm/dnvm.sh' to start using dnvm"
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
<?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>
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
using System;
|
||||
|
||||
public class Program
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
Console.WriteLine("Hello World");
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
"dependencies": {
|
||||
|
||||
},
|
||||
"commands": {
|
||||
"ConsoleApp": "ConsoleApp"
|
||||
},
|
||||
"frameworks": {
|
||||
"dnx451": { },
|
||||
"dnxcore50": {
|
||||
"dependencies": {
|
||||
"System.Console": "4.0.0-beta-22816"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
FROM microsoft/aspnet:1.0.0-beta4
|
||||
|
||||
COPY project.json /app/
|
||||
WORKDIR /app
|
||||
RUN ["dnu", "restore"]
|
||||
COPY . /app
|
||||
|
||||
EXPOSE 5004
|
||||
ENTRYPOINT ["dnx", "project.json", "kestrel"]
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
<?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>
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
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; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
"profiles": {
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNET_ENV": "Development"
|
||||
}
|
||||
},
|
||||
"kestrel": {
|
||||
"commandName": "kestrel",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "http://localhost:5004"
|
||||
},
|
||||
"web": {
|
||||
"commandName": "web",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "http://localhost:5001"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
using Microsoft.AspNet.Builder;
|
||||
using Microsoft.Framework.DependencyInjection;
|
||||
|
||||
namespace HelloMvc
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddMvc();
|
||||
}
|
||||
|
||||
public void Configure(IApplicationBuilder app)
|
||||
{
|
||||
app.UseErrorPage();
|
||||
|
||||
app.UseMvc(routes =>
|
||||
{
|
||||
routes.MapRoute("default", "{controller=Home}/{action=Index}/{id?}");
|
||||
});
|
||||
|
||||
app.UseWelcomePage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
@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 »</a></p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<h3 title="@Model.Name" class="@helloClass">Hello @Model.Name!</h3>
|
||||
</div>
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
<!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>© @DateTime.Now.Year - My ASP.NET Application</p>
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
{
|
||||
"version": "1.0.0-*",
|
||||
"webroot": "wwwroot",
|
||||
"exclude": [
|
||||
"wwwroot"
|
||||
],
|
||||
"packExclude": [
|
||||
"**.kproj",
|
||||
"**.user",
|
||||
"**.vspscc"
|
||||
],
|
||||
"dependencies": {
|
||||
"Kestrel": "1.0.0-beta4",
|
||||
"Microsoft.AspNet.Diagnostics": "1.0.0-beta4",
|
||||
"Microsoft.AspNet.Mvc": "6.0.0-beta4",
|
||||
"Microsoft.AspNet.Server.IIS": "1.0.0-beta4",
|
||||
"Microsoft.AspNet.Server.WebListener": "1.0.0-beta4"
|
||||
},
|
||||
"commands": {
|
||||
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5001",
|
||||
"kestrel": "Microsoft.AspNet.Hosting --server Kestrel --server.urls http://localhost:5004"
|
||||
},
|
||||
"frameworks": {
|
||||
"dnx451": { },
|
||||
"dnxcore50": { }
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 303 KiB |
|
|
@ -1,9 +0,0 @@
|
|||
FROM microsoft/aspnet:1.0.0-beta4
|
||||
|
||||
COPY project.json /app/
|
||||
WORKDIR /app
|
||||
RUN ["dnu", "restore"]
|
||||
COPY . /app
|
||||
|
||||
EXPOSE 5004
|
||||
ENTRYPOINT ["dnx", "project.json", "kestrel"]
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
<?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>
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
"profiles": {
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNET_ENV": "Development"
|
||||
}
|
||||
},
|
||||
"kestrel": {
|
||||
"commandName": "kestrel",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "http://localhost:5004"
|
||||
},
|
||||
"web": {
|
||||
"commandName": "web",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "http://localhost:5001"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
using Microsoft.AspNet.Builder;
|
||||
|
||||
namespace HelloWeb
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
public void Configure(IApplicationBuilder app)
|
||||
{
|
||||
app.UseStaticFiles();
|
||||
app.UseWelcomePage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
{
|
||||
"version": "1.0.0-*",
|
||||
"webroot": "wwwroot",
|
||||
"exclude": [
|
||||
"wwwroot"
|
||||
],
|
||||
"packExclude": [
|
||||
"**.kproj",
|
||||
"**.user",
|
||||
"**.vspscc"
|
||||
],
|
||||
"dependencies": {
|
||||
"Kestrel": "1.0.0-beta4",
|
||||
"Microsoft.AspNet.Diagnostics": "1.0.0-beta4",
|
||||
"Microsoft.AspNet.Hosting": "1.0.0-beta4",
|
||||
"Microsoft.AspNet.Server.IIS": "1.0.0-beta4",
|
||||
"Microsoft.AspNet.Server.WebListener": "1.0.0-beta4",
|
||||
"Microsoft.AspNet.StaticFiles": "1.0.0-beta4"
|
||||
},
|
||||
"commands": {
|
||||
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5001",
|
||||
"kestrel": "Microsoft.AspNet.Hosting --server Kestrel --server.urls http://localhost:5004"
|
||||
},
|
||||
"frameworks": {
|
||||
"dnx451": { },
|
||||
"dnxcore50": { }
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 303 KiB |
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<clear />
|
||||
<add key="NuGetorg" value="https://nuget.org/api/v2/" />
|
||||
</packageSources>
|
||||
</configuration>
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"sdk": {
|
||||
"version": "1.0.0-beta4"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
<?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>
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
using System;
|
||||
|
||||
public class Program
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
Console.WriteLine("Hello World");
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
"dependencies": {
|
||||
|
||||
},
|
||||
"commands": {
|
||||
"ConsoleApp": "ConsoleApp"
|
||||
},
|
||||
"frameworks": {
|
||||
"dnx451": { },
|
||||
"dnxcore50": {
|
||||
"dependencies": {
|
||||
"System.Console": "4.0.0-beta-23019"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
FROM microsoft/aspnet:1.0.0-beta5
|
||||
|
||||
COPY project.json /app/
|
||||
WORKDIR /app
|
||||
RUN ["dnu", "restore"]
|
||||
COPY . /app
|
||||
|
||||
EXPOSE 5004
|
||||
ENTRYPOINT ["dnx", "project.json", "kestrel"]
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
<?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>
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
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; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
"profiles": {
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNET_ENV": "Development"
|
||||
}
|
||||
},
|
||||
"kestrel": {
|
||||
"commandName": "kestrel",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "http://localhost:5004"
|
||||
},
|
||||
"web": {
|
||||
"commandName": "web",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "http://localhost:5001"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
using Microsoft.AspNet.Builder;
|
||||
using Microsoft.Framework.DependencyInjection;
|
||||
using Microsoft.Framework.Logging;
|
||||
|
||||
namespace HelloMvc
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddMvc();
|
||||
}
|
||||
|
||||
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
|
||||
{
|
||||
loggerFactory.AddConsole();
|
||||
|
||||
app.UseErrorPage();
|
||||
|
||||
app.UseMvcWithDefaultRoute();
|
||||
|
||||
app.UseWelcomePage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
@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 »</a></p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<h3 title="@Model.Name" class="@helloClass">Hello @Model.Name!</h3>
|
||||
</div>
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
<!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>© @DateTime.Now.Year - My ASP.NET Application</p>
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
{
|
||||
"version": "1.0.0-*",
|
||||
"webroot": "wwwroot",
|
||||
"exclude": [
|
||||
"wwwroot"
|
||||
],
|
||||
"packExclude": [
|
||||
"**.kproj",
|
||||
"**.user",
|
||||
"**.vspscc"
|
||||
],
|
||||
"dependencies": {
|
||||
"Kestrel": "1.0.0-beta5",
|
||||
"Microsoft.AspNet.Diagnostics": "1.0.0-beta5",
|
||||
"Microsoft.AspNet.Mvc": "6.0.0-beta5",
|
||||
"Microsoft.AspNet.Server.IIS": "1.0.0-beta5",
|
||||
"Microsoft.AspNet.Server.WebListener": "1.0.0-beta5",
|
||||
"Microsoft.Framework.Logging.Console": "1.0.0-beta5"
|
||||
},
|
||||
"commands": {
|
||||
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5001",
|
||||
"kestrel": "Microsoft.AspNet.Hosting --server Kestrel --server.urls http://localhost:5004"
|
||||
},
|
||||
"frameworks": {
|
||||
"dnx451": { },
|
||||
"dnxcore50": { }
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 303 KiB |
|
|
@ -1,9 +0,0 @@
|
|||
FROM microsoft/aspnet:1.0.0-beta5
|
||||
|
||||
COPY project.json /app/
|
||||
WORKDIR /app
|
||||
RUN ["dnu", "restore"]
|
||||
COPY . /app
|
||||
|
||||
EXPOSE 5004
|
||||
ENTRYPOINT ["dnx", "project.json", "kestrel"]
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
<?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>
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
"profiles": {
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNET_ENV": "Development"
|
||||
}
|
||||
},
|
||||
"kestrel": {
|
||||
"commandName": "kestrel",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "http://localhost:5004"
|
||||
},
|
||||
"web": {
|
||||
"commandName": "web",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "http://localhost:5001"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
using Microsoft.AspNet.Builder;
|
||||
using Microsoft.Framework.Logging;
|
||||
|
||||
namespace HelloWeb
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
|
||||
{
|
||||
loggerFactory.AddConsole();
|
||||
app.UseStaticFiles();
|
||||
app.UseWelcomePage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
{
|
||||
"version": "1.0.0-*",
|
||||
"webroot": "wwwroot",
|
||||
"exclude": [
|
||||
"wwwroot"
|
||||
],
|
||||
"packExclude": [
|
||||
"**.kproj",
|
||||
"**.user",
|
||||
"**.vspscc"
|
||||
],
|
||||
"dependencies": {
|
||||
"Kestrel": "1.0.0-beta5",
|
||||
"Microsoft.AspNet.Diagnostics": "1.0.0-beta5",
|
||||
"Microsoft.AspNet.Hosting": "1.0.0-beta5",
|
||||
"Microsoft.AspNet.Server.IIS": "1.0.0-beta5",
|
||||
"Microsoft.AspNet.Server.WebListener": "1.0.0-beta5",
|
||||
"Microsoft.AspNet.StaticFiles": "1.0.0-beta5",
|
||||
"Microsoft.Framework.Logging.Console": "1.0.0-beta5"
|
||||
},
|
||||
"commands": {
|
||||
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5001",
|
||||
"kestrel": "Microsoft.AspNet.Hosting --server Kestrel --server.urls http://localhost:5004"
|
||||
},
|
||||
"frameworks": {
|
||||
"dnx451": { },
|
||||
"dnxcore50": { }
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 303 KiB |
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<clear />
|
||||
<add key="NuGetorg" value="https://nuget.org/api/v2/" />
|
||||
</packageSources>
|
||||
</configuration>
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"sdk": {
|
||||
"version": "1.0.0-beta5"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
<?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>
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
using System;
|
||||
|
||||
public class Program
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
Console.WriteLine("Hello World");
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
"dependencies": {
|
||||
|
||||
},
|
||||
"commands": {
|
||||
"ConsoleApp": "ConsoleApp"
|
||||
},
|
||||
"frameworks": {
|
||||
"dnx451": { },
|
||||
"dnxcore50": {
|
||||
"dependencies": {
|
||||
"System.Console": "4.0.0-beta-23109"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
FROM microsoft/aspnet:1.0.0-beta6
|
||||
|
||||
COPY project.json /app/
|
||||
WORKDIR /app
|
||||
RUN ["dnu", "restore"]
|
||||
COPY . /app
|
||||
|
||||
EXPOSE 5004
|
||||
ENTRYPOINT ["dnx", "project.json", "kestrel"]
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
<?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>
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
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; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
"profiles": {
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNET_ENV": "Development"
|
||||
}
|
||||
},
|
||||
"kestrel": {
|
||||
"commandName": "kestrel",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "http://localhost:5004"
|
||||
},
|
||||
"web": {
|
||||
"commandName": "web",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "http://localhost:5001"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
using Microsoft.AspNet.Builder;
|
||||
using Microsoft.Framework.DependencyInjection;
|
||||
using Microsoft.Framework.Logging;
|
||||
|
||||
namespace HelloMvc
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddMvc();
|
||||
}
|
||||
|
||||
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
|
||||
{
|
||||
loggerFactory.AddConsole();
|
||||
|
||||
app.UseErrorPage();
|
||||
|
||||
app.UseMvcWithDefaultRoute();
|
||||
|
||||
app.UseWelcomePage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
@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 »</a></p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<h3 title="@Model.Name" class="@helloClass">Hello @Model.Name!</h3>
|
||||
</div>
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
<!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>© @DateTime.Now.Year - My ASP.NET Application</p>
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
{
|
||||
"version": "1.0.0-*",
|
||||
"webroot": "wwwroot",
|
||||
"exclude": [
|
||||
"wwwroot"
|
||||
],
|
||||
"packExclude": [
|
||||
"**.kproj",
|
||||
"**.user",
|
||||
"**.vspscc"
|
||||
],
|
||||
"dependencies": {
|
||||
"Kestrel": "1.0.0-beta6",
|
||||
"Microsoft.AspNet.Diagnostics": "1.0.0-beta6",
|
||||
"Microsoft.AspNet.Mvc": "6.0.0-beta6",
|
||||
"Microsoft.AspNet.Server.IIS": "1.0.0-beta6",
|
||||
"Microsoft.AspNet.Server.WebListener": "1.0.0-beta6",
|
||||
"Microsoft.Framework.Logging.Console": "1.0.0-beta6"
|
||||
},
|
||||
"commands": {
|
||||
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5001",
|
||||
"kestrel": "Microsoft.AspNet.Hosting --server Kestrel --server.urls http://localhost:5004"
|
||||
},
|
||||
"frameworks": {
|
||||
"dnx451": { },
|
||||
"dnxcore50": { }
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 303 KiB |
|
|
@ -1,9 +0,0 @@
|
|||
FROM microsoft/aspnet:1.0.0-beta6
|
||||
|
||||
COPY project.json /app/
|
||||
WORKDIR /app
|
||||
RUN ["dnu", "restore"]
|
||||
COPY . /app
|
||||
|
||||
EXPOSE 5004
|
||||
ENTRYPOINT ["dnx", "project.json", "kestrel"]
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
<?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>
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
"profiles": {
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNET_ENV": "Development"
|
||||
}
|
||||
},
|
||||
"kestrel": {
|
||||
"commandName": "kestrel",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "http://localhost:5004"
|
||||
},
|
||||
"web": {
|
||||
"commandName": "web",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "http://localhost:5001"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
using Microsoft.AspNet.Builder;
|
||||
using Microsoft.Framework.Logging;
|
||||
|
||||
namespace HelloWeb
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
|
||||
{
|
||||
loggerFactory.AddConsole();
|
||||
app.UseStaticFiles();
|
||||
app.UseWelcomePage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
{
|
||||
"version": "1.0.0-*",
|
||||
"webroot": "wwwroot",
|
||||
"exclude": [
|
||||
"wwwroot"
|
||||
],
|
||||
"packExclude": [
|
||||
"**.kproj",
|
||||
"**.user",
|
||||
"**.vspscc"
|
||||
],
|
||||
"dependencies": {
|
||||
"Kestrel": "1.0.0-beta6",
|
||||
"Microsoft.AspNet.Diagnostics": "1.0.0-beta6",
|
||||
"Microsoft.AspNet.Hosting": "1.0.0-beta6",
|
||||
"Microsoft.AspNet.Server.IIS": "1.0.0-beta6",
|
||||
"Microsoft.AspNet.Server.WebListener": "1.0.0-beta6",
|
||||
"Microsoft.AspNet.StaticFiles": "1.0.0-beta6",
|
||||
"Microsoft.Framework.Logging.Console": "1.0.0-beta6"
|
||||
},
|
||||
"commands": {
|
||||
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5001",
|
||||
"kestrel": "Microsoft.AspNet.Hosting --server Kestrel --server.urls http://localhost:5004"
|
||||
},
|
||||
"frameworks": {
|
||||
"dnx451": { },
|
||||
"dnxcore50": { }
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 303 KiB |
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<clear />
|
||||
<add key="NuGetorg" value="https://nuget.org/api/v2/" />
|
||||
</packageSources>
|
||||
</configuration>
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"sdk": {
|
||||
"version": "1.0.0-beta6"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
<?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>
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
using System;
|
||||
|
||||
public class Program
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
Console.WriteLine("Hello World");
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
"dependencies": {
|
||||
|
||||
},
|
||||
"commands": {
|
||||
"ConsoleApp": "ConsoleApp"
|
||||
},
|
||||
"frameworks": {
|
||||
"dnx451": { },
|
||||
"dnxcore50": {
|
||||
"dependencies": {
|
||||
"System.Console": "4.0.0-beta-23220"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
FROM microsoft/aspnet:1.0.0-beta7
|
||||
|
||||
COPY project.json /app/
|
||||
WORKDIR /app
|
||||
RUN ["dnu", "restore"]
|
||||
COPY . /app
|
||||
|
||||
EXPOSE 5004
|
||||
ENTRYPOINT ["dnx", "-p", "project.json", "kestrel"]
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
<?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>
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
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; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
"profiles": {
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNET_ENV": "Development"
|
||||
}
|
||||
},
|
||||
"kestrel": {
|
||||
"commandName": "kestrel",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "http://localhost:5004"
|
||||
},
|
||||
"web": {
|
||||
"commandName": "web",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "http://localhost:5001"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
using Microsoft.AspNet.Builder;
|
||||
using Microsoft.Framework.DependencyInjection;
|
||||
using Microsoft.Framework.Logging;
|
||||
|
||||
namespace HelloMvc
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddMvc();
|
||||
}
|
||||
|
||||
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
|
||||
{
|
||||
loggerFactory.AddConsole();
|
||||
|
||||
app.UseErrorPage();
|
||||
|
||||
app.UseMvcWithDefaultRoute();
|
||||
|
||||
app.UseWelcomePage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
@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 »</a></p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<h3 title="@Model.Name" class="@helloClass">Hello @Model.Name!</h3>
|
||||
</div>
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
<!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>© @DateTime.Now.Year - My ASP.NET Application</p>
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
{
|
||||
"version": "1.0.0-*",
|
||||
"webroot": "wwwroot",
|
||||
"exclude": [
|
||||
"wwwroot"
|
||||
],
|
||||
"packExclude": [
|
||||
"**.xproj",
|
||||
"**.user",
|
||||
"**.vspscc"
|
||||
],
|
||||
"dependencies": {
|
||||
"Microsoft.AspNet.Server.Kestrel": "1.0.0-beta7",
|
||||
"Microsoft.AspNet.Diagnostics": "1.0.0-beta7",
|
||||
"Microsoft.AspNet.Mvc": "6.0.0-beta7",
|
||||
"Microsoft.AspNet.Server.IIS": "1.0.0-beta7",
|
||||
"Microsoft.AspNet.Server.WebListener": "1.0.0-beta7",
|
||||
"Microsoft.Framework.Logging.Console": "1.0.0-beta7"
|
||||
},
|
||||
"commands": {
|
||||
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5001",
|
||||
"kestrel": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://localhost:5004"
|
||||
},
|
||||
"frameworks": {
|
||||
"dnx451": { },
|
||||
"dnxcore50": { }
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 303 KiB |
|
|
@ -1,9 +0,0 @@
|
|||
FROM microsoft/aspnet:1.0.0-beta7
|
||||
|
||||
COPY project.json /app/
|
||||
WORKDIR /app
|
||||
RUN ["dnu", "restore"]
|
||||
COPY . /app
|
||||
|
||||
EXPOSE 5004
|
||||
ENTRYPOINT ["dnx", "-p", "project.json", "kestrel"]
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
<?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>
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
"profiles": {
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNET_ENV": "Development"
|
||||
}
|
||||
},
|
||||
"kestrel": {
|
||||
"commandName": "kestrel",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "http://localhost:5004"
|
||||
},
|
||||
"web": {
|
||||
"commandName": "web",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "http://localhost:5001"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
using Microsoft.AspNet.Builder;
|
||||
using Microsoft.Framework.Logging;
|
||||
|
||||
namespace HelloWeb
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
|
||||
{
|
||||
loggerFactory.AddConsole();
|
||||
app.UseStaticFiles();
|
||||
app.UseWelcomePage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
{
|
||||
"version": "1.0.0-*",
|
||||
"webroot": "wwwroot",
|
||||
"exclude": [
|
||||
"wwwroot"
|
||||
],
|
||||
"packExclude": [
|
||||
"**.xproj",
|
||||
"**.user",
|
||||
"**.vspscc"
|
||||
],
|
||||
"dependencies": {
|
||||
"Microsoft.AspNet.Server.Kestrel": "1.0.0-beta7",
|
||||
"Microsoft.AspNet.Diagnostics": "1.0.0-beta7",
|
||||
"Microsoft.AspNet.Hosting": "1.0.0-beta7",
|
||||
"Microsoft.AspNet.Server.IIS": "1.0.0-beta7",
|
||||
"Microsoft.AspNet.Server.WebListener": "1.0.0-beta7",
|
||||
"Microsoft.AspNet.StaticFiles": "1.0.0-beta7",
|
||||
"Microsoft.Framework.Logging.Console": "1.0.0-beta7"
|
||||
},
|
||||
"commands": {
|
||||
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5001",
|
||||
"kestrel": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://localhost:5004"
|
||||
},
|
||||
"frameworks": {
|
||||
"dnx451": { },
|
||||
"dnxcore50": { }
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 303 KiB |
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<clear />
|
||||
<add key="NuGetorg" value="https://nuget.org/api/v2/" />
|
||||
</packageSources>
|
||||
</configuration>
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"sdk": {
|
||||
"version": "1.0.0-beta7"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
<?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>
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
using System;
|
||||
|
||||
public class Program
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
Console.WriteLine("Hello World");
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
"dependencies": {
|
||||
|
||||
},
|
||||
"commands": {
|
||||
"ConsoleApp": "ConsoleApp"
|
||||
},
|
||||
"frameworks": {
|
||||
"dnx451": { },
|
||||
"dnxcore50": {
|
||||
"dependencies": {
|
||||
"System.Console": "4.0.0-beta-23409"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
FROM microsoft/aspnet:1.0.0-beta8
|
||||
|
||||
COPY . /app/
|
||||
WORKDIR /app
|
||||
RUN ["dnu", "restore"]
|
||||
|
||||
EXPOSE 5004
|
||||
ENTRYPOINT ["dnx", "-p", "project.json", "web"]
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
<?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>
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
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; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
"profiles": {
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNET_ENV": "Development"
|
||||
}
|
||||
},
|
||||
"web": {
|
||||
"commandName": "web",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "http://localhost:5004"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
using Microsoft.AspNet.Builder;
|
||||
using Microsoft.Framework.DependencyInjection;
|
||||
using Microsoft.Framework.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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
@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 »</a></p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<h3 title="@Model.Name" class="@helloClass">Hello @Model.Name!</h3>
|
||||
</div>
|
||||