GithubHelp home page GithubHelp logo

dotnet / aspnetcore Goto Github PK

View Code? Open in Web Editor NEW
34.3K 1.4K 9.7K 413.65 MB

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.

Home Page: https://asp.net

License: MIT License

Batchfile 0.04% Shell 0.31% Dockerfile 0.01% C# 91.17% PowerShell 0.48% Python 0.03% Makefile 0.01% Roff 0.01% C++ 2.08% C 0.21% HTML 2.51% JavaScript 0.24% CSS 0.15% TypeScript 1.82% F# 0.01% Lua 0.01% Smalltalk 0.01% Java 0.90% CMake 0.02% ASP.NET 0.01%
dotnet aspnetcore hacktoberfest help-wanted

aspnetcore's Introduction

dotnet/dotnet - Home of the .NET VMR

This repository is a Virtual Monolithic Repository (VMR) which includes all the source code and infrastructure needed to build the .NET SDK.

What this means:

  • Monolithic - a join of multiple repositories that make up the whole product, such as dotnet/runtime or dotnet/sdk.
  • Virtual - a mirror (not replacement) of product repos where sources from those repositories are synchronized into.

In the VMR, you can find:

Just like the development repositories, the VMR will have a release branch for every feature band (e.g. release/8.0.1xx). Similarly, VMR's main branch will follow main branches of product repositories (see Synchronization Based on Declared Dependencies).

More in-depth documentation about the VMR can be found in VMR Design And Operation. See also dotnet/source-build for more information about our whole-product source-build.

Goals

  • The main purpose of the dotnet/dotnet repository is to have all source code necessary to build the .NET product available in one repository and identified by a single commit.
  • The VMR also aims to become the place from which we release and service future versions of .NET to reduce the complexity of the product construction process. This should allow our partners and and 3rd parties to easily build, test and modify .NET using their custom infrastructure as well as make the process available to the community.
  • Lastly, we hope to solve other problems that the current multi-repo setup brings:
    • Enable the standard down-/up-stream open-source model.
    • Fulfill requirements of .NET distro builders such as RedHat or Canonical to natively include .NET in their distribution repositories.
    • Simplify scenarios such as client-run testing of bug fixes and improvements. The build should work in an offline environment too for certain platforms.
    • Enable developers to make and test changes spanning multiple repositories.
    • More efficient pipeline for security fixes during the CVE pre-disclosure process.

We will achieve these goals while keeping active coding work in the separate repos where it happens today. For example: ASP.NET features will continue to be developed in dotnet/aspnetcore and CLR features will be continue to be developed in dotnet/runtime. Each of these repos have their own distinct communities and processes, and aggregating development into a true mono-repo would work against that. Hence, the "virtual" monolithic repo: the VMR gives us the simplicity of a mono-repo for building and servicing the product, while active development of components of that product stays in its various existing repos. The day to day experience for typical contributors will not change.

Limitations

This is a work-in-progress. There are considerable limitations to what is possible at the moment. For an extensive list of current limitations, please see Temporary Mechanics.
See the Unified Build roadmap for more details.

Supported platforms

  • 8.0
    • source-build configuration on Linux
  • 9.0+ (WIP)
    • source-build configuration on Linux
    • non-source-build configuration on Linux, Mac, and Windows

For the latest information about Source-Build support for new .NET versions, please check our GitHub Discussions page for announcements.

Code flow

For the time being, the source code only flows one way - from the development repos into the VMR. More details on this process:

We expect the code flow to start working both ways in the .NET 9 timeframe. See the Unified Build roadmap for more details.

Contribution

At this time, the VMR will not accept any changes and is a read-only mirror of the development repositories only. Please, make the changes in the respective development repositories (e.g., dotnet/runtime or dotnet/sdk) and they will get synchronized into the VMR automatically.

Dev instructions

Please note that this repository is a work-in-progress and there are some usability issues connected to this. These can be nuisances such as some checked-in files getting modified by the build itself and similar. For the latest information about Source-Build support, please watch for announcements posted on our GitHub Discussions page.

Prerequisites

The dependencies for building can be found here. In case you don't want to / cannot prepare your environment per the requirements, consider using Docker.

Building

  1. Clone the repository

    git clone https://github.com/dotnet/dotnet dotnet-dotnet
    cd dotnet-dotnet
  2. Build the .NET SDK

    Choose one of the following build modes:

    • Microsoft based build

      For Unix:

      ./build.sh --clean-while-building

      For Windows:

      .\build.cmd -cleanWhileBuilding
    • Building from source

      # Prep the source to build on your distro.
      # This downloads a .NET SDK and a number of .NET packages needed to build .NET from source.
      ./prep-source-build.sh
      
      # Build the .NET SDK
      ./build.sh -sb --clean-while-building

    The resulting SDK is placed at artifacts/assets/Release/dotnet-sdk-9.0.100-[your-RID].tar.gz (for Unix) or artifacts/assets/Release/dotnet-sdk-9.0.100-[your-RID].zip (for Windows).

  3. (Optional) Unpack and install the .NET SDK

    For Unix:

    mkdir -p $HOME/dotnet
    tar zxf artifacts/assets/Release/dotnet-sdk-9.0.100-[your-RID].tar.gz -C $HOME/dotnet
    ln -s $HOME/dotnet/dotnet /usr/bin/dotnet

    For Windows:

    mkdir %userprofile%\dotnet
    tar -xf artifacts/assets/Release/dotnet-sdk-9.0.100-[your RID].zip -C %userprofile%\dotnet
    set "PATH=%userprofile%\dotnet;%PATH%"

    To test your built SDK, run the following:

    dotnet --info

Note

Run ./build.sh --help (for Unix) or .\build.cmd -help (for Windows) to see more information about supported build options.

Building using Docker

You can also build the repository using a Docker image which has the required prerequisites inside. The example below creates a Docker volume named vmr and clones and builds the VMR there.

docker run --rm -it -v vmr:/vmr -w /vmr mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8
git clone https://github.com/dotnet/dotnet .

# - Microsoft based build
./build.sh --clean-while-building

# - Building from source
./prep-source-build.sh && ./build.sh -sb --clean-while-building

mkdir -p $HOME/.dotnet
tar -zxf artifacts/assets/Release/dotnet-sdk-9.0.100-centos.8-x64.tar.gz -C $HOME/.dotnet
ln -s $HOME/.dotnet/dotnet /usr/bin/dotnet

Codespaces

You can also utilize GitHub Codespaces where you can find preset containers in this repository.

Building from released sources

You can also build from sources (and not from a context of a git repository), such as the ones you can acquire from a dotnet/dotnet release. In this case, you need to provide additional information which includes the original repository and commit hash the code was built from so that the SDK can provide a better debugging experience (think the Step into.. functionality). Usually, this means the dotnet/dotnet repository together with the commit the release tag is connected to.

In practice, this means that when calling the main build script, you need to provide additional arguments when building outside of a context of a git repository.
Alternatively, you can also provide a manifest file where this information can be read from. This file (release.json) can be found attached with the dotnet/dotnet release.

Synchronizing code into the VMR

Sometimes you want to make a change in a repository and test that change in the VMR. You could of course make the change in the VMR directly (locally, as the VMR is read-only for now) but in case it's already available in your repository, you can synchronize it into the VMR (again locally).

To do this, you can either start a dotnet/dotnet Codespace - you will see instructions right after it starts. Alternatively, you can clone the repository locally and use the vmr-sync.sh or vmr-sync.ps1 script to pull your changes in. Please refer to the documentation in the script for more details.

List of components

The full list of components synchronized into the VMR is here (Components.md).

The repository also contains a JSON manifest listing all components in a machine-readable format.

Filing Issues

This repo does not accept issues as of now. Please file issues to the appropriate development repos. For issues with the VMR itself, please use the source-build repository.

Useful Links

.NET Foundation

.NET Runtime is a .NET Foundation project.

License

.NET is licensed under the MIT license.

aspnetcore's People

Contributors

ajaybhargavb avatar analogrelay avatar aspnetci avatar benaadams avatar brennanconroy avatar captainsafia avatar davidfowl avatar dotnet-bot avatar dotnet-maestro[bot] avatar dougbu avatar eilon avatar halter73 avatar haok avatar jamesnk avatar javiercn avatar jbagga avatar jkotalik avatar juntaoluo avatar kichalla avatar mikaelm12 avatar mikeharder avatar natemcmaster avatar ntaylormullen avatar pakrym avatar pranavkm avatar ryanbrandenburg avatar rynowak avatar stevesandersonms avatar tratcher avatar wtgodbe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aspnetcore's Issues

Running k web from mapped network drive causes unhandled exception (klr.exe has stopped working)

When running the 'k web' command from one of the samples (HelloWeb, HelloMvc) from a mapped network drive (w:) I get the following unhandled exception. Probably not a bad idea to just output an error message, or a security confirmation message asking the user if it is safe to run, rather than crashing out the klr.exe.

Output from the command:

W:\repositories\Home\samples\HelloMvc>k web

Unhandled Exception: System.Reflection.TargetInvocationException: Exception has
been thrown by the target of an invocation. ---> System.Reflection.TargetInvocat
ionException: Exception has been thrown by the target of an invocation. ---> Sys
tem.IO.FileLoadException: Could not load file or assembly 'Microsoft.AspNet.Host
ing' or one of its dependencies. Operation is not supported. (Exception from HRE
SULT: 0x80131515) ---> System.NotSupportedException: An attempt was made to load
 an assembly from a network location which would have caused the assembly to be
sandboxed in previous versions of the .NET Framework. This release of the .NET F
ramework does not enable CAS policy by default, so this load may be dangerous. I
f this load is not intended to sandbox the assembly, please enable the loadFromR
emoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more
information.
   at System.Reflection.RuntimeAssembly.nLoadFile(String path, Evidence evidence
)
   at System.Reflection.Assembly.LoadFile(String path)
   at klr.hosting.LoaderEngine.LoadFile(String path)
   at klr.host.DefaultLoaderEngine.LoadFile(String path)
   at Microsoft.Framework.Runtime.Loader.NuGet.NuGetAssemblyLoader.Load(LoadCont
ext loadContext)
   at Microsoft.Framework.Runtime.Loader.AssemblyLoader.LoadImpl(LoadContext loa
dContext, Stopwatch sw)
   at Microsoft.Framework.Runtime.Loader.AssemblyLoader.Load(LoadContext loadCon
text)
   at Microsoft.Framework.Runtime.Loader.AssemblyLoader.LoadAssembly(LoadContext
 loadContext)
   at Microsoft.Framework.Runtime.DefaultHost.Load(String name)
   at klr.host.HostContainer.Load(String name)
   at klr.hosting.RuntimeBootstrapper.<>c__DisplayClass0.<Execute>b__8(AssemblyN
ame assemblyName)
   at klr.hosting.RuntimeBootstrapper.<>c__DisplayClass0.<Execute>b__11(Object s
ender, ResolveEventArgs a)
   at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String a
ssemblyFullName)
   --- End of inner exception stack trace ---
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String cod
eBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark&
stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntro
spection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String code
Base, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& s
tackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntros
pection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName as
semblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMar
k& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIn
trospection, Boolean suppressSecurityChecks)
   at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
   at Microsoft.Framework.Runtime.DefaultHost.GetEntryPoint(String applicationNa
me)
   at Microsoft.Framework.ApplicationHost.Program.ExecuteMain(DefaultHost host,
String applicationName, String[] args)
   at Microsoft.Framework.ApplicationHost.Program.Main(String[] args)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments,
 Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Objec
t[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke
Attr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Microsoft.Framework.Runtime.Common.EntryPointExecutor.Execute(Assembly ass
embly, String[] args, IServiceProvider serviceProvider)
   at klr.host.Bootstrapper.Main(String[] args)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments,
 Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Objec
t[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke
Attr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at klr.hosting.RuntimeBootstrapper.Execute(String[] args)
   at DomainManager.Main(Int32 argc, String[] argv)

Exception calling ExtractToDirectory 0.1-alpha-build-0508

On calling kvm upgrade to retrieve the latest version I get the following error:

Exception calling "ExtractToDirectory" with "2" argument(s). "Access to the path 'C:\Users\Eliot\.kre\packages\KRE-svr50-z86.0.1-alpha-build-0508\bin\Microsoft.CodeAnalysis.CSharp.dll' is denied."

This is on Version 4 of Powershell with .NET 4.5 installed. Windows 8. The contents of the bin directory after this error is pictured below:

nupkgproblem

I tried changing permissions on the folder by granting full control to 'everyone' but no luck. I was wondering if anyone had experienced a similar problem?

kvmsetup.cmd fails due to restricted execution policy

When the Kvm-Global-Setup function elevates, the execution policy set in kvm.cmd is lost. This results in the elevated PowerShell instance using the machine's default execution policy which, by default, is Restricted. This results in the following error that is silently swallowed.

File Home\kvm.ps1 cannot be loaded because running scripts is disabled on this
system.

Use YAML for project files instead of JSON?

Why not use a more human readable and editable format like YAML instead of using the more verbose project.json format? I know that JSON is a more popular format, but YAML is pretty popular as well and is so dead simple and clean that it seems like it would make a nice clean new project system even cleaner and simpler.

Here is a sample in both JSON and YAML format. Judge for yourself.
https://gist.github.com/ejsmith/f8ff96a10675845d4293

kpm is not recognized as an internal or external command

Hi,

I am getting this error, not sure why this is happening. I am on windows 7 and I have .NET Framework 4.5.1 installed on my computer. I was following the "getting started" section and have installed 0.1-alpha-build-0421

Running KPM on Non Windows Platforms

When trying to use k run on the pull request that deals with shell and mono. I can not run the console app. Obviously MVC and Web sample bounce as well.

Here is the output.
....
Mikes-MacBook-Pro:HelloMvc mike$ k run
Could not load type 'System.Reflection.Internal.MemoryMappedFileBlock' from assembly 'System.Reflection.Metadata, Version=1.0.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
...

Here is the mono version i am running
...
Mikes-MacBook-Pro:HelloMvc mike$ mono --version
...
...
Mono JIT compiler version 3.4.0 ((no/d4511ef Tue Mar 25 14:35:52 EDT 2014)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: normal
SIGSEGV: altstack
Notification: kqueue
Architecture: x86
Disabled: none
Misc: softdebug
LLVM: yes(3.4svn-mono-(no/e656cac)
GC: sgen
...
Good job Microsoft on this work! Me likes a lot!

"kvm upgrade" fails behind authenticated firewall with (407) Proxy Authentication Required error

Behind an authenticated firewall, like most corporate firewalls are, the kvm upgrade fails with (407) Proxy Authentication Required error.
I borrowed the solution from the Chocolatey team, by replacing the $webClient.DownloadFile with Get-WebFile function that properly handles firewalls, user agents, passthru and quite execution.
Fixed Kvm-Find-Latest and Do-Kvm-Download functions in kvm.ps1

kvm.ps1

$scriptPath = $myInvocation.MyCommand.Definition
#Add at top
$PSScriptRoot = (Split-Path $scriptPath -Parent)
& $PSScriptRoot\Get-WebFile.ps1

function Kvm-Find-Latest {
param(
    [string] $platform,
    [string] $architecture
)
    Write-Host "Determining latest version"
    $url = "https://www.myget.org/F/aspnetvnext/api/v2/GetUpdates()?packageIds=%27KRE-$platform-$architecture%27&versions=%270.0%27&includePrerelease=true&includeAllVersions=false"
    #Use Get-WebFile instead of WebClient.DownloadString
    [xml]$xml = Get-WebFile $url -Passthru
    $version = Select-Xml "//d:Version" -Namespace @{d='http://schemas.microsoft.com/ado/2007/08/dataservices'} $xml 
    return $version
}

function Do-Kvm-Download {
param(
  [string] $kreFullName,
  [string] $packagesFolder
)
    $parts = $kreFullName.Split(".", 2)

    $url = "https://www.myget.org/F/aspnetvnext/api/v2/package/" + $parts[0] + "/" + $parts[1]
    $kreFolder = Join-Path $packagesFolder $kreFullName
    $kreFile = Join-Path $kreFolder "$kreFullName.nupkg"

    If (Test-Path $kreFolder) {
      if($force)
      {
        rm $kreFolder -Recurse -Force
      } else {
        Write-Host "$kreFullName already installed."
        return;
      }
    }

    Write-Host "Downloading" $kreFullName "from https://www.myget.org/F/aspnetvnext/api/v2/"
    #Downloading to temp location
    $kreTempDownload = Join-Path $packagesFolder "temp"
    $tempKreFile = Join-Path $kreTempDownload "$kreFullName.nupkg"

    if(Test-Path $kreTempDownload) {  
      del "$kreTempDownload\*" -recurse
    } else {
      md $kreTempDownload -Force | Out-Null
    }
    #Use Get-WebFile instead of WebClient.DownloadFile
    Get-WebFile $url $tempKreFile
    Do-Kvm-Unpack $tempKreFile $kreTempDownload
    md $kreFolder -Force | Out-Null   
    Write-Host "Installing to $kreFolder"
    mv "$kreTempDownload\*" $kreFolder
}

Get-WebFile.ps1

# Usage:
#  - Get url to a file: Get-WebFile "url" "flePath"
#  - Get url content:   Get-WebFile "url" -Passthru
function Global:Get-WebFile
{
    [CmdletBinding()]
    Param (
        [Parameter(Position=1, Mandatory=$true,  ValueFromPipelineByPropertyName=$true)] [string] $url = "", #(Read-Host "The URL to download"),
        [Parameter(Position=2, Mandatory=$false,  ValueFromPipelineByPropertyName=$true)] [string] $fileName = $null,
        [Parameter(Position=3, Mandatory=$false, ValueFromPipelineByPropertyName=$true)] [string] $userAgent = "kvm command line",
        [Parameter(Position=4, Mandatory=$false, ValueFromPipelineByPropertyName=$true)] [switch] $Passthru,
        [Parameter(Position=5, Mandatory=$false, ValueFromPipelineByPropertyName=$true)] [switch] $quiet
    )
    Process
    {
        Write-Debug "Running 'Get-WebFile' for $fileName with url:`'$url`', userAgent: `'$userAgent`' ";
        #if ($url -eq '' return)
        $req = [System.Net.HttpWebRequest]::Create($url);
        #to check if a proxy is required
        $webclient = new-object System.Net.WebClient
        if (!$webclient.Proxy.IsBypassed($url))
        {
            $creds = [net.CredentialCache]::DefaultCredentials
            if ($creds -eq $null)
            {
                Write-Debug "Default credentials were null. Attempting backup method"
                $cred = get-credential
                $creds = $cred.GetNetworkCredential();
            }
            $proxyaddress = $webclient.Proxy.GetProxy($url).Authority
            Write-host "Using this proxyserver: $proxyaddress"
            $proxy = New-Object System.Net.WebProxy($proxyaddress)
            $proxy.credentials = $creds
            $req.proxy = $proxy
        }

        #http://stackoverflow.com/questions/518181/too-many-automatic-redirections-were-attempted-error-message-when-using-a-httpw
        $req.CookieContainer = New-Object System.Net.CookieContainer
        if ($userAgent -ne $null)
        {
            Write-Debug "Setting the UserAgent to `'$userAgent`'"
            $req.UserAgent = $userAgent
        }
        $res = $req.GetResponse();

        if ($fileName -and !(Split-Path $fileName))
        {
            $fileName = Join-Path (Get-Location -PSProvider "FileSystem") $fileName
        }
        elseif ((!$Passthru -and ($fileName -eq $null)))
        {
            if ((($fileName -ne $null) -and (Test-Path -PathType "Container" $fileName)))
            {
                [string]$fileName = ([regex]'(?i)filename=(.*)$').Match( $res.Headers["Content-Disposition"] ).Groups[1].Value
                $fileName = $fileName.trim("\/""'")
                if (!$fileName)
                {
                    $fileName = $res.ResponseUri.Segments[-1]
                    $fileName = $fileName.trim("\/")
                    if(!$fileName)
                    {
                        $fileName = Read-Host "Please provide a file name"
                    }
                    $fileName = $fileName.trim("\/")
                    if(!([IO.FileInfo]$fileName).Extension)
                    {
                        $fileName = $fileName + "." + $res.ContentType.Split(";")[0].Split("/")[1]
                    }
                }
                $fileName = Join-Path (Get-Location -PSProvider "FileSystem") $fileName
            }
        }
        if ($Passthru)
        {
            $encoding = [System.Text.Encoding]::GetEncoding( $res.CharacterSet )
            [string]$output = ""
        }

        if ($res.StatusCode -eq 200)
        {
            [long]$goal = $res.ContentLength
            $reader = $res.GetResponseStream()
            if ($fileName)
            {
                $writer = new-object System.IO.FileStream $fileName, "Create"
            }
            [byte[]]$buffer = new-object byte[] 1048576
            [long]$total = [long]$count = [long]$iterLoop =0
            do
            {
                $count = $reader.Read($buffer, 0, $buffer.Length);
                if ($fileName)
                {
                    $writer.Write($buffer, 0, $count);
                }
                if ($Passthru)
                {
                    $output += $encoding.GetString($buffer,0,$count)
                }
                elseif (!$quiet)
                {
                    $total += $count
                    if ($goal -gt 0 -and ++$iterLoop%10 -eq 0)
                    {
                        Write-Progress "Downloading $url to $fileName" "Saving $total of $goal" -id 0 -percentComplete (($total/$goal)*100) 
                    }
                    if ($total -eq $goal)
                    {
                        Write-Progress "Completed download of $url." "Completed a total of $total bytes of $fileName" -id 0 -Completed 
                    }
                }
            } while ($count -gt 0)

            $reader.Close()
            if ($fileName)
            {
                $writer.Flush()
                $writer.Close()
            }
            if ($Passthru)
            {
                return $output
            }
        }
        $res.Close();
    }
}

What about bundling and minification?

Hi,
I looked around the code, but I don't see a module that handles bundling and minification as in the actual mvc.
Will be includede in the mvc project?

Add Whatch Files to Source

I am having a hard time understanding how this vNext work.

I open the server wilth "k web" and the MVC project Sample work with no problem.

Then i change a File for exemple "HomeController", and Hit refresh on the browser and it is still the same. So even there is no DLL in a Bin forlder, those files are still in Memory.

To reload my page i need to press "Ctrol+C" and "Y" to close the current web, then run the Web again with "k web".

Could it be possible to add a FileWatcher to my source files, rebuild my code everytime i change a file?

Or am i simple doing something wrong???

K pack produces error: System.NullReferenceException

I completed all the steps as described inside the readme of this project and now discovering other stuff such as Command Line usage. I ran K pack and I can see that it outputs into the bin/output directory but I'm getting the following exception at the end of the command:

System.NullReferenceException: Object reference not set to an instance of an obj
ect.
at Microsoft.Net.Project.Packing.PackRuntime.Emit(PackRoot root)
at Microsoft.Net.Project.Packing.PackRoot.Emit()
at Microsoft.Net.Project.PackManager.Package()
at Microsoft.Net.Project.Program.Main(String[] args)

Here is the console output I got by running K pack > log.txt:

klr.exe Information: 0 : RootHost.Load name=Microsoft.Net.Project
klr.exe Information: 0 : RootHost Assembly.LoadFile(C:\Users\Tugberk.k\packages\ProjectK.0.1-alpha-353\tools\net45\Microsoft.Net.Project.dll)
klr.exe Information: 0 : RootHost.Load name=Microsoft.Net.Runtime
klr.exe Information: 0 : RootHost Assembly.LoadFile(C:\Users\Tugberk.k\packages\ProjectK.0.1-alpha-353\tools\net45\Microsoft.Net.Runtime.dll)
klr.exe Information: 0 : RootHost.Load name=Newtonsoft.Json
klr.exe Information: 0 : RootHost Assembly.LoadFile(C:\Users\Tugberk.k\packages\ProjectK.0.1-alpha-353\tools\net45\Newtonsoft.Json.dll)
klr.exe Information: 0 : Walking dependency graph for 'HelloWebFx .NETFramework,Version=v4.5.1'.
klr.exe Information: 0 : [ProjectReferenceDependencyProvider]: HelloWebFx 0.1-alpha-SNAPSHOT
klr.exe Information: 0 : [NuGetDependencyResolver]: Microsoft.AspNet.Abstractions 0.1-alpha-279, Microsoft.AspNet.Hosting 0.1-alpha-300, Microsoft.AspNet.Server.WebListener 0.1-alpha-245, Microsoft.AspNet.DependencyInjection 0.1-alpha-267, Microsoft.AspNet.RequestContainer 0.1-alpha-300, Microsoft.AspNet.Routing 0.1-alpha-281, Microsoft.ComponentModel.DataAnnotations 4.0.10.0, Microsoft.AspNet.Mvc.ModelBinding 0.1-alpha-699, Microsoft.AspNet.Mvc.Core 0.1-alpha-699, Microsoft.AspNet.Mvc 0.1-alpha-699, Microsoft.AspNet.Mvc.Razor 0.1-alpha-699, Microsoft.AspNet.ConfigurationModel 0.1-alpha-180, Microsoft.AspNet.Diagnostics 0.1-alpha-192, Microsoft.AspNet.FeatureModel 0.1-alpha-279, Microsoft.AspNet.PipelineCore 0.1-alpha-279, Microsoft.AspNet.Security.DataProtection 0.1-alpha-144, Microsoft.Net.Runtime.Interfaces 0.1-alpha-325, Microsoft.AspNet.HttpFeature 0.1-alpha-279, Microsoft.AspNet.Logging 0.1-alpha-159, Common 1.0.0, Newtonsoft.Json 5.0.8, Microsoft.AspNet.FileSystems 0.1-alpha-152, Microsoft.AspNet.Mvc.Razor.Host 0.1-alpha-699, Microsoft.AspNet.Razor 0.1-alpha-181, Microsoft.Bcl.Immutable 1.1.18-beta-097, Microsoft.CodeAnalysis.Common 0.7-beta-097, Microsoft.CodeAnalysis.CSharp 0.7-beta-097, System.Reflection.Metadata.Ecma335 0.7-beta-097
klr.exe Information: 0 : RootHost.Load name=Microsoft.Net.Runtime.resources
klr.exe Information: 0 : RootHost.Load name=Microsoft.Net.Runtime.resources
klr.exe Information: 0 : RootHost.Load name=Microsoft.Net.Runtime.resources
klr.exe Information: 0 : RootHost.Load name=Microsoft.Net.Runtime.resources
klr.exe Information: 0 : [ReferenceAssemblyDependencyResolver]: System.ComponentModel.DataAnnotations 4.0.0.0, mscorlib 4.0.0.0, System 4.0.0.0, System.Core 4.0.0.0, Microsoft.CSharp 4.0.0.0
klr.exe Information: 0 : Resolved dependencies for HelloWebFx in 1927ms
Copying to output path D:\Apps\nda\Preview\samples\HelloWebFx\bin\output
Packing nupkg dependency Microsoft.AspNet.Abstractions 0.1-alpha-279
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.Abstractions.0.1-alpha-279 already exists.
Packing nupkg dependency Microsoft.AspNet.Hosting 0.1-alpha-300
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.Hosting.0.1-alpha-300 already exists.
Packing nupkg dependency Microsoft.AspNet.Server.WebListener 0.1-alpha-245
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.Server.WebListener.0.1-alpha-245 already exists.
Packing nupkg dependency Microsoft.AspNet.DependencyInjection 0.1-alpha-267
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.DependencyInjection.0.1-alpha-267 already exists.
Packing nupkg dependency Microsoft.AspNet.RequestContainer 0.1-alpha-300
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.RequestContainer.0.1-alpha-300 already exists.
Packing nupkg dependency Microsoft.AspNet.Routing 0.1-alpha-281
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.Routing.0.1-alpha-281 already exists.
Packing nupkg dependency Microsoft.ComponentModel.DataAnnotations 4.0.10.0
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.ComponentModel.DataAnnotations.4.0.10.0 already exists.
Packing nupkg dependency Microsoft.AspNet.Mvc.ModelBinding 0.1-alpha-699
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.Mvc.ModelBinding.0.1-alpha-699 already exists.
Packing nupkg dependency Microsoft.AspNet.Mvc.Core 0.1-alpha-699
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.Mvc.Core.0.1-alpha-699 already exists.
Packing nupkg dependency Microsoft.AspNet.Mvc 0.1-alpha-699
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.Mvc.0.1-alpha-699 already exists.
Packing nupkg dependency Microsoft.AspNet.Mvc.Razor 0.1-alpha-699
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.Mvc.Razor.0.1-alpha-699 already exists.
Packing nupkg dependency Microsoft.AspNet.ConfigurationModel 0.1-alpha-180
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.ConfigurationModel.0.1-alpha-180 already exists.
Packing nupkg dependency Microsoft.AspNet.Diagnostics 0.1-alpha-192
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.Diagnostics.0.1-alpha-192 already exists.
Packing nupkg dependency Microsoft.AspNet.FeatureModel 0.1-alpha-279
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.FeatureModel.0.1-alpha-279 already exists.
Packing nupkg dependency Microsoft.AspNet.PipelineCore 0.1-alpha-279
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.PipelineCore.0.1-alpha-279 already exists.
Packing nupkg dependency Microsoft.AspNet.Security.DataProtection 0.1-alpha-144
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.Security.DataProtection.0.1-alpha-144 already exists.
Packing nupkg dependency Microsoft.Net.Runtime.Interfaces 0.1-alpha-325
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.Net.Runtime.Interfaces.0.1-alpha-325 already exists.
Packing nupkg dependency Microsoft.AspNet.HttpFeature 0.1-alpha-279
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.HttpFeature.0.1-alpha-279 already exists.
Packing nupkg dependency Microsoft.AspNet.Logging 0.1-alpha-159
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.Logging.0.1-alpha-159 already exists.
Packing nupkg dependency Common 1.0.0
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Common.1.0.0 already exists.
Packing nupkg dependency Newtonsoft.Json 5.0.8
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Newtonsoft.Json.5.0.8 already exists.
Packing nupkg dependency Microsoft.AspNet.FileSystems 0.1-alpha-152
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.FileSystems.0.1-alpha-152 already exists.
Packing nupkg dependency Microsoft.AspNet.Mvc.Razor.Host 0.1-alpha-699
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.Mvc.Razor.Host.0.1-alpha-699 already exists.
Packing nupkg dependency Microsoft.AspNet.Razor 0.1-alpha-181
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.AspNet.Razor.0.1-alpha-181 already exists.
Packing nupkg dependency Microsoft.Bcl.Immutable 1.1.18-beta-097
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.Bcl.Immutable.1.1.18-beta-097 already exists.
Packing nupkg dependency Microsoft.CodeAnalysis.Common 0.7-beta-097
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.CodeAnalysis.Common.0.7-beta-097 already exists.
Packing nupkg dependency Microsoft.CodeAnalysis.CSharp 0.7-beta-097
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\Microsoft.CodeAnalysis.CSharp.0.7-beta-097 already exists.
Packing nupkg dependency System.Reflection.Metadata.Ecma335 0.7-beta-097
D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\packages\System.Reflection.Metadata.Ecma335.0.7-beta-097 already exists.
Packing project dependency HelloWebFx
Source D:\Apps\nda\Preview\samples\HelloWebFx
Target D:\Apps\nda\Preview\samples\HelloWebFx\bin\output\HelloWebFx
Loaded Module: klr.net45.dll

Found DLL Export: CallApplicationMain

Running "k" in a folder without a web/desktop app throws an unhandled exception

I accidentally ran k from the wrong folder, without a desktop or web application, and it got an unhandled exception, probably needs some error handling for that case.

C:\Users\Clint>k

Loaded Module: klr.net45.dll
Found DLL Export: CallApplicationMain
klr.exe Information: 0 : RootHost.Load name=Microsoft.Framework.ApplicationHost
klr.exe Information: 0 : RootHost Assembly.LoadFile(C:\Users\Clint\.kre\packages
\KRE-svr50-x86.0.1-alpha-build-0446\bin\Microsoft.Framework.ApplicationHost.dll)

klr.exe Information: 0 : RootHost.Load name=Microsoft.Framework.Runtime
klr.exe Information: 0 : RootHost Assembly.LoadFile(C:\Users\Clint\.kre\packages
\KRE-svr50-x86.0.1-alpha-build-0446\bin\Microsoft.Framework.Runtime.dll)
klr.exe Information: 0 : RootHost.Load name=Newtonsoft.Json
klr.exe Information: 0 : RootHost Assembly.LoadFile(C:\Users\Clint\.kre\packages
\KRE-svr50-x86.0.1-alpha-build-0446\bin\Newtonsoft.Json.dll)

Unhandled Exception: System.Reflection.TargetInvocationException: Exception has
been thrown by the target of an invocation. ---> System.Reflection.TargetInvocat
ionException: Exception has been thrown by the target of an invocation. ---> Sys
tem.Exception: Unable to locate project.json
   at Microsoft.Framework.Runtime.DefaultHost.Initialize(DefaultHostOptions opti
ons)
   at Microsoft.Framework.Runtime.DefaultHost..ctor(DefaultHostOptions options,
IServiceProvider hostProvider)
   at Microsoft.Framework.ApplicationHost.Program.Main(String[] args)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments,
 Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Objec
t[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke
Attr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Microsoft.Framework.Runtime.Common.EntryPointExecutor.Execute(Assembly ass
embly, String[] args, IServiceProvider serviceProvider)
   at klr.host.Bootstrapper.Main(String[] args)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments,
 Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Objec
t[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke
Attr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at klr.hosting.RuntimeBootstrapper.Execute(String[] args)
   at DomainManager.Main(Int32 argc, String[] argv)

proxy

I've got errors when i use kvm and kpm without proxy

I changed kvm.ps1 for using webProxy

 $wc = New-Object System.Net.WebClient
 $proxy = New-Object System.Net.WebProxy
 $proxy.Address="http://myProxy:8888"
 $proxy.UseDefaultCredentials=true
 $wc.Proxy=$proxy

I'm not so familar with Powershell, but it works for me.

But I don't understand how setup proxy settings to packageManager.
kpm restore return

Error: FindPackageById: System.Console
An error occured while sending request

I hope you help me with this problem

kpm restore unable to install

I get the following output when running kpm restore

C:\Users\ciezekiel\Desktop\vNext>CALL "C:\Users\ciezekiel\.kre\packages\KRE-svr50-x86.0.1-alpha-build-0445\bin\KLR.cmd" --lib "C:\Users\ciezekiel\.kre\packages\KRE-svr50-x86.0.1-alpha-build-0445\bin\;C:\Users\ciezekiel\.kre\packages\KRE-svr50-x86.0.1-alpha-build-0445\bin\lib\Microsoft.Framework.PackageManager" "Microsoft.Framework.PackageManager" restore 
Restoring packages for C:\Users\ciezekiel\Desktop\vNext\project.json
Attempting to resolve dependency vNext >= 0.1-alpha-SNAPSHOT
Attempting to resolve dependency Microsoft.AspNet.Diagnostics >= 0.1-alpha
  GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Diagnostics'
Attempting to resolve dependency Microsoft.AspNet.Hosting >= 0.1-alpha
  GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Hosting'
Attempting to resolve dependency Microsoft.AspNet.Mvc >= 0.1-alpha
  GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Mvc'
Attempting to resolve dependency Microsoft.AspNet.Server.WebListener >= 0.1-alpha
  GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Server.WebListener'
Attempting to resolve dependency System.Runtime >= 
Attempting to resolve dependency System.ComponentModel.DataAnnotations >= 
Attempting to resolve dependency mscorlib >= 
Attempting to resolve dependency System >= 
Attempting to resolve dependency System.Core >= 
Attempting to resolve dependency Microsoft.CSharp >= 
Attempting to resolve dependency vNext >= 0.1-alpha-SNAPSHOT
Attempting to resolve dependency Microsoft.AspNet.Diagnostics >= 0.1-alpha
Attempting to resolve dependency Microsoft.AspNet.Hosting >= 0.1-alpha
Attempting to resolve dependency Microsoft.AspNet.Mvc >= 0.1-alpha
Attempting to resolve dependency Microsoft.AspNet.Server.WebListener >= 0.1-alpha
  OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Diagnostics' 1000ms
  OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Server.WebListener' 943ms
  OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Hosting' 949ms
  OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Mvc' 1293ms
Attempting to resolve dependency Microsoft.AspNet.WebPages >= 1.0.20105.408
Attempting to resolve dependency Microsoft.Web.Infrastructure >= 1.0.0.0
Attempting to resolve dependency Microsoft.AspNet.Razor >= 1.0.20105.408
Attempting to resolve dependency Microsoft.AspNet.WebPages >= 1.0.20105.408
Attempting to resolve dependency Microsoft.Web.Infrastructure >= 1.0.0.0
Attempting to resolve dependency Microsoft.AspNet.Razor >= 1.0.20105.408
Resolving complete, 1551ms elapsed
Unable to locate Microsoft.AspNet.Diagnostics >= 0.1-alpha
Unable to locate Microsoft.AspNet.Server.WebListener >= 0.1-alpha
Unable to locate Microsoft.AspNet.Hosting >= 0.1-alpha
Restore complete, 1554ms elapsed

I guess for some reason Installing is failing.

Make Helios and WebListener repositories public soon

As an ASP.NET HttpModule/middleware developer, I've found the bridge between ASP.NET and IIS to be the greatest source of trouble and bugs. Often small details (Like preventing dynamically registered HttpModules from accessing static requests) make it impossible for me to provide developers with a painless experience.

There's a lot of middleware out there, and... every piece of middleware is unique. Furthermore, IIS has a seemingly infinite number of behavior permutations when it comes to HttpModule interaction.

The earlier we (library developers) can see Helios, the earlier we can holler when an architectural choice would otherwise make things impossible for us.


Some questions, since we can't peek at the source yet

1) In the past, there has been heavy recommendation from MSFT to keep managed modules from touching static file requests. (Avoid RAMMFAR, use preCondition="managedHandler"), etc., despite the low performance delta (which can be nullified by use of a CDN or cache proxy).

What is the guidance going forward? Will this continue to drive architectural choices like extensionless url bits and file-extension-based routing logic?

OWN-like simplicity across the board would be wonderful, but If that doesn't happen, could we take another look at improving the handler/module/webserver configuration story?

For example, replace Web.config with an API. Managed code can instruct configuration without having to be involved in every request. Yes, that means delaying static responses until the managed side in online, but that's correct behavior. Managed authorization layers work about as good as a sieve right now, by default, on static files. Perhaps, with an API, we can offer security that is less fragile.

Porting Glimpse to Helios/WebListener/UnnamedNativeModuleShim would make a great API exercise. For heavy lifting (huge blobs, heavy processing), ImageResizer would love to join the club :)

Another performant alternative would Lua, but that would probably get me stoned :)

Or, perhaps, OWN will be the only interface, and no more puppies will die at all :)
.

2) Unmanaged assemblies are a thing. We aren't even close to mirroring the available C/C++ libraries in .NET.
ASP.NET remains the most challenging platform for native/managed interop. Bitness is configured, not inferred, and more than a decade after the p/invoke spec we still have no mechanism for describing native dependencies. Subfolder conventions like bin/x86 and /bin/x64 (honored by NuGet, VS, and the loader) would go a long way towards making it less painful to consume libraries with native dependencies. I think the official SQLite wrapper does something similar to this, but DataCommon.SQLite seems to only support x86.

Side-by-side is the future, but native dependencies need to be part of the plan, not excluded. With System.Drawing removed from CoreCLR, developers will need something else to generate barcodes and handle responsive images. Even with SIMD support, the CLR is not ready for image processing or decoding.

I've been trying to support CppSharp development, but it's a massive undertaking and it needs more shoulders behind the wheel.

There's a lot that can be done without CLR changes. Native assembly loading is a p/invoke call. Assembly attributes can provide dependency info. Establishing bin subfolder conventions early can keep libraries from stepping on each other (excluding overlapping dependency graphs, which takes manifests and more work). In fact, it is almost, but not quite possible for .NET library authors to support native dependencies themselves with dynamic downloads. Unfortunately, ASP.NET applications are guaranteed nothing - they can be terminated at any time, they may have multiple instances running on the same filesystem, and App_Start is the only threadsafe initialization method (IHttpModule.Init is not). Any failure results in a permanently locked (remember appdomains vs. worker processes) and likely corrupted dependency. This isn't theoretical - it happens on about 10% of deploys.

Only the hosting platform can safely perform native dependency management. Will vNext bring a solution?

kpm restore fails when too many packages

It appears that when too many results are returned in NuGet's FindPackagesById method, kpm does not fetch more than the first page and therefore fails to find a package version if it isn't in the first page of results.

This can be produced when trying to restore Nuget.Core from https://www.nuget.org/.

project.json:

{
    "dependencies": {
        "Nuget.Core": "2.8.1"
    }
}
PS C:\Projects\kvm-test\core> kpm restore
Restoring packages for C:\Projects\NuGet\kvm-test\core\project.json
Attempting to resolve dependency core >= 1.0.0
Attempting to resolve dependency Nuget.Core >= 2.8.1
  GET https://www.myget.org/F/aspnetvnext/FindPackagesById()?Id='Nuget.Core'
  GET https://nuget.org/api/v2/FindPackagesById()?Id='Nuget.Core'
Attempting to resolve dependency mscorlib >=
Attempting to resolve dependency System >=
Attempting to resolve dependency System.Core >=
Attempting to resolve dependency Microsoft.CSharp >=
  OK https://nuget.org/api/v2/FindPackagesById()?Id='Nuget.Core' 504ms
  OK https://www.myget.org/F/aspnetvnext/FindPackagesById()?Id='Nuget.Core' 653ms
Resolving complete, 783ms elapsed
Unable to locate Nuget.Core >= 2.8.1
Restore complete, 786ms elapsed

'kvm install' command not adding to user PATH, only process PATH

When running the kvm install command, it is not writing the \bin folder to the user PATH, only to the process path. Subsequently closing the command window will cause the kpm and k commands to no longer be found the next time the command prompt is open, until k install is run again. The k upgrade command properly sets the user and process PATH variables.

Command: kvm install 0.1-alpha-build-0443

Downloading KRE-svr50-x86.0.1-alpha-build-0443 from https://www.myget.org/F/aspn
etvnext/api/v2/
Installing to C:\Users\Clint\.kre\packages\KRE-svr50-x86.0.1-alpha-build-0443
Adding C:\Users\Clint\.kre\packages\KRE-svr50-x86.0.1-alpha-build-0443\bin to pr
ocess PATH

Command: kvm upgrade

Determining latest version
Downloading KRE-svr50-x86.0.1-alpha-build-0443 from https://www.myget.org/F/aspn
etvnext/api/v2/
Installing to C:\Users\Clint\.kre\packages\KRE-svr50-x86.0.1-alpha-build-0443
Adding C:\Users\Clint\.kre\packages\KRE-svr50-x86.0.1-alpha-build-0443\bin to pr
ocess PATH
Adding C:\Users\Clint\.kre\packages\KRE-svr50-x86.0.1-alpha-build-0443\bin to us
er PATH
Setting alias 'default' to 'KRE-svr50-x86.0.1-alpha-build-0443'

Package Manager (kpm.cmd) file is missed for Core CLR

There is no Package Manager (kpm.cmd) file for Core CLR profile. This cause "kpm restore" command to fail.

Repro:
Run kvm use -p 0.1-alpha-build-0438 -svr50 -x64 and "kpm" works.
Run kvm use -p 0.1-alpha-build-0438 -svcr50 -x64 and "kpm" doesn't works.

System.IO.Compression.Zip Not found while installing

Unable to install on Windows7 Home 64 bit, VS2012 Ultimate and .Net 4.5.50938 as administrator. The very same on a Windows 8.

F:\Documents\TempDevelop\Home-master>kvm setup
Copying file C:\Users\edaros.kre\bin\kvm.ps1
Copying file C:\Users\edaros.kre\bin\kvm.cmd
Adding C:\Users\edaros.kre\bin to process PATH
Adding C:\Users\edaros.kre\bin to user PATH
Adding C:\Program Files\KRE;%USERPROFILE%.kre to process KRE_HOME
Adding C:\Program Files\KRE;%USERPROFILE%.kre to machine KRE_HOME
Press any key to continue ...

F:\Documents\TempDevelop\Home-master>kvm install 0.1-alpha-build-0421
Downloading KRE-svr50-x86.0.1-alpha-build-0421 from https://www.myget.org/F/aspn
etvnext/api/v2/
Installing to C:\Users\edaros.kre\packages\KRE-svr50-x86.0.1-alpha-build-0421
Unable to find type [System.IO.Compression.ZipFile]: make sure that the assembly
containing this type is loaded.

Why not use github issues for discussions?

Seeing this in the contributing guidelines seemed odd:

The GitHub issue list is for bugs, not discussions. If you have a question you want to ask you have many alternatives:

  • StackOverflow
  • The JabbR chat room

What is the reasoning for not using github issues for discussions?

For example, I wanted to open an issue to discuss having a kvm files being persisted per project in addition to user profile and global options, something like .rvmrc project files. Why shouldn't I use issues to have that conversation?

kvminstall.ps1 fails behind authenticated firewall with (407) Proxy Authentication Required error

Behind an authenticated firewall, like most corporate firewalls are, the kvminstall.ps1 fails with (407) Proxy Authentication Required error.
I borrowed the solution from the Chocolatey team, by replacing the $webClient.DownloadFile with Get-WebFile function that properly handles firewalls, user agents, passthru and quite execution.

kvminstall.ps1

$kvmSource = "https://raw.githubusercontent.com/aspnet/Home/master/"
$kvmPs1 = "kvm.ps1"
$kvmCmd = "kvm.cmd"
$tempPath = Join-Path $env:TEMP "kvminstall"
$kvmPs1Path = Join-Path $tempPath $kvmPs1
$kvmCmdPath = Join-Path $tempPath $kvmCmd
$kvmPs1Url = $kvmSource + $kvmPs1
$kvmCmdUrl = $kvmSource + $kvmCmd

$PSScriptRoot = (Split-Path $myInvocation.MyCommand.Definition -Parent)
& $PSScriptRoot\Get-WebFile.ps1

Write-Host "Using temporary directory: $tempPath"
if (!(Test-Path $tempPath))
{
    md $tempPath | Out-Null
}

Write-Host "Downloading KVM.ps1 to $kvmPs1Path"
Get-WebFile $kvmPs1Url $kvmPs1Path

Write-Host "Downloading KVM.cmd to $kvmCmdPath"
Get-WebFile $kvmCmdUrl $kvmCmdPath

Write-Host "Installing KVM"
& $kvmCmdPath setup

Get-WebFile.ps1

# Usage:
#  - Get url to a file: Get-WebFile "url" "flePath"
#  - Get url content:   Get-WebFile "url" -Passthru
function Global:Get-WebFile
{
    [CmdletBinding()]
    Param (
        [Parameter(Position=1, Mandatory=$true,  ValueFromPipelineByPropertyName=$true)] [string] $url = "", #(Read-Host "The URL to download"),
        [Parameter(Position=2, Mandatory=$false,  ValueFromPipelineByPropertyName=$true)] [string] $fileName = $null,
        [Parameter(Position=3, Mandatory=$false, ValueFromPipelineByPropertyName=$true)] [string] $userAgent = "kvm command line",
        [Parameter(Position=4, Mandatory=$false, ValueFromPipelineByPropertyName=$true)] [switch] $Passthru,
        [Parameter(Position=5, Mandatory=$false, ValueFromPipelineByPropertyName=$true)] [switch] $quiet
    )
    Process
    {
        Write-Debug "Running 'Get-WebFile' for $fileName with url:`'$url`', userAgent: `'$userAgent`' ";
        #if ($url -eq '' return)
        $req = [System.Net.HttpWebRequest]::Create($url);
        #to check if a proxy is required
        $webclient = new-object System.Net.WebClient
        if (!$webclient.Proxy.IsBypassed($url))
        {
            $creds = [net.CredentialCache]::DefaultCredentials
            if ($creds -eq $null)
            {
                Write-Debug "Default credentials were null. Attempting backup method"
                $cred = get-credential
                $creds = $cred.GetNetworkCredential();
            }
            $proxyaddress = $webclient.Proxy.GetProxy($url).Authority
            Write-host "Using this proxyserver: $proxyaddress"
            $proxy = New-Object System.Net.WebProxy($proxyaddress)
            $proxy.credentials = $creds
            $req.proxy = $proxy
        }

        #http://stackoverflow.com/questions/518181/too-many-automatic-redirections-were-attempted-error-message-when-using-a-httpw
        $req.CookieContainer = New-Object System.Net.CookieContainer
        if ($userAgent -ne $null)
        {
            Write-Debug "Setting the UserAgent to `'$userAgent`'"
            $req.UserAgent = $userAgent
        }
        $res = $req.GetResponse();

        if ($fileName -and !(Split-Path $fileName))
        {
            $fileName = Join-Path (Get-Location -PSProvider "FileSystem") $fileName
        }
        elseif ((!$Passthru -and ($fileName -eq $null)))
        {
            if ((($fileName -ne $null) -and (Test-Path -PathType "Container" $fileName)))
            {
                [string]$fileName = ([regex]'(?i)filename=(.*)$').Match( $res.Headers["Content-Disposition"] ).Groups[1].Value
                $fileName = $fileName.trim("\/""'")
                if (!$fileName)
                {
                    $fileName = $res.ResponseUri.Segments[-1]
                    $fileName = $fileName.trim("\/")
                    if(!$fileName)
                    {
                        $fileName = Read-Host "Please provide a file name"
                    }
                    $fileName = $fileName.trim("\/")
                    if(!([IO.FileInfo]$fileName).Extension)
                    {
                        $fileName = $fileName + "." + $res.ContentType.Split(";")[0].Split("/")[1]
                    }
                }
                $fileName = Join-Path (Get-Location -PSProvider "FileSystem") $fileName
            }
        }
        if ($Passthru)
        {
            $encoding = [System.Text.Encoding]::GetEncoding( $res.CharacterSet )
            [string]$output = ""
        }

        if ($res.StatusCode -eq 200)
        {
            [long]$goal = $res.ContentLength
            $reader = $res.GetResponseStream()
            if ($fileName)
            {
                $writer = new-object System.IO.FileStream $fileName, "Create"
            }
            [byte[]]$buffer = new-object byte[] 1048576
            [long]$total = [long]$count = [long]$iterLoop =0
            do
            {
                $count = $reader.Read($buffer, 0, $buffer.Length);
                if ($fileName)
                {
                    $writer.Write($buffer, 0, $count);
                }
                if ($Passthru)
                {
                    $output += $encoding.GetString($buffer,0,$count)
                }
                elseif (!$quiet)
                {
                    $total += $count
                    if ($goal -gt 0 -and ++$iterLoop%10 -eq 0)
                    {
                        Write-Progress "Downloading $url to $fileName" "Saving $total of $goal" -id 0 -percentComplete (($total/$goal)*100) 
                    }
                    if ($total -eq $goal)
                    {
                        Write-Progress "Completed download of $url." "Completed a total of $total bytes of $fileName" -id 0 -Completed 
                    }
                }
            } while ($count -gt 0)

            $reader.Close()
            if ($fileName)
            {
                $writer.Flush()
                $writer.Close()
            }
            if ($Passthru)
            {
                return $output
            }
        }
        $res.Close();
    }
}

Running samples on a MAC

Hello

Will the instructions for running the samples on a mac be released at some point or are we able to do this now?

I noticed that D Fowler and Scott were using a custom version of Nowin for K is this going to be provided as an example?

Regards

Incorrect namespace for controllers

When a project with a name like 'mvc6 getting started' is created the autogenerated namespace for Controllers classes is incorrect

For other classes like 'Startup.cs' the namespace is correctly written as 'mvc6_getting_started'

using Microsoft.AspNet.Mvc;

// For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860

namespace MVC6 Getting Started.Controllers
{
    public class HomeController : Controller
    {
        // GET: /<controller>/
        public IActionResult Index()
        {
            return View();
        }
    }
}

Update project.json to use array for code, exclude, resource and shared

Browsing through the Project.json examples I was wondering why the said options are using strings instead of arrays, especially in the Entity Framework project.json example

{
  "code": "**\\*.cs;..\\Shared\\*.cs"
}

This reminds me of %PATH% on Windows or Unix/Linux and I personally find it really hard to read it. Also it introduce an additional step for me to split that string to get all paths.

So my proposal here would be to use a simple array, which should be not only easier to read but also easier to parse.

{
  "code": [
    "**\\*.cs",
    "..\\Shared\\*.cs"
  ]
}

This should also apply to other options such as exclude, resource and shared as I assume that they allow us to specify multiple values if required.

{
  "code": [
    "**\\*.cs",
    "..\\Shared\\*.cs"
  ],
  "exclude": [
    "buggy/**/*.cs"
  ],
  "resources": [
    "embed/**/*.*"
  ]
}

HelloMvc Sample: Unhandled exception occured while processing the request.

Description

Once the klr.exe dumped the "Started" message, accessing the URL http://localhost:5001 resulted in the following exception logged in the browser:
MissingMethodException: Method not found: 'System.Reflection.Assembly Microsoft.Framework.Runtime.IAssemblyLoaderEngine.LoadBytes(Byte[], Byte[])'.
Microsoft.AspNet.Mvc.Razor.Compilation.RoslynCompilationService.Compile(String content)
Enabling tracing (KRE_Trace=1) did not indicate any failures during compilation and/or loading dependencies. I was able to run the HelloWeb sample successfully.

Functional impact

Unable to run the MVC sample.

Minimal repro steps

  1. Active runtime 0.1-alpha-build-0473 x86 svr50
  2. kpm restore
  3. k web.

Expected result

Some nice looking "Hello, Mvc" page rendered.

Actual result

screenshot 2014-05-29 21 18 58

Further technical details

Windows 8. (I haven't installed windows 8.1 as of yet.)

Add system requirements checking to kvm script.

kvm has a minimal requirements for .net version and powershell version. It should check these versions at start of the script, and if the version requirement is not met stop executing and write error message which says that user must install proper software. (For example, "you must install Powershell v4.0 or later")

Without these checks script halts with an error message (see #20) which is difficult to diagnose and find a way to resolve it.

System checks, that must be done:
windows platform: .NET 4.5.1, Powershell 4.0
linux platform: mono version 3.4.1

WebListenerExcepction when running K web

Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.Net.Server.WebListenerException: The process cannot access the file because it is being used by another process

Add "k list"

There should be a way to list all commands in project.json by using something like:

k list

If I write for example:

k something

I get:

Unable to load application or execute command 'something'. Available commands: web.

Apparently, a list of available commands exists, and I would prefer to get that list by using the list command.

How to configure Vs to run webapplication using local sources?

Hi, I would like to configure a vs solution so I can run a web application running not the compiled packages, but the sources in a cloned repositories.
I would like to run and debug mvc and ef starting from the app and entering in the sources.
Actually is this possible?
I already tried to add to the solution the mvc packages, but seems are ignored.

Create a separate command for packages

We can use kvm install/upgrade for installing newer versions of KRE, and kpm restore to install packages.

For packages, I would rather see something like this (pm as in "package manager"):

kpm install
kpm update
kpm uninstall
etc...

This is more like how Node.js works with npm. You have nvm for installing newer versions of node, and npm for installing packages.

K Web crashes when changing to net45 CLR after having changed to CoreCLR

Reproduced by just testing the HelloWeb Sample:

  1. Run "k web" the first time over net45 CLR --> Works over net45
  2. Change to Core-CLR with "set TARGET_FRAMEWORK=k10"
  3. Run "k web" over CORE-CLR --> Works on Core-CLR
  4. Change to net45-CLR with "set TARGET_FRAMEWORK=net45"
  5. Run "k web" on CORE-CLR --> Crashes (see error below):

On the other hand, if I set TARGET_FRAMEWORK to empty ("set TARGET_FRAMEWORK="), then, it works on net45 CLR, like "by default CLR".
I think it should work with the environment variable set to "net45", too.

C:\Users\cesardl\Documents\GitHub\Preview\samples\HelloWeb>k web
Loaded Module: klr.net45.dll
Found DLL Export: CallApplicationMain

Unhandled Exception: System.AggregateException: One or more errors occurred. ---
> System.ArgumentException: Illegal characters in path.
   at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)

   at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPath
Length, Boolean expandShortPaths)
   at System.IO.Path.GetFullPathInternal(String path)
   at System.IO.Path.GetFullPath(String path)
   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
   at System.Linq.Enumerable.<SelectManyIterator>d__14`2.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at klr.hosting.RuntimeBootstrapper.<Execute>d__1.MoveNext()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceled
Exceptions)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotifica
tion)
   at System.Threading.Tasks.Task`1.get_Result()
   at DomainManager.Main(Int32 argc, String[] argv)

Question about Configuration

Hi Guys!

Amazing work on vNext - I wish I had more time to follow the development more closely. Keep it up! ๐Ÿ‘

I have a question about Microsoft.Framework.ConfigurationModel: I really like the direction that this is going.

My question is, will Microsoft.Framework.ConfigurationModel be available as a nuget package that we can also use on non-asp.net projects? It seems like that might be so, but I'm not sure. For example: Would I be able to use this on a Windows Service built in .net, to allow me to use an existing MySQL .ini config file rather than have to duplicate connection data in an XML config?

Hope that makes sense...

Thanks!

Phil

KVM needs to rollback changes after error

After encountering the error described in #20, I was unable to install the same version I was trying to install.

The reason for that is because there was a package folder for that version under C:\Users\[USERNAME]\.kre\packages, but the package itself wasn't installed.

I think the solution for that would be to clean up changes upon error.

Another thing that would help would be to have a -reinstall or -force flag in case we're trying to install a version that's supposedly already installed.

"kvm upgrade" error "Http Error 200 fetching .... "

I'm using Ubuntu 14.04 and when I tried to execute kvm upgrade I got error message said Http Error 200 fetching KRE-mono45-x86.KRE-mono45-x86.0.1-alpha-build-0489.nupkg from https://www.myget.org/F/aspnetvnext/api/v2 and the bash was exited. Then I cannot use kpm and k to run sample codes.

I dig into the kvm.sh file and found the code below in _kvm_download method
[[ $httpResult != "302" ]] && echo "Http Error $httpResult fetching $kreFullName from $KRE_NUGET_API_URL" && return 1

I don't know why you attempt to check the HTTP status code equals 302. After I changed it to 200 then I can use kpm and k.

"k --watch web" shuts the "HelloWorldVNext" sample down when modifying Startup.cs (=the "hello world" string)

home/pc/.kre/packages/KRE-mono45-x86.0.1-alpha-build-0481/bin/Microsoft.Framework.Runtime.dll Information : 0 : /home/pc/Programming/Home/samples/HelloWorldVNext/src/helloworldweb/.goutputstream-8C0FGX -> /home/pc/Programming/Home/samples/HelloWorldVNext/src/helloworldweb/Startup.cs
/home/pc/.kre/packages/KRE-mono45-x86.0.1-alpha-build-0481/bin/Microsoft.Framework.Runtime.dll Information : 0 : [ApplicationShutdown]: Requesting shutdown.
/home/pc/.kre/packages/KRE-mono45-x86.0.1-alpha-build-0481/bin/Microsoft.Framework.Runtime.dll Information : 0 : [ApplicationShutdown]: Requested shutdown.

I thought vNext was supposed to be able to auto reload code changes?

error in ef functional test building in italian locale

Hi,
I'm building the ef source in my development machine, where I have italian as locale.
At the end of the build, when runs the fun ctional test I receive several errors like this:

Microsoft.Data.Entity.InMemory.FunctionalTests.NorthwindQueryTest.Select_customer_table [FAIL]
System.AggregateException : One or more errors occurred.\r\n---- System.TypeInitializationException : The type initializer for 'Northwind.NorthwindData' threw an exception.\r\n-------- System.FormatException : String was not recognized as a valid DateTime.\r\n---- The following constructor arguments did not have matching fixture data: NorthwindQueryFixture fixture
Stack Trace:

     ----- Inner Stack Trace #1 (System.TypeInitializationException) -----
        at Microsoft.Data.Entity.InMemory.FunctionalTests.NorthwindQueryFixture..ctor() in ...\EntityFramework\test\Microsoft.Data.Entity.InMemory.FunctionalTests\NorthwindQueryTest.cs:line 39
     ----- Inner Stack Trace -----
        at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles)
        at System.DateTime.Parse(String s)
        at Northwind.NorthwindData..cctor() in D:\GitHub\EntityFramework\test\Shared\Northwind.cs:line 1585
     ----- Inner Stack Trace #2 (Xunit.Sdk.TestClassException) -----

Looks like the problem is here:
public static readonly Employee[] Employees =
{
new Employee
{
...
BirthDate = DateTime.Parse("12/8/1948 12:00:00 AM"),
HireDate = DateTime.Parse("5/1/1992 12:00:00 AM"),
..
this format is not accepted when the datetime format not english

Readme need to update the Know Issue section

We have fixed the issue on build 443 this week, the following issue is fixed. So we should remove the ReadMe's Known Issues section.

Core CLR doesn't currently work on Windows Server 2012

Unable to resolve depedendencies Microsoft.AspNet.Mvc 0.1-alpha-build-1140

I receive a System.InvalidOperationException: Unable to resolve depedendencies Microsoft.AspNet.Mvc 0.1-alpha-build-1140 error when running k web on /Samples/HelloMvc.

It happens after kpm restore. This is the output of kpm restore:

E:\Proyectos\Home\samples\HelloMvc>kpm restore

E:\Proyectos\Home\samples\HelloMvc>CALL "C:\Users\Enric\.kre\packages\KRE-svr50-x86.0.1-alpha-build-0442\bin\KLR.cmd" --lib "C:\Users\Enric\.kre\packages\KRE-svr50-x86.0.1-alpha-bu
ild-0442\bin\;C:\Users\Enric\.kre\packages\KRE-svr50-x86.0.1-alpha-build-0442\bin\lib\Microsoft.Framework.PackageManager" "Microsoft.Framework.PackageManager" restore
Restoring packages for E:\Proyectos\Home\samples\HelloMvc\project.json
Attempting to resolve dependency HelloMvc >= 0.1-alpha-SNAPSHOT
Attempting to resolve dependency Microsoft.AspNet.Diagnostics >= 0.1-alpha-build-0623
Attempting to resolve dependency Microsoft.AspNet.FeatureModel >= 0.1-alpha-build-0413
Attempting to resolve dependency Microsoft.AspNet.Http >= 0.1-alpha-build-0413
Attempting to resolve dependency Microsoft.AspNet.PipelineCore >= 0.1-alpha-build-0413
Attempting to resolve dependency Microsoft.AspNet.HttpFeature >= 0.1-alpha-build-0413
Attempting to resolve dependency Microsoft.AspNet.Hosting >= 0.1-alpha-build-0519
Attempting to resolve dependency Microsoft.AspNet.Security.DataProtection >= 0.1-alpha-build-0150
Attempting to resolve dependency Microsoft.Framework.ConfigurationModel >= 0.1-alpha-build-0223
Attempting to resolve dependency Microsoft.Framework.DependencyInjection >= 0.1-alpha-build-0362
Attempting to resolve dependency Microsoft.Framework.Logging >= 0.1-alpha-build-0168
Attempting to resolve dependency Microsoft.Framework.Runtime.Interfaces >= 0.1-alpha-build-0421
Attempting to resolve dependency Microsoft.AspNet.Mvc >= 0.1-alpha-build-1140
  GET https://www.myget.org/F/aspnetvnext/FindPackagesById()?Id='Microsoft.AspNet.Mvc'
  GET https://nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Mvc'
Attempting to resolve dependency Microsoft.AspNet.Server.WebListener >= 0.1-alpha-build-0469
Attempting to resolve dependency Microsoft.Net.Server >= 0.1-alpha-build-0469
Attempting to resolve dependency System.Runtime >=
Attempting to resolve dependency System.ComponentModel.DataAnnotations >=
Attempting to resolve dependency mscorlib >=
Attempting to resolve dependency System >=
Attempting to resolve dependency System.Core >=
Attempting to resolve dependency Microsoft.CSharp >=
Attempting to resolve dependency HelloMvc >= 0.1-alpha-SNAPSHOT
Attempting to resolve dependency Microsoft.AspNet.Diagnostics >= 0.1-alpha-build-0623
Attempting to resolve dependency Microsoft.AspNet.FeatureModel >= 0.1-alpha-build-0413
Attempting to resolve dependency System.Reflection.TypeExtensions >= 4.0.0.0
Attempting to resolve dependency System.Runtime.InteropServices >= 4.0.20.0
Attempting to resolve dependency System.Reflection.Primitives >= 4.0.0.0
Attempting to resolve dependency System.Runtime.Handles >= 4.0.0.0
Attempting to resolve dependency Microsoft.AspNet.Http >= 0.1-alpha-build-0413
Attempting to resolve dependency System.Globalization.Extensions >= 4.0.0.0
Attempting to resolve dependency System.Security.Claims >= 0.1-alpha-build-0257
Attempting to resolve dependency System.Diagnostics.Contracts >= 4.0.0.0
Attempting to resolve dependency System.Security.Principal >= 4.0.0.0
Attempting to resolve dependency Microsoft.AspNet.PipelineCore >= 0.1-alpha-build-0413
Attempting to resolve dependency Microsoft.AspNet.HttpFeature >= 0.1-alpha-build-0413
Attempting to resolve dependency System.Net.Primitives >= 4.0.10.0
Attempting to resolve dependency System.Security.Cryptography.X509Certificates >= 4.0.0.0
Attempting to resolve dependency System.Security.Cryptography >= 4.0.0.0
Attempting to resolve dependency System.Security.Cryptography.Encoding >= 4.0.0.0
Attempting to resolve dependency System.Security.SecureString >= 4.0.0.0
Attempting to resolve dependency System.Text.Encoding >= 4.0.20.0
Attempting to resolve dependency System.Collections >= 4.0.0.0
Attempting to resolve dependency System.ComponentModel >= 4.0.0.0
Attempting to resolve dependency System.Diagnostics.Debug >= 4.0.10.0
Attempting to resolve dependency System.Diagnostics.Tools >= 4.0.0.0
Attempting to resolve dependency System.Globalization >= 4.0.10.0
Attempting to resolve dependency System.IO >= 4.0.0.0
Attempting to resolve dependency System.Text.Encoding >= 4.0.10.0
Attempting to resolve dependency System.IO.FileSystem >= 4.0.10.0
Attempting to resolve dependency System.IO.FileSystem.Primitives >= 4.0.20.0
Attempting to resolve dependency System.Linq >= 4.0.0.0
Attempting to resolve dependency System.Reflection >= 4.0.10.0
Attempting to resolve dependency System.Resources.ResourceManager >= 4.0.0.0
Attempting to resolve dependency System.Runtime >= 4.0.20.0
Attempting to resolve dependency System.Runtime.Extensions >= 4.0.10.0
Attempting to resolve dependency System.Threading >= 4.0.0.0
Attempting to resolve dependency System.Threading.Tasks >= 4.0.10.0
Attempting to resolve dependency Microsoft.AspNet.Hosting >= 0.1-alpha-build-0519
Attempting to resolve dependency Microsoft.AspNet.Security.DataProtection >= 0.1-alpha-build-0150
Attempting to resolve dependency System.Text.Encoding.Extensions >= 4.0.10.0
Attempting to resolve dependency Microsoft.Framework.ConfigurationModel >= 0.1-alpha-build-0223
Attempting to resolve dependency System.ApplicationContext >= 4.0.0.0
Attempting to resolve dependency Microsoft.Framework.DependencyInjection >= 0.1-alpha-build-0362
Attempting to resolve dependency System.Collections.Concurrent >= 4.0.0.0
Attempting to resolve dependency Microsoft.Framework.Logging >= 0.1-alpha-build-0168
Attempting to resolve dependency Microsoft.Framework.Runtime.Interfaces >= 0.1-alpha-build-0421
Attempting to resolve dependency System.Console >= 4.0.0.0
Attempting to resolve dependency Microsoft.AspNet.Mvc >= 0.1-alpha-build-1140
Attempting to resolve dependency Microsoft.AspNet.Server.WebListener >= 0.1-alpha-build-0469
Attempting to resolve dependency Microsoft.Net.Server >= 0.1-alpha-build-0469
Attempting to resolve dependency Microsoft.Win32.Primitives >= 4.0.0.0
Attempting to resolve dependency System.Threading.Overlapped >= 4.0.0.0
Attempting to resolve dependency System.Threading.ThreadPool >= 4.0.10.0
  OK https://nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Mvc' 1762ms
  OK https://www.myget.org/F/aspnetvnext/FindPackagesById()?Id='Microsoft.AspNet.Mvc' 2685ms
Attempting to resolve dependency Common >= 1.0.0
Attempting to resolve dependency Microsoft.AspNet.FileSystems >= 0.1-alpha-build-0159
Attempting to resolve dependency Microsoft.AspNet.Mvc.Core >= 0.1-alpha-build-1146
Attempting to resolve dependency Microsoft.AspNet.Security >= 0.1-alpha-build-0454
Attempting to resolve dependency Newtonsoft.Json >= 5.0.8
Attempting to resolve dependency Microsoft.AspNet.Mvc.ModelBinding >= 0.1-alpha-build-1146
Attempting to resolve dependency Microsoft.DataAnnotations >= 0.1-alpha-build-0099
Attempting to resolve dependency Microsoft.DataAnnotations.Core >= 0.1-alpha-build-0099
Attempting to resolve dependency System.Collections.Concurrent >= 4.0.0.0
Attempting to resolve dependency Microsoft.DataAnnotations.Supplemental >= 0.1-alpha-build-0099
Attempting to resolve dependency Microsoft.AspNet.Mvc.Razor >= 0.1-alpha-build-1146
Attempting to resolve dependency K.Roslyn >= 0.1-alpha-build-0129
Attempting to resolve dependency Microsoft.CodeAnalysis.Common >= 0.7.4050915-beta
Attempting to resolve dependency Microsoft.Bcl.Immutable >= 1.1.20-beta
Attempting to resolve dependency Microsoft.Bcl.Metadata >= 1.0.11-alpha
Attempting to resolve dependency Microsoft.CodeAnalysis.CSharp >= 0.7.4050915-beta
Attempting to resolve dependency Microsoft.AspNet.Mvc.Razor.Host >= 0.1-alpha-build-1146
Attempting to resolve dependency Microsoft.AspNet.Razor >= 0.1-alpha-build-0195
Attempting to resolve dependency Microsoft.AspNet.RequestContainer >= 0.1-alpha-build-0519
Attempting to resolve dependency Microsoft.AspNet.Routing >= 0.1-alpha-build-0525
Attempting to resolve dependency Common >= 1.0.0
Attempting to resolve dependency Microsoft.AspNet.FileSystems >= 0.1-alpha-build-0159
Attempting to resolve dependency System.Threading.Tasks >= 4.0.0.0
Attempting to resolve dependency System.Reflection.Extensions >= 4.0.0.0
Attempting to resolve dependency Microsoft.AspNet.Mvc.Core >= 0.1-alpha-build-1146
Attempting to resolve dependency Microsoft.AspNet.Security >= 0.1-alpha-build-0454
Attempting to resolve dependency System.IO.Compression >= 4.0.0.0
Attempting to resolve dependency System.Security.Cryptography.RandomNumberGenerator >= 4.0.0.0
Attempting to resolve dependency Microsoft.CSharp >= 4.0.0.0
Attempting to resolve dependency Newtonsoft.Json >= 5.0.8
Attempting to resolve dependency System.Dynamic.Runtime >= 4.0.0.0
Attempting to resolve dependency System.ObjectModel >= 4.0.0.0
Attempting to resolve dependency System.Linq.Expressions >= 4.0.0.0
Attempting to resolve dependency System.Reflection.Emit.ILGeneration >= 4.0.0.0
Attempting to resolve dependency System.Reflection.Emit.Lightweight >= 4.0.0.0
Attempting to resolve dependency System.Security.Cryptography.HashAlgorithms.SHA2 >= 4.0.0.0
Attempting to resolve dependency Microsoft.AspNet.Mvc.ModelBinding >= 0.1-alpha-build-1146
Attempting to resolve dependency Microsoft.DataAnnotations >= 0.1-alpha-build-0099
Attempting to resolve dependency Microsoft.DataAnnotations.Core >= 0.1-alpha-build-0099
Attempting to resolve dependency System.Text.RegularExpressions >= 4.0.0.0
Attempting to resolve dependency Microsoft.DataAnnotations.Supplemental >= 0.1-alpha-build-0099
Attempting to resolve dependency System.Runtime.Serialization.Primitives >= 4.0.0.0
Attempting to resolve dependency Microsoft.AspNet.Mvc.Razor >= 0.1-alpha-build-1146
Attempting to resolve dependency K.Roslyn >= 0.1-alpha-build-0129
Attempting to resolve dependency Microsoft.CodeAnalysis.Common >= 0.7.4050915-beta
Attempting to resolve dependency Microsoft.Bcl.Immutable >= 1.1.20-beta
Attempting to resolve dependency Microsoft.Bcl.Metadata >= 1.0.11-alpha
Attempting to resolve dependency Microsoft.CodeAnalysis.CSharp >= 0.7.4050915-beta
Attempting to resolve dependency Microsoft.AspNet.Mvc.Razor.Host >= 0.1-alpha-build-1146
Attempting to resolve dependency Microsoft.AspNet.Razor >= 0.1-alpha-build-0195
Attempting to resolve dependency System.Threading.Thread >= 4.0.0.0
Attempting to resolve dependency Microsoft.AspNet.RequestContainer >= 0.1-alpha-build-0519
Attempting to resolve dependency Microsoft.AspNet.Routing >= 0.1-alpha-build-0525
Resolving complete, 11426ms elapsed
Restore complete, 11428ms elapsed

Unable to resolve dependencies on HelloWeb example

Error Message

Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocat
ionException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Unable to resolve depedendencies Microsoft.AspNet
.Diagnostics 0.1-alpha-build-0623,Microsoft.AspNet.Hosting 0.1-alpha-build-0519,Microsoft.AspNet.Server.WebListener 0.1-alpha-build-0469,Microsoft.AspNet.Static
Files 0.1-alpha-build-0402

Background

I was running kpm restore in samples\HelloWeb

Research

I couldn't find matching assemblies in either

Here's the output from package manager searches

PM> Get-Package -ListAvailable -Filter Microsoft.AspNet.Diagnostics
PM> Get-Package -ListAvailable -Filter Microsoft.AspNet.Hosting
PM> Get-Package -ListAvailable -Filter Microsoft.AspNet.Server.WebListener
PM> Get-Package -ListAvailable -Filter Microsoft.AspNet.StaticFiles

running 'kvm setup' from Powershell results in error

When I clone the repository, and run './kvm setup' from a Powershell prompt, I'm presented with the following error.

C:\source\myRepos\Home [master +1 ~0 -0 !]> ./kvm setup
        1 file(s) copied.
Files\nodejs\";C:\DevTools;"C:\Program was unexpected at this time.
C:\source\myRepos\Home [master +1 ~0 -0 !]>

My PATH var is set as follows.

C:\source\myRepos\Home [master +1 ~0 -0 !]> echo $env:PATH

%SystemRoot%\system32\WindowsPowerShell\v1.0\;C:\Program Files\ConEmu\ConEmu;C:\Program Files\ConEmu;C:\ruby200\bin;C:\WATCOM\BINNT;C:\WATCOM\BINW;C:\Program Files (x86)\RSA SecurID Token Common;C:\FileNet\IDM;C:\Windows\system32;C:\Win dows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Enterprise Vault\EVClient\;%C:\Windows%\system32;%C:\Windows%;%C:\Windows%\System32\Wbem;C:\DRIVERS\SYBASE\BIN;%%%C:\Windows%%%\system32;%% %C:\Windows%%%;%%%C:\Windows%%%\System32\Wbem;C:\DRIVERS\SYBASE\DLL;C:\Program Files (x86)\Riverbed\Steelhead Mobile\;C:\Program Files (x86)\Microsoft Application Virtualization Client;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET We b Pages\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\SlikSvn\bin;C:\Program Files\Mercurial;c:\DevTools\;C:\DevTools\apache-ant-1.7.1-bin\apache-ant-1.7.1\bin\;C:\Program Files (x86)\Microsoft SDKs\TypeSc ript\0.8.0.0\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Python27;C:\Program Files\1E\NomadBranch\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files  (x86)\Microsoft SDKs\TypeScript\;C:\HashiCorp\Vagrant\bin;C:\Go\bin;C:\Program Files\Perforce;C:\Program Files\nodejs\;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\LINQPad4;C:\Program Files (x86) \Microsoft SDKs\TypeScript\1.0\;"c:\Program Files\nodejs\";C:\DevTools;"C:\Program Files\Mercurial\";"C:\Program Files\IIS Express";C:\MinGW\bin;C:\WATCOM\;"C:\Program Files (x86)\Microsoft\ILMerge";"C:\Program Files (x86)\Rust\bin";"C: \Program Files\Perforce";C:\Users\skoon\AppData\Roaming\npm;C:\Chocolatey\bin;c:\python27;c:\source\myRepos\atom\node_modules\;c:\Program Files\nodejs\;C:\DevTools;C:\Program Files\Mercurial\;C:\Users\skoon\AppData\Roaming\npm\;C:\Progr am Files\IIS Express;C:\Program Files (x86)\Vim\vim73;C:\Windows\Microsoft.NET\Framework\v4.0.30319

edit: Wow that PATH looks psychotic. Here is what I have my personal path set to under "Environment settings"

"c:\Program Files\nodejs\";C:\DevTools;"C:\Program Files\Mercurial\";"C:\Program Files\IIS Express";C:\MinGW\bin;C:\WATCOM\;"C:\Program Files (x86)\Microsoft\ILMerge";"C:\Program Files (x86)\Rust\bin";"C:\Program Files\Perforce";C:\Users\skoon\AppData\Roaming\npm;C:\Chocolatey\bin;c:\python27;c:\source\myRepos\atom\node_modules\

kpm restore fails to proceed to fallback sources when there is an error in the first listed feed

I was walking through the getting started section, and I noticed an exception being thrown from the kpm restore step.

Attempting to resolve dependency System.Console >= 4.0.0.0
  OK https://my-feed.cloudapp.net/api/v2/FindPackagesById()?Id='System.Console' 448ms
Warning: FindPackagesById: System.Console
  '=' is an unexpected token. The expected token is ';'. Line 21, position 78.

(I've sanitized the actual feed URL, but I'm a Microsoft employee if that helps)

My guess is that one of three things is happening:

  1. kpm doesn't know how to negotiate authentication with the private NuGet feed
  2. The private feed needs an update to work with kpm, and kpm doesn't gracefully handle communicating with old feeds
  3. The feed simply doesn't contain the "System.Console" package, and kpm doesn't gracefully handle missing packages.

Other details:

KRE builds tested (both reproduced issue)

0.1-alpha-build-0421 svr50   x86          C:\Users\me\.kre\packages
0.1-alpha-build-0425 svr50   x86          C:\Users\me\.kre\packages

Pretty sure these aren't relevant, but:

  • Windows 8.1 update
  • IIS 8.5

Here's a full dump of console output, and the actual response I get from the NuGet feed when I run the Id='System.Console' query in the browser: https://gist.github.com/itsananderson/3f6c8ec3fb1bb8699a91

Duplicate locations in KVM list

Following is happened to my environment:

$ kvm list

Active Version              Runtime Architecture Location
------ -------              ------- ------------ --------
       0.1-alpha-build-0445 svr50   x86          C:\Users\trdai\.kre\packages
       0.1-alpha-build-0445 svr50   x86          C:\Users\trdai\.KRE\packages
       0.1-alpha-build-0445 svrc50  x86          C:\Users\trdai\.kre\packages
       0.1-alpha-build-0445 svrc50  x86          C:\Users\trdai\.KRE\packages
       0.1-alpha-build-0453 svr50   x64          C:\Users\trdai\.KRE\packages
       0.1-alpha-build-0453 svr50   x64          C:\Users\trdai\.kre\packages
       0.1-alpha-build-0453 svr50   x86          C:\Users\trdai\.kre\packages
       0.1-alpha-build-0453 svr50   x86          C:\Users\trdai\.KRE\packages
       0.1-alpha-build-0453 svrc50  x64          C:\Users\trdai\.KRE\packages
       0.1-alpha-build-0453 svrc50  x64          C:\Users\trdai\.kre\packages
       0.1-alpha-build-0453 svrc50  x86          C:\Users\trdai\.kre\packages
       0.1-alpha-build-0453 svrc50  x86          C:\Users\trdai\.KRE\packages
       0.1-alpha-build-0470 svr50   x64          C:\Users\trdai\.kre\packages
       0.1-alpha-build-0470 svr50   x64          C:\Users\trdai\.KRE\packages
       0.1-alpha-build-0470 svr50   x86          C:\Users\trdai\.kre\packages
       0.1-alpha-build-0470 svr50   x86          C:\Users\trdai\.KRE\packages
  *    0.1-alpha-build-0470 svrc50  x64          C:\Users\trdai\.kre\packages
       0.1-alpha-build-0470 svrc50  x64          C:\Users\trdai\.KRE\packages
       0.1-alpha-build-0470 svrc50  x86          C:\Users\trdai\.KRE\packages
       0.1-alpha-build-0470 svrc50  x86          C:\Users\trdai\.kre\packages

The path should be case insensitive. My KRE_HOME is set to C:\Users\trdai.kre

What server versions will the CoreCLR version of vNext support at RTM?

Hi,

I noticed that the README.md specifies that the CoreCLR will only work on Windows 8 today, but at RTM it will work on Windows 7 also. Can you update the Readme to specify what server versions that will translate into at RTM? I'm assuming Windows server 2008 R2 and above, but I'd like to be sure.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.