From 6196e60f9178f9ea3ce5151f83361fb0e2231b67 Mon Sep 17 00:00:00 2001 From: Kirthi Krishnamraju Date: Mon, 12 May 2014 11:51:51 -0700 Subject: [PATCH 1/4] Updated Readme.md and k.ini to use 0421 build. Deleted kvm.cmd --- README.md | 11 ++- kvm.cmd | 187 ------------------------------------------- src/MusicStore/k.ini | 4 +- 3 files changed, 9 insertions(+), 193 deletions(-) delete mode 100644 kvm.cmd diff --git a/README.md b/README.md index c6b7774a7a..b05b393cb7 100644 --- a/README.md +++ b/README.md @@ -4,14 +4,17 @@ The first thing we need to do is setup the tools required to build and run an application. -* Clone the repository -* On the command line execute ```kvm setup``` +* Clone UpdateToLates branch from [Home] (https://github.com/aspnet/Home) repository +* On the command line, cd to Home repository and execute ```kvm setup``` * This command will download the latest version of the SDK and put it on your path so that you can run the rest of the commands in the readme. If you want to know more about what this is doing then you can read the [KVM page](https://github.com/aspnet/Home/wiki/version-manager) of the wiki. +* On the command line execute ```kvm install 0.1-alpha-build-0421``` +* This command will install Desktop flavor of KRE build 0421 * If you already have ```kvm``` installed on the machine ignore above steps. +* Clone this repository ### Run the application: -1. Run ```build.cmd``` to restore all the necessary packages and generate project files -2. Open a command prompt and cd ```\src\\``` +1. Open a command prompt and cd ```\src\\``` +2. Run ```kpm restore``` to restore all the necessary packages and generate project files 3. **[Helios]:** 4. ```Helios.cmd``` to launch the app on IISExpress (Application started at URL **http://localhost:5001/**). 4. **[SelfHost]:** diff --git a/kvm.cmd b/kvm.cmd deleted file mode 100644 index 7b73752a4f..0000000000 --- a/kvm.cmd +++ /dev/null @@ -1,187 +0,0 @@ -@ECHO OFF -IF "%1"=="" ( - CALL :cmd_help -) ELSE ( - CALL :cmd_%1 %* - IF ERRORLEVEL 1 CALL:cmd_help -) -GOTO:EOF - - -:cmd_setup -SET "_KVM_PATH=%USERPROFILE%\.k\" -SET "_TEMP_PATH=%PATH%" - -IF /I NOT "%~dp0"=="%_KVM_PATH%" ( - IF NOT EXIST "%_KVM_PATH%" MKDIR "%_KVM_PATH%" - COPY "%~f0" "%_KVM_PATH%kvm.cmd" -) - -:PARSE_START -@IF "%_TEMP_PATH%"=="" GOTO PARSE_END -@FOR /F "tokens=1* delims=;" %%a in ("%_TEMP_PATH%") Do @IF "%%a"=="%_KVM_PATH%" GOTO:end_setup -@FOR /F "tokens=1* delims=;" %%a in ("%_TEMP_PATH%") Do @SET _TEMP_PATH=%%b -@GOTO PARSE_START -:PARSE_END - -SET "PATH=%PATH%;%_KVM_PATH%" -powershell -NoProfile -ExecutionPolicy unrestricted -Command "[Environment]::SetEnvironmentVariable('PATH',[Environment]::GetEnvironmentVariable('PATH','user')+';%_KVM_PATH%','user');" - - -:end_setup -CALL "%_KVM_PATH%kvm.cmd" upgrade -@ECHO Running crossgen, see crossgen.log for results -CALL "%_KVM_PATH%k.cmd" crossgen >crossgen.log 2>crossgen.err.log -SET _KVM_PATH= -SET _TEMP_PATH= -GOTO:EOF - - -:cmd_upgrade -CALL:cmd_install install -CALL:cmd_alias alias default %_KVM_VERSION% -GOTO:EOF - - -:cmd_install -IF NOT EXIST "%~dp0.nuget\NuGet.exe" ( - IF NOT EXIST "%~dp0.nuget" MKDIR "%~dp0.nuget" - ECHO Downloading latest version of NuGet.exe... - @powershell -NoProfile -ExecutionPolicy unrestricted -Command "((new-object net.webclient).DownloadFile('https://nuget.org/nuget.exe', '%~dp0.nuget\NuGet.exe'))" -) - -IF NOT EXIST "%~dp0.nuget\NuGet.config" ( -echo ^ >"%~dp0.nuget\NuGet.config" -echo ^ >>"%~dp0.nuget\NuGet.config" -echo ^ >>"%~dp0.nuget\NuGet.config" -echo ^ >>"%~dp0.nuget\NuGet.config" -echo ^ >>"%~dp0.nuget\NuGet.config" -echo ^ >>"%~dp0.nuget\NuGet.config" -echo ^ >>"%~dp0.nuget\NuGet.config" -echo ^ >>"%~dp0.nuget\NuGet.config" -echo ^ >>"%~dp0.nuget\NuGet.config" -echo ^ >>"%~dp0.nuget\NuGet.config" -echo ^ >>"%~dp0.nuget\NuGet.config" -) - -IF "%2"=="" ( - echo Finding latest version - FOR /f "tokens=1,2" %%G in ('"%~dp0.nuget\NuGet.exe" list ProjectK -Prerelease -ConfigFile %~dp0.nuget\NuGet.config') DO ( - IF "%%G"=="ProjectK" ( - SET _KVM_VERSION=%%H - ) - ) -) ELSE ( - SET "_KVM_VERSION=%2" -) - -ECHO Downloading version %_KVM_VERSION% -"%~dp0.nuget\NuGet.exe" install ProjectK -Version %_KVM_VERSION% -OutputDirectory "%~dp0packages" -ConfigFile "%~dp0.nuget\NuGet.config" - -CALL:cmd_use use %_KVM_VERSION% -GOTO:EOF - - -:cmd_use -IF NOT EXIST "%~dp0k.cmd" ( - ECHO @CALL %%~dp0kvm.cmd k %%* >%~dp0k.cmd -) -IF EXIST "%~dp0alias\%2.txt" ( - FOR /F %%G IN (%~dp0alias\%2.txt) DO ( - ECHO Setting _KVM_VERSION to '%%G' - SET "_KVM_VERSION=%%G" - ) -) ELSE ( - IF NOT EXIST "%~dp0packages\ProjectK.%2\tools\k.cmd" ( - ECHO Version '%2' not found. - ECHO You may need to run 'kvm install %2' - GOTO:EOF - ) - ECHO Setting _KVM_VERSION to '%2' - SET "_KVM_VERSION=%2" -) -GOTO:EOF - - -:cmd_alias -IF NOT EXIST "%~dp0alias" ( - MKDIR "%~dp0alias" -) -IF "%3"=="" ( - IF "%2"=="" ( - DIR "%~dp0alias" /b - ) ELSE ( - ECHO Alias '%2' is - TYPE "%~dp0alias\%2.txt" - ) -) ELSE ( - IF NOT EXIST "%~dp0packages\ProjectK.%3\tools\k.cmd" ( - ECHO Version '%3' not found. - ECHO You may need to run 'kvm install %3' - GOTO:EOF - ) - - ECHO Setting alias '%2' to '%3' - ECHO %3>%~dp0alias\%2.txt -) -GOTO:EOF - - -:cmd_list -dir /b "%~dp0packages\ProjectK*" -GOTO:EOF - - -:cmd_k -@REM find k.cmd in local paths - -@REM read _KVM_VERSION.txt if _KVM_VERSION not set -IF "%_KVM_VERSION%" == "" ( - FOR /F %%G IN (%~dp0alias\default.txt) DO ( - SET "_KVM_VERSION=%%G" - ) -) -IF NOT EXIST "%~dp0packages\ProjectK.%_KVM_VERSION%\tools\k.cmd" ( - ECHO Version '%_KVM_VERSION%' not found. - ECHO You may need to run 'kvm install %_KVM_VERSION%' -) ELSE ( - CALL "%~dp0packages\ProjectK.%_KVM_VERSION%\tools\k.cmd" %2 %3 %4 %5 %6 %7 %8 %9 -) -GOTO:EOF - - -:cmd_help -ECHO kvm ^ [args...] -ECHO k version manager -ECHO . -ECHO kvm help -ECHO displays this help -ECHO . -ECHO kvm upgrade -ECHO install latest k version and make it the default -ECHO . -ECHO kvm install ^ -ECHO install and use specific k version -ECHO . -ECHO kvm list -ECHO list installed k versions -ECHO . -ECHO kvm use ^^|^ -ECHO use a version or alias within the current command prompt -ECHO . -ECHO kvm alias ^ ^ -ECHO create alias to a specific version -ECHO alias names may be passed to 'kvm use ^' -ECHO the alias 'default' determines the default k version -ECHO when kvm use is not called -ECHO . -ECHO kvm alias ^ -ECHO show the version of an alias -ECHO . -ECHO kvm alias -ECHO list aliases -ECHO . - -GOTO:EOF - - diff --git a/src/MusicStore/k.ini b/src/MusicStore/k.ini index e6981d787a..2146d5f470 100644 --- a/src/MusicStore/k.ini +++ b/src/MusicStore/k.ini @@ -1,2 +1,2 @@ -KRE_VERSION=0.1-alpha-build-0420 -KRE_FLAVOR=CORECLR \ No newline at end of file +KRE_VERSION=0.1-alpha-build-0421 +KRE_FLAVOR=DESKTOP \ No newline at end of file From 382da5e52b834ad68b255b4dade0b2e795b77518 Mon Sep 17 00:00:00 2001 From: Kirthi Krishnamraju Date: Mon, 12 May 2014 12:17:58 -0700 Subject: [PATCH 2/4] Updated Readme.md --- README.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b05b393cb7..222bc84fde 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ The first thing we need to do is setup the tools required to build and run an application. -* Clone UpdateToLates branch from [Home] (https://github.com/aspnet/Home) repository +* Clone UpdateToLatest branch from [Home] (https://github.com/aspnet/Home) repository * On the command line, cd to Home repository and execute ```kvm setup``` * This command will download the latest version of the SDK and put it on your path so that you can run the rest of the commands in the readme. If you want to know more about what this is doing then you can read the [KVM page](https://github.com/aspnet/Home/wiki/version-manager) of the wiki. * On the command line execute ```kvm install 0.1-alpha-build-0421``` @@ -23,18 +23,22 @@ The first thing we need to do is setup the tools required to build and run an ap 6. Run ```k run``` (This hosts the app in a console application - Application started at URL **http://localhost:5003/**) ### Switching between Desktop CLR and CoreCLR: -By default the app runs on desktop CLR. To switch to run the app on CoreCLR set environment variable ```SET TARGET_FRAMEWORK=k10```. To switch back to desktop CLR ```SET TARGET_FRAMEWORK=``` to empty. +By default the app runs on desktop CLR. To switch to run the app on CoreCLR follow the steps below +* On the command line, execute ```kvm install 0.1-alpha-build-0421 -svrc50``` +* This command will install core clr flavor of KRE build 0421 and set runtime to core clr 0421 build. +* If you want to run on IIS/IISExpress against core clr, open k.ini and update KRE_FLAVOR to CORECLR and follow steps for running the application from 'Run the application' section +* If you want to run on SelfHost against core clr, follow steps for running the application from 'Run the application' section ### Adding a new package: 1. Edit the project.json to include the package you want to install -2. Do a ```build.cmd``` - This will restore the package and regenerate your csproj files to get intellisense for the installed packages. +2. Do a ```kpm restore``` - This will restore the package and regenerate your csproj files to get intellisense for the installed packages. ### Work against the latest build: 1. Run ```Clean.cmd``` - This will clear all the packages and any temporary files generated 2. Continue the topic "Run the application" ### Work against LKG Build: -1. Everytime you do a ```build.cmd``` you will get the latest packages of all the included packages. If you would like to go back to an LKG build checkout the *LKG.json* file in the MusicStore folder. +1. Everytime you do a ```kpm restore``` you will get the latest packages of all the included packages. If you would like to go back to an LKG build checkout the *LKG.json* file in the MusicStore folder. 2. This is a captured snapshot of build numbers which worked for this application. This LKG will be captured once in a while. ### Note: From 9e57f01a48a572bb22efd4c32878ef4a24368377 Mon Sep 17 00:00:00 2001 From: Kirthi Krishnamraju Date: Mon, 12 May 2014 15:43:03 -0700 Subject: [PATCH 3/4] More edits to Readme.md --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 222bc84fde..bd40e119c4 100644 --- a/README.md +++ b/README.md @@ -4,17 +4,18 @@ The first thing we need to do is setup the tools required to build and run an application. +* If you already have ```kvm``` installed on the machine ignore the steps below. * Clone UpdateToLatest branch from [Home] (https://github.com/aspnet/Home) repository * On the command line, cd to Home repository and execute ```kvm setup``` * This command will download the latest version of the SDK and put it on your path so that you can run the rest of the commands in the readme. If you want to know more about what this is doing then you can read the [KVM page](https://github.com/aspnet/Home/wiki/version-manager) of the wiki. * On the command line execute ```kvm install 0.1-alpha-build-0421``` -* This command will install Desktop flavor of KRE build 0421 -* If you already have ```kvm``` installed on the machine ignore above steps. -* Clone this repository +* This command will install Desktop flavor(x86) of KRE build 0421 in your user profile +* Clone MusicStore repository, if you have not already ### Run the application: 1. Open a command prompt and cd ```\src\\``` 2. Run ```kpm restore``` to restore all the necessary packages and generate project files + Note: ```kpm restore``` currently works only on Desktop flavor. If you intend to use Core CLR, you should get Desktop flavor, execute ```kpm restore``` and then switch to Core CLR 3. **[Helios]:** 4. ```Helios.cmd``` to launch the app on IISExpress (Application started at URL **http://localhost:5001/**). 4. **[SelfHost]:** From 82ac1805351c8cec6f44c5ab6b22c3065d285837 Mon Sep 17 00:00:00 2001 From: Kirthi Krishnamraju Date: Mon, 12 May 2014 16:30:09 -0700 Subject: [PATCH 4/4] modified readme based on pr comments, deleted build.cmd and lkg.json --- README.md | 10 ++----- build.cmd | 26 ----------------- makefile.shade | 7 ----- src/MusicStore/LKG.json | 62 ----------------------------------------- 4 files changed, 3 insertions(+), 102 deletions(-) delete mode 100644 build.cmd delete mode 100644 makefile.shade delete mode 100644 src/MusicStore/LKG.json diff --git a/README.md b/README.md index bd40e119c4..57181a6319 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ The first thing we need to do is setup the tools required to build and run an application. * If you already have ```kvm``` installed on the machine ignore the steps below. -* Clone UpdateToLatest branch from [Home] (https://github.com/aspnet/Home) repository +* Clone [Home] (https://github.com/aspnet/Home) repository * On the command line, cd to Home repository and execute ```kvm setup``` * This command will download the latest version of the SDK and put it on your path so that you can run the rest of the commands in the readme. If you want to know more about what this is doing then you can read the [KVM page](https://github.com/aspnet/Home/wiki/version-manager) of the wiki. * On the command line execute ```kvm install 0.1-alpha-build-0421``` @@ -31,17 +31,13 @@ By default the app runs on desktop CLR. To switch to run the app on CoreCLR foll * If you want to run on SelfHost against core clr, follow steps for running the application from 'Run the application' section ### Adding a new package: -1. Edit the project.json to include the package you want to install -2. Do a ```kpm restore``` - This will restore the package and regenerate your csproj files to get intellisense for the installed packages. +1. Edit the project.json to include the package you want to install. +2. Do a ```kpm restore``` - This will restore the package in the project. ### Work against the latest build: 1. Run ```Clean.cmd``` - This will clear all the packages and any temporary files generated 2. Continue the topic "Run the application" -### Work against LKG Build: -1. Everytime you do a ```kpm restore``` you will get the latest packages of all the included packages. If you would like to go back to an LKG build checkout the *LKG.json* file in the MusicStore folder. -2. This is a captured snapshot of build numbers which worked for this application. This LKG will be captured once in a while. - ### Note: 1. Application is started on different ports on different hosts. To change the port or URL modify ```Helios.cmd``` or project.json commands section in case of self-host and customhost. 2. Use Visual studio only for editing & intellisense. Don't try to build or run the app from Visual studio. diff --git a/build.cmd b/build.cmd deleted file mode 100644 index 5f16788f7b..0000000000 --- a/build.cmd +++ /dev/null @@ -1,26 +0,0 @@ -@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 KoreBuild -ExcludeVersion -o packages -nocache -pre -.nuget\NuGet.exe install Sake -version 0.2 -o packages -ExcludeVersion -CALL packages\KoreBuild\build\kvm upgrade -svr50 -x86 -CALL packages\KoreBuild\build\kvm install default -svrc50 -x86 - -:run -CALL packages\KoreBuild\build\kvm use default -svr50 -x86 -packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %* \ No newline at end of file diff --git a/makefile.shade b/makefile.shade deleted file mode 100644 index 6357ea2841..0000000000 --- a/makefile.shade +++ /dev/null @@ -1,7 +0,0 @@ - -var VERSION='0.1' -var FULL_VERSION='0.1' -var AUTHORS='Microsoft' - -use-standard-lifecycle -k-standard-goals diff --git a/src/MusicStore/LKG.json b/src/MusicStore/LKG.json deleted file mode 100644 index 933c77b76d..0000000000 --- a/src/MusicStore/LKG.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "version": "0.1-alpha-*", - "dependencies": { - "Helios": "0.1-alpha-build-0489", - "Microsoft.AspNet.Http": "0.1-alpha-381", - "Microsoft.AspNet.Mvc": "0.1-alpha-build-1047", - "Microsoft.AspNet.Razor": "0.1-alpha-187", - "Microsoft.Framework.ConfigurationModel": "0.1-alpha-214", - "Microsoft.Framework.DependencyInjection": "0.1-alpha-build-0345", - "Microsoft.AspNet.RequestContainer": "0.1-alpha-build-0477", - "Microsoft.AspNet.Routing": "0.1-alpha-build-0478", - "Microsoft.AspNet.Mvc.ModelBinding": "0.1-alpha-build-1047", - "Microsoft.AspNet.Mvc.Core": "0.1-alpha-build-1047", - "Microsoft.AspNet.Mvc.Razor": "0.1-alpha-build-1047", - "Microsoft.AspNet.StaticFiles": "0.1-alpha-build-0367", - "System.Security.Claims": "0.1-alpha-build-0230", - "System.Security.Principal": "4.0.0.0", - "Microsoft.AspNet.Security.DataProtection": "0.1-alpha-148", - "Microsoft.AspNet.Identity": "0.1-alpha-build-0805", - "Microsoft.AspNet.Identity.Entity": "0.1-alpha-build-0805", - "Microsoft.AspNet.Identity.InMemory": "0.1-alpha-build-0805", - "Microsoft.AspNet.Identity.Security": "0.1-alpha-build-0805", - "Microsoft.Data.Entity": "0.1-alpha-build-0686", - "Microsoft.Data.Entity.Relational": "0.1-alpha-build-0686", - "Microsoft.Data.Entity.SqlServer": "0.1-alpha-build-0686", - "Microsoft.Data.Entity.InMemory": "0.1-alpha-build-0686", - "Microsoft.Data.Entity.Migrations": "0.1-alpha-build-0686", - "Microsoft.AspNet.Diagnostics": "0.1-alpha-build-0522", - "Microsoft.AspNet.Hosting": "0.1-alpha-build-0477", - "Microsoft.AspNet.Server.WebListener": "0.1-alpha-build-0423", - "Microsoft.Framework.ConfigurationModel.Json": "0.1-alpha-214", - "Microsoft.AspNet.Security": "0.1-alpha-build-0401", - "Microsoft.AspNet.Security.Cookies": "0.1-alpha-build-0401" - }, - "configurations": { - "net45": { - "dependencies": { - "System.Runtime": "", - "System.ComponentModel.DataAnnotations": "", - "System.Data": "" - } - }, - "k10": { - "dependencies": { - "System.Collections": "4.0.0.0", - "System.Linq": "4.0.0.0", - "System.Runtime": "4.0.20.0", - "System.Runtime.Extensions": "4.0.10.0", - "System.Dynamic.Runtime": "4.0.0.0", - "System.Threading.Tasks": "4.0.10.0", - "System.ComponentModel": "4.0.0.0", - "System.Console": "4.0.0.0", - "System.Diagnostics.Debug": "4.0.10.0", - "System.Diagnostics.Tools": "4.0.0.0", - "Microsoft.DataAnnotations": "0.1-alpha-build-0097", - "System.Reflection": "4.0.10.0", - "System.Reflection.Extensions": "4.0.0.0", - "System.IO": "4.0.0.0" - } - } - } -} \ No newline at end of file