Merge remote-tracking branch 'upstream/dev' into dev

This commit is contained in:
Thomas L. Kjeldsen 2015-06-15 00:06:07 +02:00
commit a89847f357
8 changed files with 68 additions and 40 deletions

View File

@ -17,14 +17,14 @@ Please log a new issue in the appropriate GitHub repo. Here are some of the most
* [MVC](https://github.com/aspnet/Mvc) * [MVC](https://github.com/aspnet/Mvc)
* [SignalR-Server](https://github.com/aspnet/SignalR-Server) * [SignalR-Server](https://github.com/aspnet/SignalR-Server)
A description of all the repos is [here](https://github.com/aspnet/Home/wiki/Repo-List). Or browse the full list of repos in the [aspnet](https://github.com/aspnet/) organization.
## Other discussions ## Other discussions
Our team members also monitor several other discussion forums: Our team members also monitor several other discussion forums:
* [ASP.NET vNext forum](http://forums.asp.net/1255.aspx/1?ASP+NET+vNext) * [ASP.NET 5 forum](http://forums.asp.net/1255.aspx/1?ASP+NET+5)
* [StackOverflow](http://stackoverflow.com/questions/tagged/asp.net-vnext) with the `asp.net-vnext` or `entity-framework-7` tag * [StackOverflow](http://stackoverflow.com/questions/tagged/asp.net-5) with the `asp.net-5` or `entity-framework-7` tag
* [JabbR chat room](https://jabbr.net/#/rooms/aspnetvnext) for real-time discussions with the community and the people who work on the project * [JabbR chat room](https://jabbr.net/#/rooms/aspnetvnext) for real-time discussions with the community and the people who work on the project
@ -45,7 +45,7 @@ GitHub supports [markdown](http://github.github.com/github-flavored-markdown/),
## Contributing code and content ## Contributing code and content
You will need to sign a [Contributor License Agreement](https://cla.msopentech.com) before submitting your pull request. To complete the Contributor License Agreement (CLA), you will need to submit a request via the form and then electronically sign the Contributor License Agreement when you receive the email containing the link to the document. This needs to only be done once for any Microsoft Open Technologies OSS project. You will need to sign a [Contributor License Agreement](https://cla2.dotnetfoundation.org/) before submitting your pull request. To complete the Contributor License Agreement (CLA), you will need to submit a request via the form and then electronically sign the Contributor License Agreement when you receive the email containing the link to the document. This needs to only be done once for any .NET Foundation OSS project.
Make sure you can build the code. Familiarize yourself with the project workflow and our coding conventions. If you don't know what a pull request is read this article: https://help.github.com/articles/using-pull-requests. Make sure you can build the code. Familiarize yourself with the project workflow and our coding conventions. If you don't know what a pull request is read this article: https://help.github.com/articles/using-pull-requests.

View File

@ -69,7 +69,7 @@ To get these builds you need to run:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF 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 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 update
sudo apt-get install Mono-Complete sudo apt-get install mono-complete
``` ```
### Get libuv ### Get libuv

View File

@ -47,8 +47,21 @@ brew tap aspnet/dnx
brew update brew update
brew install dnvm brew install dnvm
``` ```
Add dnvm to your bash profile (./bash_profile)
```bash
source dnvm
```
Note that on Windows the .NET Framework is already installed, whereas on OS X the brew formula uses a particular version of [Mono](http://www.mono-project.com/) that we know works with ASP.NET 5. Note that on Windows the .NET Framework is already installed, whereas on OS X the brew formula uses a particular version of [Mono](http://www.mono-project.com/) that we know works with ASP.NET 5.
To verify that everything works run the `dnvm` command.
Should that fail, for example with `-bash: dnvm: command not found`, run the command `source dnvm.sh`. This means that `dnvm` will be available in this session.
To make sure `dnvm` is available for *every* session, add the command to your `~/.bashrc` with the following command `echo "source dnvm.sh" >> ~/.bashrc`.
## Linux ## Linux
* [Debian, Ubuntu and derivatives see here](GettingStartedDeb.md) * [Debian, Ubuntu and derivatives see here](GettingStartedDeb.md)
@ -74,7 +87,7 @@ You should also be able to run `dnx` and see the help text of the `dnx` command.
2. Change directory to the folder of the sample you want to run 2. Change directory to the folder of the sample you want to run
3. Run ```dnu restore``` to restore the packages required by that sample. 3. Run ```dnu restore``` to restore the packages required by that sample.
4. You should see a bunch of output as all the dependencies of the app are downloaded from MyGet. 4. You should see a bunch of output as all the dependencies of the app are downloaded from MyGet.
5. Run the sample using the appropriate K command: 5. Run the sample using the appropriate DNX command:
- For the console app run `dnx . run`. - For the console app run `dnx . run`.
- For the web apps run `dnx . web` on Windows or `dnx . kestrel` on OS X/Linux. - For the web apps run `dnx . web` on Windows or `dnx . kestrel` on OS X/Linux.
6. You should see the output of the console app or a message that says the site is now started. 6. You should see the output of the console app or a message that says the site is now started.
@ -110,5 +123,5 @@ A description of all the repos is [here](https://github.com/aspnet/Home/wiki/Rep
# Feedback # Feedback
Check out the [contributing](https://github.com/aspnet/Home/blob/release/CONTRIBUTING.md) page to see the best places to log issues and start discussions. Check out the [contributing](CONTRIBUTING.md) page to see the best places to log issues and start discussions.

View File

@ -1,4 +1,4 @@
#Requires -Version 3 #Requires -Version 2
if (Test-Path env:WEBSITE_SITE_NAME) if (Test-Path env:WEBSITE_SITE_NAME)
{ {
@ -67,7 +67,7 @@ function _WriteOut {
### Constants ### Constants
$ProductVersion="1.0.0" $ProductVersion="1.0.0"
$BuildVersion="beta5-10374" $BuildVersion="beta6-10383"
$Authors="Microsoft Open Technologies, Inc." $Authors="Microsoft Open Technologies, Inc."
# If the Version hasn't been replaced... # If the Version hasn't been replaced...
@ -86,7 +86,7 @@ Set-Variable -Option Constant "OldUserDirectoryNames" @(".kre", ".k")
Set-Variable -Option Constant "RuntimePackageName" "dnx" Set-Variable -Option Constant "RuntimePackageName" "dnx"
Set-Variable -Option Constant "DefaultFeed" "https://www.nuget.org/api/v2" Set-Variable -Option Constant "DefaultFeed" "https://www.nuget.org/api/v2"
Set-Variable -Option Constant "DefaultUnstableFeed" "https://www.myget.org/F/aspnetvnext/api/v2" Set-Variable -Option Constant "DefaultUnstableFeed" "https://www.myget.org/F/aspnetvnext/api/v2"
Set-Variable -Option Constant "CrossGenCommand" "k-crossgen" Set-Variable -Option Constant "CrossGenCommand" "dnx-crossgen"
Set-Variable -Option Constant "CommandPrefix" "dnvm-" Set-Variable -Option Constant "CommandPrefix" "dnvm-"
Set-Variable -Option Constant "DefaultArchitecture" "x86" Set-Variable -Option Constant "DefaultArchitecture" "x86"
Set-Variable -Option Constant "DefaultRuntime" "clr" Set-Variable -Option Constant "DefaultRuntime" "clr"
@ -252,7 +252,7 @@ function Safe-Filecopy {
} }
function GetArch($Architecture, $FallBackArch = $DefaultArchitecture) { function GetArch($Architecture, $FallBackArch = $DefaultArchitecture) {
if(![String]::IsNullOrWhiteSpace($Architecture)) { if(![String]::IsNullOrEmpty($Architecture)) {
$Architecture $Architecture
} elseif($CompatArch) { } elseif($CompatArch) {
$CompatArch $CompatArch
@ -262,7 +262,7 @@ function GetArch($Architecture, $FallBackArch = $DefaultArchitecture) {
} }
function GetRuntime($Runtime) { function GetRuntime($Runtime) {
if(![String]::IsNullOrWhiteSpace($Runtime)) { if(![String]::IsNullOrEmpty($Runtime)) {
$Runtime $Runtime
} else { } else {
$DefaultRuntime $DefaultRuntime
@ -560,7 +560,7 @@ function Download-Package(
} }
} }
Write-Progress -Activity ("Downloading $RuntimeShortFriendlyName from $url") -Id 2 -ParentId 1 -Completed Write-Progress -Status "Done" -Activity ("Downloading $RuntimeShortFriendlyName from $url") -Id 2 -ParentId 1 -Completed
} }
finally { finally {
Remove-Variable downloadData -Scope "Global" Remove-Variable downloadData -Scope "Global"
@ -632,10 +632,10 @@ function Change-Path() {
$newPath = $prependPath $newPath = $prependPath
foreach($portion in $existingPaths.Split(';')) { foreach($portion in $existingPaths.Split(';')) {
if(![string]::IsNullOrWhiteSpace($portion)) { if(![string]::IsNullOrEmpty($portion)) {
$skip = $portion -eq "" $skip = $portion -eq ""
foreach($removePath in $removePaths) { foreach($removePath in $removePaths) {
if(![string]::IsNullOrWhiteSpace($removePath)) { if(![string]::IsNullOrEmpty($removePath)) {
$removePrefix = if($removePath.EndsWith("\")) { $removePath } else { "$removePath\" } $removePrefix = if($removePath.EndsWith("\")) { $removePath } else { "$removePath\" }
if ($removePath -and (($portion -eq $removePath) -or ($portion.StartsWith($removePrefix)))) { if ($removePath -and (($portion -eq $removePath) -or ($portion.StartsWith($removePrefix)))) {
@ -645,7 +645,7 @@ function Change-Path() {
} }
} }
if (!$skip) { if (!$skip) {
if(![String]::IsNullOrWhiteSpace($newPath)) { if(![String]::IsNullOrEmpty($newPath)) {
$newPath += ";" $newPath += ";"
} }
$newPath += $portion $newPath += $portion
@ -751,8 +751,8 @@ function dnvm-help {
$Script:ExitCodes = $ExitCodes.UnknownCommand $Script:ExitCodes = $ExitCodes.UnknownCommand
return return
} }
$help = Get-Help "dnvm-$Command" $help = Get-Help "dnvm-$Command" -ShowWindow:$false
if($PassThru) { if($PassThru -Or $Host.Version.Major -lt 3) {
$help $help
} else { } else {
_WriteOut -ForegroundColor $ColorScheme.Help_Header "$CommandName $Command" _WriteOut -ForegroundColor $ColorScheme.Help_Header "$CommandName $Command"
@ -833,7 +833,7 @@ function dnvm-help {
_WriteOut -ForegroundColor $ColorScheme.Help_Header "commands: " _WriteOut -ForegroundColor $ColorScheme.Help_Header "commands: "
Get-Command "$CommandPrefix*" | Get-Command "$CommandPrefix*" |
ForEach-Object { ForEach-Object {
$h = Get-Help $_.Name $h = Get-Help $_.Name -ShowWindow:$false
$name = $_.Name.Substring($CommandPrefix.Length) $name = $_.Name.Substring($CommandPrefix.Length)
if($DeprecatedCommands -notcontains $name) { if($DeprecatedCommands -notcontains $name) {
_WriteOut -NoNewLine " " _WriteOut -NoNewLine " "
@ -1084,7 +1084,7 @@ function dnvm-install {
} }
if ($VersionNuPkgOrAlias -eq "latest") { if ($VersionNuPkgOrAlias -eq "latest") {
Write-Progress -Activity "Installing runtime" "Determining latest runtime" -Id 1 Write-Progress -Status "Determining Latest Runtime" -Activity "Installing runtime" -Id 1
$VersionNuPkgOrAlias = Find-Latest $Runtime $Architecture -Feed:$selectedFeed $VersionNuPkgOrAlias = Find-Latest $Runtime $Architecture -Feed:$selectedFeed
} }
@ -1094,7 +1094,7 @@ function dnvm-install {
if(!(Test-Path $VersionNuPkgOrAlias)) { if(!(Test-Path $VersionNuPkgOrAlias)) {
throw "Unable to locate package file: '$VersionNuPkgOrAlias'" throw "Unable to locate package file: '$VersionNuPkgOrAlias'"
} }
Write-Progress -Activity "Installing runtime" "Parsing package file name" -Id 1 Write-Progress -Activity "Installing runtime" -Status "Parsing package file name" -Id 1
$runtimeFullName = [System.IO.Path]::GetFileNameWithoutExtension($VersionNuPkgOrAlias) $runtimeFullName = [System.IO.Path]::GetFileNameWithoutExtension($VersionNuPkgOrAlias)
$Architecture = Get-PackageArch $runtimeFullName $Architecture = Get-PackageArch $runtimeFullName
$Runtime = Get-PackageRuntime $runtimeFullName $Runtime = Get-PackageRuntime $runtimeFullName
@ -1134,26 +1134,29 @@ function dnvm-install {
New-Item -Type Directory $UnpackFolder | Out-Null New-Item -Type Directory $UnpackFolder | Out-Null
if($IsNuPkg) { if($IsNuPkg) {
Write-Progress -Activity "Installing runtime" "Copying package" -Id 1 Write-Progress -Activity "Installing runtime" -Status "Copying package" -Id 1
_WriteDebug "Copying local nupkg $VersionNuPkgOrAlias to $DownloadFile" _WriteDebug "Copying local nupkg $VersionNuPkgOrAlias to $DownloadFile"
Copy-Item $VersionNuPkgOrAlias $DownloadFile Copy-Item $VersionNuPkgOrAlias $DownloadFile
} else { } else {
# Download the package # Download the package
Write-Progress -Activity "Installing runtime" "Downloading runtime" -Id 1 Write-Progress -Activity "Installing runtime" -Status "Downloading runtime" -Id 1
_WriteDebug "Downloading version $VersionNuPkgOrAlias to $DownloadFile" _WriteDebug "Downloading version $VersionNuPkgOrAlias to $DownloadFile"
Download-Package $PackageVersion $Architecture $Runtime $DownloadFile -Proxy:$Proxy -Feed:$selectedFeed Download-Package $PackageVersion $Architecture $Runtime $DownloadFile -Proxy:$Proxy -Feed:$selectedFeed
} }
Write-Progress -Activity "Installing runtime" "Unpacking runtime" -Id 1 Write-Progress -Activity "Installing runtime" -Status "Unpacking runtime" -Id 1
Unpack-Package $DownloadFile $UnpackFolder Unpack-Package $DownloadFile $UnpackFolder
New-Item -Type Directory $RuntimeFolder -Force | Out-Null if(Test-Path $RuntimeFolder) {
_WriteOut "Installing to $RuntimeFolder" # Ensure the runtime hasn't been installed in the time it took to download the package.
_WriteDebug "Moving package contents to $RuntimeFolder" _WriteOut "'$runtimeFullName' is already installed."
Move-Item "$UnpackFolder\*" $RuntimeFolder }
_WriteDebug "Cleaning temporary directory $UnpackFolder" else {
Remove-Item $UnpackFolder -Force | Out-Null _WriteOut "Installing to $RuntimeFolder"
_WriteDebug "Moving package contents to $RuntimeFolder"
Move-Item $UnpackFolder $RuntimeFolder
}
dnvm-use $PackageVersion -Architecture:$Architecture -Runtime:$Runtime -Persistent:$Persistent dnvm-use $PackageVersion -Architecture:$Architecture -Runtime:$Runtime -Persistent:$Persistent
@ -1161,7 +1164,7 @@ function dnvm-install {
if (-not $NoNative) { if (-not $NoNative) {
if ((Is-Elevated) -or $Ngen) { if ((Is-Elevated) -or $Ngen) {
$runtimeBin = Get-RuntimePath $runtimeFullName $runtimeBin = Get-RuntimePath $runtimeFullName
Write-Progress -Activity "Installing runtime" "Generating runtime native images" -Id 1 Write-Progress -Activity "Installing runtime" -Status "Generating runtime native images" -Id 1
Ngen-Library $runtimeBin $Architecture Ngen-Library $runtimeBin $Architecture
} }
else { else {
@ -1175,7 +1178,7 @@ function dnvm-install {
} }
else { else {
_WriteOut "Compiling native images for $runtimeFullName to improve startup performance..." _WriteOut "Compiling native images for $runtimeFullName to improve startup performance..."
Write-Progress -Activity "Installing runtime" "Generating runtime native images" -Id 1 Write-Progress -Activity "Installing runtime" -Status "Generating runtime native images" -Id 1
if ($DebugPreference -eq 'SilentlyContinue') { if ($DebugPreference -eq 'SilentlyContinue') {
Start-Process $CrossGenCommand -Wait -WindowStyle Hidden Start-Process $CrossGenCommand -Wait -WindowStyle Hidden
} }
@ -1195,7 +1198,7 @@ function dnvm-install {
dnvm-alias $Alias $PackageVersion -Architecture:$Architecture -Runtime:$Runtime dnvm-alias $Alias $PackageVersion -Architecture:$Architecture -Runtime:$Runtime
} }
Write-Progress -Activity "Install complete" -Id 1 -Complete Write-Progress -Status "Done" -Activity "Install complete" -Id 1 -Complete
} }
@ -1428,7 +1431,11 @@ if(!$cmd) {
try { try {
if(Get-Command -Name "$CommandPrefix$cmd" -ErrorAction SilentlyContinue) { if(Get-Command -Name "$CommandPrefix$cmd" -ErrorAction SilentlyContinue) {
_WriteDebug "& dnvm-$cmd $cmdargs" _WriteDebug "& dnvm-$cmd $cmdargs"
& "dnvm-$cmd" @cmdargs if($host.Version.Major -lt 3) {
Invoke-Command ([ScriptBlock]::Create("dnvm-$cmd $cmdargs"))
} else {
& "dnvm-$cmd" @cmdargs
}
} }
else { else {
_WriteOut "Unknown command: '$cmd'" _WriteOut "Unknown command: '$cmd'"

View File

@ -2,7 +2,7 @@
# Source this file from your .bash-profile or script to use # Source this file from your .bash-profile or script to use
# "Constants" # "Constants"
_DNVM_BUILDNUMBER="beta5-10374" _DNVM_BUILDNUMBER="beta6-10383"
_DNVM_AUTHORS="Microsoft Open Technologies, Inc." _DNVM_AUTHORS="Microsoft Open Technologies, Inc."
_DNVM_RUNTIME_PACKAGE_NAME="dnx" _DNVM_RUNTIME_PACKAGE_NAME="dnx"
_DNVM_RUNTIME_FRIENDLY_NAME=".NET Execution Environment" _DNVM_RUNTIME_FRIENDLY_NAME=".NET Execution Environment"

View File

@ -1,6 +1,6 @@
$tempPath = Join-Path $env:TEMP "dnvminstall" $tempPath = Join-Path $env:TEMP "dnvminstall"
$kvmPs1Path = Join-Path $tempPath "dnvm.ps1" $dnvmPs1Path = Join-Path $tempPath "dnvm.ps1"
$kvmCmdPath = Join-Path $tempPath "dnvm.cmd" $dnvmCmdPath = Join-Path $tempPath "dnvm.cmd"
Write-Host "Using temporary directory: $tempPath" Write-Host "Using temporary directory: $tempPath"
if (!(Test-Path $tempPath)) { md $tempPath | Out-Null } if (!(Test-Path $tempPath)) { md $tempPath | Out-Null }
@ -8,8 +8,8 @@ if (!(Test-Path $tempPath)) { md $tempPath | Out-Null }
$webClient = New-Object System.Net.WebClient $webClient = New-Object System.Net.WebClient
Write-Host "Downloading DNVM.ps1 to $dnvmPs1Path" Write-Host "Downloading DNVM.ps1 to $dnvmPs1Path"
$webClient.DownloadFile('https://raw.githubusercontent.com/aspnet/Home/dev/dnvm.ps1', $kvmPs1Path) $webClient.DownloadFile('https://raw.githubusercontent.com/aspnet/Home/dev/dnvm.ps1', $dnvmPs1Path)
Write-Host "Downloading DNVM.cmd to $dnvmCmdPath" Write-Host "Downloading DNVM.cmd to $dnvmCmdPath"
$webClient.DownloadFile('https://raw.githubusercontent.com/aspnet/Home/dev/dnvm.cmd', $kvmCmdPath) $webClient.DownloadFile('https://raw.githubusercontent.com/aspnet/Home/dev/dnvm.cmd', $dnvmCmdPath)
Write-Host "Installing DNVM" Write-Host "Installing DNVM"
& $kvmCmdPath setup & $dnvmCmdPath setup

View File

@ -0,0 +1,5 @@
{
"sdk": {
"version": "1.0.0-beta4"
}
}

View File

@ -0,0 +1,3 @@
{
}