Skip to content

Commit

Permalink
fix some typos and updated some parts of the readme. Added GetRuntime…
Browse files Browse the repository at this point in the history
….cmd
  • Loading branch information
glennc committed Mar 31, 2014
1 parent 52563e3 commit 206f745
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 15 deletions.
19 changes: 19 additions & 0 deletions GetRuntime.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
@echo off
cd %~dp0

SETLOCAL
SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe

IF EXIST %CACHED_NUGET% goto copynuget
echo Downloading latest version of NuGet.exe...
IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%CACHED_NUGET%'"

:copynuget
IF EXIST .nuget\nuget.exe goto restore
md .nuget
copy %CACHED_NUGET% .nuget\nuget.exe > nul

:restore
IF EXIST packages\KoreBuild goto run
.nuget\NuGet.exe install ProjectK -o packages -nocache -pre
34 changes: 19 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ The Preview repository is a place for the ASP.NET Insiders to log issues and dis

The samples provided are designed to show some of the features of the new framework as well as setting up a sandbox for you to try out new drops of functionality as they come out. The NuGet.config file in the repo points to a private MyGet feed that has all the packages being developed. The feed is updated every time a full build succeeds.

**The K.cmd file in the root of this repo is designed to be able to be put in your path. It will probe various locations relative to your current directory to find the KRuntime that it should" use. All the examples after this will assume you've done this, so that you can just type K Run from anywhere. If you choose not to then add the appropriate number of folder traversals (..\\) before each K command.**
**The K.cmd file in the root of this repo is designed to be able to be put in your path. It will probe various locations relative to your current directory to find the KRuntime that it should use. All the steps after this will assume you've done this, so that you can just type ```K Run``` from anywhere. If you choose not to then add the appropriate number of folder traversals (..\\) before each K command.**

#Available Sample
#Samples

##Sandbox Samples

Expand All @@ -17,41 +17,45 @@ These samples, in this repo, are just basic starting points for you to experimen
+ HelloWebFx. This sample is a basic MVC app. It is not designed to show all the functionality of the new web stack, but to give you a starting point to play with features.

##Feature Samples
The Entropy repo contains examples of specific features in isolation. Each directory contains just enough code to show an aspect of a feature.
The Entropy repo contains samples of specific features in isolation. Each directory contains just enough code to show an aspect of a feature.

##Application Samples
MVC Music Store and BugTracker application are both being ported. Each of these have their own repository that you can look at as they are working.

#Running the samples

##Bootstrapping the runtime
Before you can use the runtime commands to launch your application, you need to have the runtime commands. To do this there is a GetRuntime.cmd file in the root of the repository.

1. Run ```GetRuntime.cmd```
2. This should use NuGet.exe to get the runtime from MyGet and put it in a packages folder. One of the things currently containined in the runtime is a modified version of NuGet.exe that you should use for everything other than getting the runtime itself.

##Running HelloWeb

1. Clone the repository
2. Change directory to Preview\Samples\HelloWeb
3. Run "K restore"
4. You should see a bunch of output as all the dependencies of the app are downloaded from MyGet. This may take a while if MyGet is slow.
5. Run "K web"
3. Run ```K restore```
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.
5. Run ```K web```
6. You should see build output and a message to show the site is now started
7. Navigate to "http://localhost:5001"
8. You should see the welcome page
9. Navigate to "http://localhost:5001/image.jpg"
10. You should see an image served with the static file middleware

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.
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 ```K restore``` before using any sample for the first time.

#Switching to Core CLR

By default when running the applications you are running against Desktop CLR (4.5), you can change that by setting the TARGET_FRAMEWORK variable:

1. Run "set TARGET_FRAMEWORK=k10"
2. Run "K web"
1. Run ```set TARGET_FRAMEWORK=k10```
2. Run ```K web```
3. The first line of your output should say "Loaded Module: klr.core45.dll" instead of "Loaded Module: klr.net45.dll"
4. The HelloWeb app should work the same as when running on Desktop CLR.

**NOTE: There are going to be parts of the stack that work on Desktop but do not work on Core CLR. This set should get smaller and smaller as time goes on, but it is entirely likely as you use Core CLR you will hit errors that can't be worked around as the Core CLR surface area just does not exist yet. An example of this type of problem is using EF with a database. There are not currently any real database providers that work on Core CLR, so you will be restricted to in-memory EF on Core CLR.**

#Packages in the repository

Installing packages from MyGet can be very slow. In order to save the time of getting the Runtime itself, which is the largest of our packages, we checked it in. We will update it periodically as important features are added. The package is also on MyGet if you want to get the latest version yourself.
**NOTE: There are going to be parts of the stack that work on Desktop but do not work on Core CLR. This set should get smaller and smaller as time goes on, but it is entirely likely as you use Core CLR you will hit errors that can't be worked around as the Core CLR surface area just does not exist yet. An example of this type of problem is using Entity Framework with a database. There are not currently any real database providers that work on Core CLR, so you will be restricted to in-memory EF on Core CLR.**

#Core CLR Packages

Currently the BCL is broken into some fairly fine grained packages, which was one of the goals of this effort. However, the packages that exist today do not necesarilly represent the list of packages that we will end up with. We are still experimenting with what makes sense to be a package and what the experience should be.
Currently the BCL is split into some fairly fine grained packages, which was one of the goals of this effort. However, the packages that exist today do not necessarily represent the list of packages that we will end up with. We are still experimenting with what makes sense to be a package and what the experience should be.

0 comments on commit 206f745

Please sign in to comment.