Skip to content

Commit 90a19ee

Browse files
author
Praburaj
committed
Updating home repo samples to use latest bits from dev branch feed
1. Updated samples to use Kestrel for cross plat 2. Updated "configurations" in project.json to "frameworks" 3. Updated readme to include instructions on Kestrel
1 parent 2e1fb8f commit 90a19ee

File tree

6 files changed

+40
-47
lines changed

6 files changed

+40
-47
lines changed

NuGet.Config

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<packageSources>
4-
<add key="AspNetVNext" value="https://www.myget.org/F/aspnetvnext/" />
4+
<add key="AspNetVNext" value="https://www.myget.org/F/aspnetvnext/api/v2" />
55
<add key="NuGet.org" value="https://nuget.org/api/v2/" />
66
</packageSources>
7-
<packageSourceCredentials>
8-
<AspNetVNext>
9-
<add key="Username" value="aspnetreadonly" />
10-
<add key="ClearTextPassword" value="4d8a2d9c-7b80-4162-9978-47e918c9658c" />
11-
</AspNetVNext>
12-
</packageSourceCredentials>
137
</configuration>

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ These are the current minimum requirements, they do not necesarilly represent ou
1818
* .NET 4.5.1 for hosting in IIS
1919

2020
### OSX/Linux
21-
* Mono >= 3.4.1 - Currently this means compiling Mono from source from https://github.com/mono/mono
21+
* Mono >= 3.4.1 - Currently this means compiling Mono from source from https://github.com/mono/mono (Note: See instructions below to install the Homebrew formula that can install the required mono)
2222
* On Linux, you may need to run `mozroots --import --sync` after installing mono
2323
* bash or zsh and curl
2424

@@ -31,6 +31,7 @@ The easiest way to get the KVM on Windows is to run the following command:
3131
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/master/kvminstall.ps1'))"
3232
```
3333
or on OSX:
34+
3435
Mono and KVM (K Version manager) required to develop & run next generation ASP.NET applications on OSX is available as a Homebrew formula. To install the necessary development tools:
3536

3637
* Open a terminal on your MAC
@@ -107,11 +108,11 @@ The [Entropy repo](https://github.com/aspnet/Entropy) contains samples of specif
107108
2. Change directory to Samples\HelloWeb
108109
3. Run ```kpm restore```
109110
4. You should see a bunch of output as all the dependencies of the app are downloaded from MyGet. The K commands all operate on the app that is in the current directory.
110-
5. Run ```K web```
111+
5. Run ```K web``` to run on WebListener. Or run ```K Kestrel``` to run on Mono.
111112
6. You should see build output and a message to show the site is now started
112-
7. Navigate to "http://localhost:5001"
113+
7. Navigate to "http://localhost:5001" or "http://localhost:5004" in case of Mono
113114
8. You should see the welcome page
114-
9. Navigate to "http://localhost:5001/image.jpg"
115+
9. Navigate to "http://localhost:5001/image.jpg" or "http://localhost:5004/image.img" in case of Mono.
115116
10. You should see an image served with the static file middleware
116117

117118
If you can do all of the above then everything should be working. You can try out the WebFx sample now to see some more of the new stack. You should run ```kpm restore``` before using any sample for the first time.
@@ -122,7 +123,7 @@ If you can do all of the above then everything should be working. You can try ou
122123
By default when running the applications you are running against Desktop CLR (4.5), you can change that using the KVM command.
123124

124125
1. Run ```kvm install 0.1-alpha-build-0446 -svrc50``` This command gets the latest Core CLR version of the k runtime and sets it as your default. The -svrc50 switch tells it to use Core CLR, you can use -svr50 to target desktop again.
125-
2. Run ```K web```
126+
2. Run ```K web``` to run on WebListener. Or run ```K Kestrel``` to run on Mono.
126127
3. The first line of your output should say "Loaded Module: klr.core45.dll" instead of "Loaded Module: klr.net45.dll"
127128
4. The HelloWeb app should work the same as when running on Desktop CLR.
128129

samples/ConsoleApp/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"dependencies": {
33
"System.Console": "4.0.0.0"
44
},
5-
"configurations": {
5+
"frameworks": {
66
"net45": {},
77
"k10": {}
88
}

samples/HelloMvc/Startup.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using Microsoft.AspNet.Routing;
33
using Microsoft.Framework.DependencyInjection;
44

5-
namespace KWebStartup
5+
namespace HelloMvc
66
{
77
public class Startup
88
{
@@ -20,4 +20,4 @@ public void Configure(IBuilder app)
2020
app.UseWelcomePage();
2121
}
2222
}
23-
}
23+
}

samples/HelloMvc/project.json

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
11
{
2-
"version": "0.1-alpha-*",
3-
"dependencies": {
4-
"Microsoft.AspNet.Diagnostics": "0.1-alpha-build-0682",
5-
"Microsoft.AspNet.Hosting": "0.1-alpha-build-0572",
6-
"Microsoft.AspNet.Mvc": "0.1-alpha-build-1268",
7-
"Microsoft.AspNet.Server.WebListener": "0.1-alpha-build-0520"
8-
},
9-
"commands": {
10-
"web": "Microsoft.AspNet.Hosting server=Microsoft.AspNet.Server.WebListener server.urls=http://localhost:5001"
11-
},
12-
"configurations": {
13-
"net45": {
14-
"dependencies": {
15-
"System.Runtime": "",
16-
"System.ComponentModel.DataAnnotations": ""
17-
}
2+
"version": "1.0.0-*",
3+
"dependencies": {
4+
"Microsoft.AspNet.Diagnostics": "1.0.0-*",
5+
"Microsoft.AspNet.Hosting": "1.0.0-*",
6+
"Microsoft.AspNet.Mvc": "6.0.0-*",
7+
"Microsoft.AspNet.Server.WebListener": "1.0.0-*"
188
},
19-
"k10": {}
20-
}
9+
"commands": {
10+
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5001",
11+
"Kestrel": "Microsoft.AspNet.Hosting --server Kestrel --server.urls http://localhost:5004"
12+
},
13+
"frameworks": {
14+
"net45": {},
15+
"k10": {}
16+
}
2117
}

samples/HelloWeb/project.json

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
{
2-
"version": "0.1-alpha-*",
3-
"dependencies": {
4-
"Microsoft.AspNet.Diagnostics": "0.1-alpha-build-0682",
5-
"Microsoft.AspNet.Hosting": "0.1-alpha-build-0572",
6-
"Microsoft.AspNet.Server.WebListener": "0.1-alpha-build-0520",
7-
"Microsoft.AspNet.StaticFiles": "0.1-alpha-build-0443"
8-
},
9-
"commands": {
10-
"web": "Microsoft.AspNet.Hosting server=Microsoft.AspNet.Server.WebListener server.urls=http://localhost:5001"
11-
},
12-
"configurations": {
13-
"net45": {},
14-
"k10": {}
15-
}
2+
"version": "1.0.0-*",
3+
"dependencies": {
4+
"Kestrel": "1.0.0-*",
5+
"Microsoft.AspNet.Diagnostics": "1.0.0-*",
6+
"Microsoft.AspNet.Hosting": "1.0.0-*",
7+
"Microsoft.AspNet.Server.WebListener": "1.0.0-*",
8+
"Microsoft.AspNet.StaticFiles": "1.0.0-*"
9+
},
10+
"commands": {
11+
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5001",
12+
"Kestrel": "Microsoft.AspNet.Hosting --server Kestrel --server.urls http://localhost:5004"
13+
},
14+
"frameworks": {
15+
"net45": {},
16+
"k10": {}
17+
}
1618
}

0 commit comments

Comments
 (0)