First you'll need to install the KVM and KRE:
https://github.com/aspnet/Home/wiki/version-manager
- Run
kpm restore
- Navigate to src\helloworldweb
- Type k web
- Open a browser and type http://localhost:5000
Hello world applications on ASP.NET vNext
License: Apache License 2.0
First you'll need to install the KVM and KRE:
https://github.com/aspnet/Home/wiki/version-manager
kpm restore
kpm/kre etc.
when I run k web
, I get an exception
OS Ubuntu linux 12.04
mono --version
Mono JIT compiler version 3.4.1 (master/09126b1 Mon May 26 03:54:44 NOVT 2014)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: x86
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen
k web
System.ArgumentException: An element with the same key already exists in the dictionary.
at System.Collections.Generic.Dictionary`2[System.String,System.String].Add (System.String key, System.String value) [0x00000] in :0
at Microsoft.Framework.Runtime.FrameworkReferenceResolver.PopulateCache () [0x00000] in :0
at Microsoft.Framework.Runtime.FrameworkReferenceResolver..ctor () [0x00000] in :0
at Microsoft.Framework.Runtime.ReferenceAssemblyDependencyResolver..ctor () [0x00000] in :0
at Microsoft.Framework.Runtime.DefaultHost.Initialize (Microsoft.Framework.Runtime.DefaultHostOptions options) [0x00000] in :0
at Microsoft.Framework.Runtime.DefaultHost..ctor (Microsoft.Framework.Runtime.DefaultHostOptions options, IServiceProvider hostProvider) [0x00000] in :0
at Microsoft.Framework.ApplicationHost.Program.Main (System.String[] args) [0x00000] in :0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00054] in /home/sergey/Projects/mono/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:230
I am trying to run the samples on openSUSE 13.1. I am using the latest version of mono and kvm. The helloworldweb sample does work, but the Hellomvc sample throws an exception when I try to run “k web”.
Version info:
mono 3.6.1 (master/0154199) on openSUSE 13.1.
kvm 1.0.0-alpha3-10110
Exception:
Could not load type 'Microsoft.Framework.DependencyInjection.IOptionsAccessor`1' from assembly 'Microsoft.Framework.DependencyInjection, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null'.
Exception with KRE_TRACE:
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : Project root is /home/administrator/git/HelloWorldVNext/src/hellomvc
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : Walking dependency graph for 'hellomvc .NETFramework,Version=v4.5'.
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : [ProjectReferenceDependencyProvider]: hellomvc 1.0.0, Nowin.vNext 1.0.0
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : [NuGetDependencyResolver]: Microsoft.AspNet.Mvc 0.1-alpha-build-1268, Common 1.0.0, Microsoft.AspNet.FileSystems 0.1-alpha-build-0162, Microsoft.AspNet.Mvc.Core 0.1-alpha-build-1268, Microsoft.AspNet.Mvc.ModelBinding 0.1-alpha-build-1268, Microsoft.AspNet.Mvc.Razor 0.1-alpha-build-1268, Microsoft.AspNet.Mvc.Razor.Host 0.1-alpha-build-1268, Microsoft.AspNet.Razor 0.1-alpha-build-0197, Microsoft.AspNet.RequestContainer 0.1-alpha-build-0572, Microsoft.AspNet.Routing 0.1-alpha-build-0577, Nowin 0.11.0.0, Microsoft.AspNet.Hosting 0.1-alpha-build-0772, Microsoft.AspNet.Owin 0.1-alpha-build-0444, Microsoft.AspNet.Security 0.1-alpha-build-0506, Newtonsoft.Json 5.0.8, Microsoft.DataAnnotations 0.1-alpha-build-0100, K.Roslyn 0.1-alpha-build-0137, Microsoft.AspNet.FeatureModel 0.1-alpha-build-0571, Microsoft.AspNet.Http 0.1-alpha-build-0571, Microsoft.AspNet.PipelineCore 0.1-alpha-build-0571, Microsoft.AspNet.Security.DataProtection 0.1-alpha-build-0202, Microsoft.Framework.ConfigurationModel 0.1-alpha-build-0328, Microsoft.Framework.DependencyInjection 0.1-alpha-build-0509, Microsoft.Framework.Logging 0.1-alpha-build-0244, Microsoft.Framework.Runtime.Interfaces 0.1-alpha-build-0542, Microsoft.DataAnnotations.Core 0.1-alpha-build-0100, Microsoft.DataAnnotations.Supplemental 0.1-alpha-build-0100, Microsoft.CodeAnalysis.Common 0.7.4051916-beta, Microsoft.CodeAnalysis.CSharp 0.7.4051916-beta, Microsoft.AspNet.HttpFeature 0.1-alpha-build-0571, Microsoft.Bcl.Immutable 1.1.20-beta, Microsoft.Bcl.Metadata 1.0.11-alpha
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : [ReferenceAssemblyDependencyResolver]: mscorlib 4.0.0.0, System 4.0.0.0, System.Core 4.0.0.0, Microsoft.CSharp 4.0.0.0, System.Linq 4.0.0.0, System.Reflection 4.0.0.0, System.Runtime 4.0.0.0, System.ComponentModel.DataAnnotations 4.0.0.0, System.Runtime.Serialization 4.0.0.0, System.Collections 4.0.0.0, System.Xml 4.0.0.0, System.Xml.Linq 4.0.0.0, System.Security 4.0.0.0
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : Resolved dependencies for hellomvc in 156ms
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : Loading entry point from Microsoft.AspNet.Hosting
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/klr.host.dll Information : 0 : RootHost.Load name=Microsoft.AspNet.Hosting
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : Loading Microsoft.AspNet.Hosting for '.NETFramework,Version=v4.5'.
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : [NuGetAssemblyLoader]: Finished loading Microsoft.AspNet.Hosting in 1ms
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : Load took 161ms
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/klr.host.dll Information : 0 : RootHost.Load name=Microsoft.Framework.ConfigurationModel
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : Loading Microsoft.Framework.ConfigurationModel for '.NETFramework,Version=v4.5'.
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : [NuGetAssemblyLoader]: Finished loading Microsoft.Framework.ConfigurationModel in 0ms
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/klr.host.dll Information : 0 : RootHost.Load name=Microsoft.Framework.DependencyInjection
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : Loading Microsoft.Framework.DependencyInjection for '.NETFramework,Version=v4.5'.
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : [NuGetAssemblyLoader]: Finished loading Microsoft.Framework.DependencyInjection in 0ms
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/klr.host.dll Information : 0 : RootHost.Load name=Microsoft.AspNet.Http
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : Loading Microsoft.AspNet.Http for '.NETFramework,Version=v4.5'.
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : [NuGetAssemblyLoader]: Finished loading Microsoft.AspNet.Http in 0ms
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/klr.host.dll Information : 0 : RootHost.Load name=Microsoft.Framework.Logging
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : Loading Microsoft.Framework.Logging for '.NETFramework,Version=v4.5'.
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : [NuGetAssemblyLoader]: Finished loading Microsoft.Framework.Logging in 0ms
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/klr.host.dll Information : 0 : RootHost.Load name=Microsoft.AspNet.Security.DataProtection
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : Loading Microsoft.AspNet.Security.DataProtection for '.NETFramework,Version=v4.5'.
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : [NuGetAssemblyLoader]: Finished loading Microsoft.AspNet.Security.DataProtection in 0ms
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/klr.host.dll Information : 0 : RootHost.Load name=Microsoft.AspNet.PipelineCore
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : Loading Microsoft.AspNet.PipelineCore for '.NETFramework,Version=v4.5'.
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : [NuGetAssemblyLoader]: Finished loading Microsoft.AspNet.PipelineCore in 2ms
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/klr.host.dll Information : 0 : RootHost.Load name=Nowin.vNext
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : Loading Nowin.vNext for '.NETFramework,Version=v4.5'.
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : [ProjectExportProvider]: Found project 'Nowin.vNext' framework=.NETFramework,Version=v4.5
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : [ProjectExportProvider]: Resolving exports for 'Nowin.vNext'
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : [ProjectExportProvider]: Resolved 57 exports for 'Nowin.vNext' in 65ms
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.Roslyn.dll Information : 0 : [RoslynCompiler]: Compiling 'Nowin.vNext'
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.Roslyn.dll Information : 0 : [RoslynCompiler]: Exported References 57
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.Roslyn.dll Information : 0 : Assembly Neutral References 40
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.Roslyn.dll Information : 0 : Found 40 Assembly Neutral References in 704ms
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.Roslyn.dll Information : 0 : [RoslynAssemblyLoader]: Emitting assembly for Nowin.vNext
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.Roslyn.dll Information : 0 : [RoslynAssemblyLoader]: Emitted Nowin.vNext in 3ms
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : [ProjectAssemblyLoader]: Finished loading Nowin.vNext in 1158ms
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/klr.host.dll Information : 0 : RootHost.Load name=Nowin
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : Loading Nowin for '.NETFramework,Version=v4.5'.
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : [NuGetAssemblyLoader]: Finished loading Nowin in 0ms
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/klr.host.dll Information : 0 : RootHost.Load name=hellomvc
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : Loading hellomvc for '.NETFramework,Version=v4.5'.
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : [ProjectExportProvider]: Found project 'hellomvc' framework=.NETFramework,Version=v4.5
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : [ProjectExportProvider]: Resolving exports for 'hellomvc'
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : [ProjectExportProvider]: Resolved 85 exports for 'hellomvc' in 15ms
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.Roslyn.dll Information : 0 : [RoslynCompiler]: Compiling 'hellomvc'
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.Roslyn.dll Information : 0 : [RoslynCompiler]: Exported References 85
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.Roslyn.dll Information : 0 : Assembly Neutral References 41
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.Roslyn.dll Information : 0 : Found 41 Assembly Neutral References in 161ms
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.Roslyn.dll Information : 0 : [RoslynAssemblyLoader]: Emitting assembly for hellomvc
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.Roslyn.dll Information : 0 : [RoslynAssemblyLoader]: Emitted hellomvc in 3ms
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : [ProjectAssemblyLoader]: Finished loading hellomvc in 230ms
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/klr.host.dll Information : 0 : RootHost.Load name=Microsoft.AspNet.RequestContainer
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : Loading Microsoft.AspNet.RequestContainer for '.NETFramework,Version=v4.5'.
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : [NuGetAssemblyLoader]: Finished loading Microsoft.AspNet.RequestContainer in 0ms
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/klr.host.dll Information : 0 : RootHost.Load name=Microsoft.AspNet.Mvc
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : Loading Microsoft.AspNet.Mvc for '.NETFramework,Version=v4.5'.
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : [NuGetAssemblyLoader]: Finished loading Microsoft.AspNet.Mvc in 0ms
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/klr.host.dll Information : 0 : RootHost.Load name=Microsoft.AspNet.Routing
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : Loading Microsoft.AspNet.Routing for '.NETFramework,Version=v4.5'.
/home/administrator/.kre/packages/KRE-mono45-x86.1.0.0-alpha3-10110/bin/Microsoft.Framework.Runtime.dll Information : 0 : [NuGetAssemblyLoader]: Finished loading Microsoft.AspNet.Routing in 0ms
System.TypeLoadException: Could not load type 'Microsoft.Framework.DependencyInjection.IOptionsAccessor`1' from assembly 'Microsoft.Framework.DependencyInjection, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null'.
at Startup.Configure (IBuilder app) [0x00000] in <filename unknown>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
kpm restore output:
Restoring packages for /home/administrator/git/HelloWorldVNext/src/hellomvc/project.json
Attempting to resolve dependency hellomvc >= 1.0.0
Attempting to resolve dependency Microsoft.AspNet.Mvc >= 0.1-alpha
CACHE https://www.myget.org/F/aspnetvnext/FindPackagesById()?Id='Microsoft.AspNet.Mvc'
CACHE https://nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Mvc'
Attempting to resolve dependency Common >= 1.0.0
Attempting to resolve dependency System.Linq >=
Attempting to resolve dependency System.Reflection >=
Attempting to resolve dependency System.Runtime >=
Attempting to resolve dependency Microsoft.AspNet.FileSystems >= 0.1-alpha-build-0162
Attempting to resolve dependency Microsoft.AspNet.Http >= 0.1-alpha-build-0444
Attempting to resolve dependency Microsoft.AspNet.Mvc.Core >= 0.1-alpha-build-1268
Attempting to resolve dependency Microsoft.AspNet.Security >= 0.1-alpha-build-0506
Attempting to resolve dependency Microsoft.AspNet.FeatureModel >= 0.1-alpha-build-0444
Attempting to resolve dependency Microsoft.AspNet.HttpFeature >= 0.1-alpha-build-0444
Attempting to resolve dependency Microsoft.AspNet.PipelineCore >= 0.1-alpha-build-0444
Attempting to resolve dependency Microsoft.Framework.Logging >= 0.1-alpha-build-0172
Attempting to resolve dependency Microsoft.AspNet.Security.DataProtection >= 0.1-alpha-build-0153
Attempting to resolve dependency System.Security >=
Attempting to resolve dependency Microsoft.Framework.Runtime.Interfaces >= 0.1-alpha-build-0446
Attempting to resolve dependency Newtonsoft.Json >= 5.0.8
Attempting to resolve dependency Microsoft.AspNet.Mvc.ModelBinding >= 0.1-alpha-build-1268
Attempting to resolve dependency Microsoft.DataAnnotations >= 0.1-alpha-build-0100
Attempting to resolve dependency Microsoft.DataAnnotations.Core >= 0.1-alpha-build-0100
Attempting to resolve dependency Microsoft.DataAnnotations.Supplemental >= 0.1-alpha-build-0100
Attempting to resolve dependency System.ComponentModel.DataAnnotations >=
Attempting to resolve dependency System.Runtime.Serialization >=
Attempting to resolve dependency Microsoft.AspNet.Mvc.Razor >= 0.1-alpha-build-1268
Attempting to resolve dependency K.Roslyn >= 0.1-alpha-build-0137
Attempting to resolve dependency Microsoft.CodeAnalysis.Common >= 0.7.4051916-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.4051916-beta
Attempting to resolve dependency System.Collections >=
Attempting to resolve dependency System.Xml >=
Attempting to resolve dependency System.Xml.Linq >=
Attempting to resolve dependency Microsoft.AspNet.Mvc.Razor.Host >= 0.1-alpha-build-1268
Attempting to resolve dependency Microsoft.AspNet.Razor >= 0.1-alpha-build-0197
Attempting to resolve dependency Microsoft.AspNet.RequestContainer >= 0.1-alpha-build-0572
Attempting to resolve dependency Microsoft.AspNet.Routing >= 0.1-alpha-build-0577
Attempting to resolve dependency Microsoft.Framework.ConfigurationModel >= 0.1-alpha-build-0233
Attempting to resolve dependency Microsoft.Framework.DependencyInjection >= 0.1-alpha-build-0389
Attempting to resolve dependency Nowin.vNext >=
Attempting to resolve dependency Nowin >= 0.11.0
Attempting to resolve dependency Microsoft.AspNet.Hosting >= 0.1-alpha
CACHE https://www.myget.org/F/aspnetvnext/FindPackagesById()?Id='Microsoft.AspNet.Hosting'
CACHE https://nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Hosting'
Attempting to resolve dependency Microsoft.AspNet.FeatureModel >= 0.1-alpha-build-0571
Attempting to resolve dependency Microsoft.AspNet.Http >= 0.1-alpha-build-0571
Attempting to resolve dependency Microsoft.AspNet.PipelineCore >= 0.1-alpha-build-0571
Attempting to resolve dependency Microsoft.AspNet.HttpFeature >= 0.1-alpha-build-0571
Attempting to resolve dependency Microsoft.AspNet.Security.DataProtection >= 0.1-alpha-build-0202
Attempting to resolve dependency Microsoft.Framework.ConfigurationModel >= 0.1-alpha-build-0328
Attempting to resolve dependency Microsoft.Framework.DependencyInjection >= 0.1-alpha-build-0509
Attempting to resolve dependency Microsoft.Framework.Logging >= 0.1-alpha-build-0244
Attempting to resolve dependency Microsoft.Framework.Runtime.Interfaces >= 0.1-alpha-build-0542
Attempting to resolve dependency Microsoft.AspNet.Owin >= 0.1-alpha
CACHE https://www.myget.org/F/aspnetvnext/FindPackagesById()?Id='Microsoft.AspNet.Owin'
CACHE https://nuget.org/api/v2/FindPackagesById()?Id='Microsoft.AspNet.Owin'
Attempting to resolve dependency mscorlib >=
Attempting to resolve dependency System >=
Attempting to resolve dependency System.Core >=
Attempting to resolve dependency Microsoft.CSharp >=
Resolving complete, 329ms elapsed
Restore complete, 334ms elapsed
as root
yum -y install libuv libuv-devel
as myself
mozroots --import --sync
curl https://raw.githubusercontent.com/aspnet/Home/master/kvminstall.sh | sh
source .kre/kvm/kvm.sh
kvm install 1.0.0-alpha3
git clone https://github.com/aspnet/Home.git
cd Home/samples/HelloMvc
kpm restore
k kestrel
....
/home/andrew/.kre/packages/KRE-mono45-x86.1.0.0-alpha3/bin/klr.host.dll Information : 0 : [NuGetAssemblyLoader]: Loaded name=Microsoft.AspNet.Mvc.HeaderValueAbstractions in 0ms
/home/andrew/.kre/packages/KRE-mono45-x86.1.0.0-alpha3/bin/klr.host.dll Information : 0 : [LoaderContainer]: Load name=Microsoft.AspNet.Server.Kestrel
/home/andrew/.kre/packages/KRE-mono45-x86.1.0.0-alpha3/bin/klr.host.dll Information : 0 : [DefaultLoaderEngine]: LoadFile(/home/andrew/.kpm/packages/Microsoft.AspNet.Server.Kestrel/1.0.0-alpha3/lib/net45/Microsoft.AspNet.Server.Kestrel.dll)
/home/andrew/.kre/packages/KRE-mono45-x86.1.0.0-alpha3/bin/klr.host.dll Information : 0 : [NuGetAssemblyLoader]: Loaded name=Microsoft.AspNet.Server.Kestrel in 1ms
System.NullReferenceException: Object reference not set to an instance of an object
at Microsoft.AspNet.Server.Kestrel.Networking.Libuv.loop_size () [0x00000] in :0
at Microsoft.AspNet.Server.Kestrel.Networking.UvLoopHandle.Init (Microsoft.AspNet.Server.Kestrel.Networking.Libuv uv) [0x00000] in :0
at Microsoft.AspNet.Server.Kestrel.KestrelThread.ThreadStart (System.Object parameter) [0x00000] in :0
So I tried this repo, which uses nowin, but after following the instructions I get the following output.
[andrew@nvr helloworldweb]$ k web
/home/andrew/.kre/packages/KRE-mono45-x86.1.0.0-alpha3/bin/Microsoft.Framework.Runtime.dll Information : 0 : [DefaultHost]: Project path: /home/andrew/HelloWorldVNext/src/helloworldweb
/home/andrew/.kre/packages/KRE-mono45-x86.1.0.0-alpha3/bin/Microsoft.Framework.Runtime.dll Information : 0 : [DefaultHost]: Project root: /home/andrew/HelloWorldVNext
/home/andrew/.kre/packages/KRE-mono45-x86.1.0.0-alpha3/bin/Microsoft.Framework.Runtime.dll Information : 0 : [DefaultHost]: Packages path: /home/andrew/.kpm/packages
/home/andrew/.kre/packages/KRE-mono45-x86.1.0.0-alpha3/bin/Microsoft.Framework.Runtime.dll Information : 0 : [DependencyWalker]: Walking dependency graph for 'helloworldweb .NETFramework,Version=v4.5'.
/home/andrew/.kre/packages/KRE-mono45-x86.1.0.0-alpha3/bin/Microsoft.Framework.Runtime.dll Information : 0 : [ProjectReferenceDependencyProvider]: helloworldweb 1.0.0, Nowin.vNext 1.0.0
/home/andrew/.kre/packages/KRE-mono45-x86.1.0.0-alpha3/bin/Microsoft.Framework.Runtime.dll Information : 0 : [NuGetDependencyResolver]: Kestrel 1.0.0-alpha4-10294, Microsoft.AspNet.WebSockets.Server 1.0.0-alpha4-10284, Nowin 0.11.0.0, Microsoft.AspNet.Hosting 1.0.0-alpha4-10333, Microsoft.AspNet.Owin 1.0.0-alpha4-10312
/home/andrew/.kre/packages/KRE-mono45-x86.1.0.0-alpha3/bin/Microsoft.Framework.Runtime.dll Information : 0 : [ReferenceAssemblyDependencyResolver]: mscorlib 4.0.0.0, System 4.0.0.0, System.Core 4.0.0.0, Microsoft.CSharp 4.0.0.0
/home/andrew/.kre/packages/KRE-mono45-x86.1.0.0-alpha3/bin/Microsoft.Framework.Runtime.dll Information : 0 : [DependencyWalker]: Resolved dependencies for helloworldweb in 72ms
/home/andrew/.kre/packages/KRE-mono45-x86.1.0.0-alpha3/bin/klr.host.dll Information : 0 : [LoaderContainer]: Load name=Microsoft.AspNet.Hosting
System.InvalidOperationException: Unable to load application or execute command 'Microsoft.AspNet.Hosting'. Available commands: web, web-kestrel.
at Microsoft.Framework.ApplicationHost.Program.ThrowEntryPointNotfoundException (Microsoft.Framework.Runtime.DefaultHost host, System.String applicationName, System.Exception innerException) [0x00000] in :0
at Microsoft.Framework.ApplicationHost.Program.ExecuteMain (Microsoft.Framework.Runtime.DefaultHost host, System.String applicationName, System.String[] args) [0x00000] in :0
at Microsoft.Framework.ApplicationHost.Program.Main (System.String[] args) [0x00000] in :0
I am unable to run hellomvc. After kpm restore then k web, I receive the error 'Object reference not set to an instance of an object.'
I am on changset 4dc48c6
Ubuntu 14.04
Mono JIT compiler version 3.8.1 (master/eaa343f Sat Aug 16 20:17:20 BST 2014)
kvm version: 1.0.0-alpha3
I get this in the console as soon as I make a request in the browser
juddling@juddling-EasyNote-TK85:~/Documents/HelloWorldVNext/src$ cd hellomvc/
juddling@juddling-EasyNote-TK85:~/Documents/HelloWorldVNext/src/hellomvc$ k web
Started
/
System.TypeLoadException: Could not load type 'Microsoft.CodeAnalysis.OptimizationLevel' from assembly 'Microsoft.CodeAnalysis, Version=0.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
at Microsoft.AspNet.Mvc.Razor.RazorCompilationService.CompileCore (IFileInfo file) [0x00000] in <filename unknown>:0
at Microsoft.AspNet.Mvc.Razor.RazorCompilationService+<>c__DisplayClass0.<Compile>b__1 () [0x00000] in <filename unknown>:0
at Microsoft.AspNet.Mvc.Razor.CompilerCache.GetOrAdd (IFileInfo file, System.Func`1 compile) [0x00000] in <filename unknown>:0
at Microsoft.AspNet.Mvc.Razor.RazorCompilationService.Compile (IFileInfo file) [0x00000] in <filename unknown>:0
at Microsoft.AspNet.Mvc.Razor.VirtualPathRazorPageFactory.CreateInstance (System.String path) [0x00000] in <filename unknown>:0
at Microsoft.AspNet.Mvc.Razor.RazorViewEngine.CreateViewEngineResult (Microsoft.AspNet.Mvc.ActionContext context, System.String viewName, Boolean partial) [0x00000] in <filename unknown>:0
at Microsoft.AspNet.Mvc.Razor.RazorViewEngine.FindView (Microsoft.AspNet.Mvc.ActionContext context, System.String viewName) [0x00000] in <filename unknown>:0
at Microsoft.AspNet.Mvc.Rendering.CompositeViewEngine.FindView (Microsoft.AspNet.Mvc.ActionContext context, System.String viewName, Boolean partial) [0x00000] in <filename unknown>:0
at Microsoft.AspNet.Mvc.Rendering.CompositeViewEngine.FindView (Microsoft.AspNet.Mvc.ActionContext context, System.String viewName) [0x00000] in <filename unknown>:0
at Microsoft.AspNet.Mvc.ViewResult.FindView (IViewEngine viewEngine, Microsoft.AspNet.Mvc.ActionContext context, System.String viewName) [0x00000] in <filename unknown>:0
at Microsoft.AspNet.Mvc.ViewResult+<ExecuteResultAsync>d__1.MoveNext () [0x00000] in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <filename unknown>:0
at Microsoft.AspNet.Mvc.FilterActionInvoker+<InvokeActionResult>d__1.MoveNext () [0x00000] in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <filename unknown>:0
at Microsoft.AspNet.Mvc.FilterActionInvoker+<InvokeActionResultFilter>d__1.MoveNext () [0x00000] in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
at Microsoft.AspNet.Mvc.FilterActionInvoker+<InvokeActionResultWithFilters>d__1.MoveNext () [0x00000] in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <filename unknown>:0
at Microsoft.AspNet.Mvc.FilterActionInvoker+<InvokeAsync>d__1.MoveNext () [0x00000] in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <filename unknown>:0
at Microsoft.AspNet.Mvc.MvcRouteHandler+<RouteAsync>d__1.MoveNext () [0x00000] in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <filename unknown>:0
at Microsoft.AspNet.Routing.Template.TemplateRoute+<RouteAsync>d__1.MoveNext () [0x00000] in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <filename unknown>:0
at Microsoft.AspNet.Routing.RouteCollection+<RouteAsync>d__1.MoveNext () [0x00000] in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <filename unknown>:0
at Microsoft.AspNet.Builder.RouterMiddleware+<Invoke>d__1.MoveNext () [0x00000] in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <filename unknown>:0
at Startup+<<Configure>b__2>d__0.MoveNext () [0x00000] in <filename unknown>:0
If i just run the hellowworldweb project on Ubuntu 14.04.2 LTS .
Docker and KPM and KRE installed , with mono-runtime
System.InvalidOperationException: Unable to load application or execute command 'Microsoft.AspNet.Hosting'. Available commands: web, web-kestrel.
Below is the error .
azureuser@avinubuntu2:/HelloWorldVNext/src/helloworldweb$ k web/HelloWorldVNext/src/helloworldweb$
/home/azureuser/.k/runtimes/kre-mono.1.0.0-beta3/bin/Microsoft.Framework.Runtime.dll Information : 0 : [DefaultHost]: Project path: /home/azureuser/HelloWorldVNext/src/helloworldweb
/home/azureuser/.k/runtimes/kre-mono.1.0.0-beta3/bin/Microsoft.Framework.Runtime.dll Information : 0 : [DefaultHost]: Project root: /home/azureuser/HelloWorldVNext
/home/azureuser/.k/runtimes/kre-mono.1.0.0-beta3/bin/Microsoft.Framework.Runtime.dll Information : 0 : [DefaultHost]: Packages path: /home/azureuser/.k/packages
/home/azureuser/.k/runtimes/kre-mono.1.0.0-beta3/bin/Microsoft.Framework.Runtime.dll Information : 0 : [DependencyWalker]: Walking dependency graph for 'helloworldweb Asp.Net,Version=v5.0'.
/home/azureuser/.k/runtimes/kre-mono.1.0.0-beta3/bin/Microsoft.Framework.Runtime.dll Information : 0 : [WalkContext]: Graph walk stage 1 took in 100ms
/home/azureuser/.k/runtimes/kre-mono.1.0.0-beta3/bin/Microsoft.Framework.Runtime.dll Information : 0 : [DependencyWalker]: Graph walk took 108ms.
/home/azureuser/.k/runtimes/kre-mono.1.0.0-beta3/bin/Microsoft.Framework.Runtime.dll Information : 0 : [ProjectReferenceDependencyProvider]: helloworldweb 1.0.0, Nowin.vNext 1.0.0
/home/azureuser/.k/runtimes/kre-mono.1.0.0-beta3/bin/Microsoft.Framework.Runtime.dll Information : 0 : [NuGetDependencyResolver]: Kestrel 1.0.0-beta6-11787, Microsoft.AspNet.Hosting 1.0.0-beta6-11923, Microsoft.AspNet.Owin 1.0.0-beta6-11566, Microsoft.AspNet.WebSockets.Server 1.0.0-beta6-11643, Nowin 0.11.0.0
/home/azureuser/.k/runtimes/kre-mono.1.0.0-beta3/bin/Microsoft.Framework.Runtime.dll Information : 0 : Breadcrumbs for servicing will not be written because the breadcrumbs folder () does not exist.
/home/azureuser/.k/runtimes/kre-mono.1.0.0-beta3/bin/Microsoft.Framework.Runtime.dll Information : 0 : [ReferenceAssemblyDependencyResolver]: framework/Microsoft.CSharp 4.0.0.0, framework/mscorlib 4.0.0.0, framework/System 4.0.0.0, framework/System.Core 4.0.0.0
/home/azureuser/.k/runtimes/kre-mono.1.0.0-beta3/bin/Microsoft.Framework.Runtime.dll Information : 0 : [WalkContext]: Populate took 34ms
/home/azureuser/.k/runtimes/kre-mono.1.0.0-beta3/bin/Microsoft.Framework.Runtime.dll Information : 0 : [DependencyWalker]: Resolved dependencies for helloworldweb in 146ms
/home/azureuser/.k/runtimes/kre-mono.1.0.0-beta3/bin/kre.host.dll Information : 0 : [LoaderContainer]: Load name=Microsoft.AspNet.Hosting
System.InvalidOperationException: Unable to load application or execute command 'Microsoft.AspNet.Hosting'. Available commands: web, web-kestrel.
at Microsoft.Framework.ApplicationHost.Program.ThrowEntryPointNotfoundException (Microsoft.Framework.Runtime.DefaultHost host, System.String applicationName, System.Exception innerException) [0x00000] in :0
at Microsoft.Framework.ApplicationHost.Program.ExecuteMain (Microsoft.Framework.Runtime.DefaultHost host, System.String applicationName, System.String[] args) [0x00000] in :0
at Microsoft.Framework.ApplicationHost.Program.Main (System.String[] args) [0x00000] in :0
azureuser@avinubuntu2:
KVM list shows
azureuser@avinubuntu2:~/HelloWorldVNext/src/helloworldweb$ kvm list
Active Version Runtime Location Alias
My environment:
Intel(R) Core(TM)2 Duo CPU E4600 @ 2.40GHz
Ubuntu 12.04
mono 3.4.1 (master/09126b1)
I ran the following command:
ab -c 30 -n 100000 http://testhost:8080/
HelloWorldVNext serves ~70 requests per second.
I compare it with the my fastcgi web server which works with nginx and mono (http://github.com/xplicit/HyperFastCgi)
HyperFastCgi v0.3 managed (System.Web+ServiceStack) - ~2000 rps
HyperFastCgi v0.4 wrapper of libevent (System.Web+ServiceStack) - ~2400 rps
HyperFastCgi v0.4 wrapper of libevent (no System.Web, returns "Hello, World" similar to HelloWorldVNext) ~7000 rps
When I remove nginx and directly return "Hello, world" to the client, I get ~10 000 rps
I did not look into vNext sources yet, but can guess that you might run into the mono cross-domain data passing issue. It's very slow on mono. On my machine calling void Test()
method from another domain produces only 3000 (!) calls per second. And it's an "empty" method without data serialization. If I used it in HyperFastCgi I would get only ~100 rps, which is near to vNext results. But I don't use it :) I found a way using native code and embedded mono API to call method in other domain with appropriate several millions calls per second. This looks like a dirty hack, but it works and produces good performance results.
You haven't put a license in your project. Please state under what license is the project available so we can know how to use it.
This uses https://github.com/ProZachJ/docker-mono-aspnetvnext which installs/configures kvm and includes a clone of this repo (davidfowl/HelloWorldVNext).
This works:
docker run -i -p 80:5000 -t prozachj/docker-mono-aspnetvnext /bin/bash
cd ~/HelloWorldVNext/src/hellomvc
k web
yields, as expected: Started.
This does not:
docker run -i -p 80:5000 -t prozachj/docker-mono-aspnetvnext /bin/bash
cd ~/HelloWorldVNext/src/hellomvc
kpm restore
k web
yields: Unable to load application or execute command 'Microsoft.AspNet.Hosting'. Available commands: web, web-kestrel.
This was the end output of kpm restore
:
Resolving complete, 3711ms elapsed
Installing Kestrel 1.0.0-alpha4-10302
Installing Microsoft.AspNet.Mvc 6.0.0-alpha4-11006
Installing Microsoft.AspNet.Hosting 1.0.0-alpha4-10340
Installing Microsoft.AspNet.Owin 1.0.0-alpha4-10319
Restore complete, 3763ms elapsed
hellomvc 1.0.0 [.NETFramework,Version=v4.5]
?? Kestrel 1.0.0-alpha4-10302
?? Microsoft.AspNet.Mvc 6.0.0-alpha4-11006
?? Nowin.vNext 1.0.0 (Nowin 0.11.0.0, Microsoft.AspNet.Hosting 1.0.0-alpha4-10340, Microsoft.AspNet.Owin 1.0.0-alpha4-10319)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.