OS X(10.11)에 ASP.NET Application
개요
설치
Install the .NET Version Manager(DNVM)
$ curl -sSL https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.sh | DNX_BRANCH=dev sh && source ~/.dnx/dnvm/dnvm.sh Downloading dnvm as script to '/Users/onlydel/.dnx/dnvm' Appending source string to /Users/onlydel/.bash_profile Appending source string to /Users/onlydel/.zshrc Type 'source /Users/onlydel/.dnx/dnvm/dnvm.sh' to start using dnvm Onlydel-MacBook-Pro:~ onlydel$ dnvm upgrade -r coreclr Determining latest version Latest version is 1.0.0-beta7 Downloading dnx-coreclr-darwin-x64.1.0.0-beta7 from https://www.nuget.org/api/v2 Download: https://www.nuget.org/api/v2/package/dnx-coreclr-darwin-x64/1.0.0-beta7 ######################################################################## 100.0% Installing to /Users/onlydel/.dnx/runtimes/dnx-coreclr-darwin-x64.1.0.0-beta7 Adding /Users/onlydel/.dnx/runtimes/dnx-coreclr-darwin-x64.1.0.0-beta7/bin to process PATH Setting alias 'default' to 'dnx-coreclr-darwin-x64.1.0.0-beta7' Onlydel-MacBook-Pro:~ onlydel$ dnvm upgrade -r mono It appears you don't have Mono available. Remember to get Mono before trying to run application. Determining latest version Latest version is 1.0.0-beta7 Downloading dnx-mono.1.0.0-beta7 from https://www.nuget.org/api/v2 Download: https://www.nuget.org/api/v2/package/dnx-mono/1.0.0-beta7 ######################################################################## 100.0% Installing to /Users/onlydel/.dnx/runtimes/dnx-mono.1.0.0-beta7 Adding /Users/onlydel/.dnx/runtimes/dnx-mono.1.0.0-beta7/bin to process PATH Updating alias 'default' to 'dnx-mono.1.0.0-beta7'
Install the .NET Execution Environment (DNX)
.NET Core 설치하기
$ dnvm upgrade -r coreclr Determining latest version Latest version is 1.0.0-beta7 Downloading dnx-coreclr-darwin-x64.1.0.0-beta7 from https://www.nuget.org/api/v2 Download: https://www.nuget.org/api/v2/package/dnx-coreclr-darwin-x64/1.0.0-beta7 ######################################################################## 100.0% Installing to /Users/onlydel/.dnx/runtimes/dnx-coreclr-darwin-x64.1.0.0-beta7 Adding /Users/onlydel/.dnx/runtimes/dnx-coreclr-darwin-x64.1.0.0-beta7/bin to process PATH Setting alias 'default' to 'dnx-coreclr-darwin-x64.1.0.0-beta7'
cross platform .net framework - mono설치
$ dnvm upgrade -r mono It appears you don't have Mono available. Remember to get Mono before trying to run application. Determining latest version Latest version is 1.0.0-beta7 Downloading dnx-mono.1.0.0-beta7 from https://www.nuget.org/api/v2 Download: https://www.nuget.org/api/v2/package/dnx-mono/1.0.0-beta7 ######################################################################## 100.0% Installing to /Users/onlydel/.dnx/runtimes/dnx-mono.1.0.0-beta7 Adding /Users/onlydel/.dnx/runtimes/dnx-mono.1.0.0-beta7/bin to process PATH Updating alias 'default' to 'dnx-mono.1.0.0-beta7'
설치확인
$ dnvm list Active Version Runtime Architecture OperatingSystem Alias ------ ------- ------- ------------ --------------- ----- 1.0.0-beta7 coreclr x64 darwin * 1.0.0-beta7 mono linux/osx default
yeomen 설치
/usr/local/bin 디렉토리에에 쓰기 권한 있어야 한다.
$ npm install -g yo > spawn-sync@1.0.13 postinstall /usr/local/lib/node_modules/yo/node_modules/cross-spawn/node_modules/spawn-sync > node postinstall /usr/local/bin/yo -> /usr/local/lib/node_modules/yo/lib/cli.js > yo@1.4.8 postinstall /usr/local/lib/node_modules/yo > yodoctor Yeoman Doctor Running sanity checks on your system ✔ Global configuration file is valid ✔ NODE_PATH matches the npm root ✔ Node.js version ✔ No .bowerrc file in home directory ✔ No .yo-rc.json file in home directory ✔ npm version Everything looks all right! yo@1.4.8 /usr/local/lib/node_modules/yo ├── titleize@1.0.0 ├── array-uniq@1.0.2 ├── figures@1.4.0 ├── async@1.4.2 ├── humanize-string@1.0.1 (decamelize@1.0.0) ├── opn@3.0.2 (object-assign@3.0.0) ├── user-home@2.0.0 (os-homedir@1.0.1) ├── yeoman-character@1.0.1 (supports-color@1.3.1) ├── findup@0.1.5 (commander@2.1.0, colors@0.6.2) ├── string-length@1.0.1 (strip-ansi@3.0.0) ├── sort-on@1.2.2 (arrify@1.0.0, dot-prop@2.2.0) ├── chalk@1.1.1 (escape-string-regexp@1.0.3, ansi-styles@2.1.0, supports-color@2.0.0, strip-ansi@3.0.0, has-ansi@2.0.0) ├── repeating@1.1.3 (is-finite@1.0.1) ├── update-notifier@0.5.0 (is-npm@1.0.0, latest-version@1.0.1, semver-diff@2.0.0) ├── root-check@1.0.0 (downgrade-root@1.1.0, sudo-block@1.2.0) ├── configstore@1.2.1 (os-tmpdir@1.0.1, object-assign@3.0.0, graceful-fs@4.1.2, xdg-basedir@2.0.0, uuid@2.0.1, osenv@0.1.3, write-file-atomic@1.1.3, mkdirp@0.5.1) ├── yosay@1.0.5 (ansi-regex@1.1.1, word-wrap@1.1.0, ansi-styles@2.1.0, strip-ansi@2.0.1, pad-component@0.0.1, taketalk@1.0.0, minimist@1.2.0, string-width@1.0.1) ├── inquirer@0.9.0 (ansi-regex@2.0.0, strip-ansi@3.0.0, cli-width@1.0.1, rx-lite@2.5.2, through@2.3.8, readline2@0.1.1, run-async@0.1.0) ├── got@4.2.0 (lowercase-keys@1.0.0, is-stream@1.0.1, timed-out@2.0.0, is-redirect@1.0.0, prepend-http@1.0.3, is-plain-obj@1.0.0, object-assign@3.0.0, unzip-response@1.0.0, node-status-codes@1.0.0, parse-json@2.2.0, create-error-class@2.0.1, pinkie-promise@1.0.0, duplexify@3.4.2, read-all-stream@3.0.1) ├── npm-keyword@1.2.0 (got@3.3.1, registry-url@3.0.3) ├── package-json@1.2.0 (got@3.3.1, registry-url@3.0.3) ├── fullname@1.1.1 (npmconf@2.1.2) ├── cross-spawn@0.4.1 (lru-cache@2.7.0, spawn-sync@1.0.13) ├── meow@3.4.2 (trim-newlines@1.0.0, loud-rejection@1.0.0, object-assign@4.0.1, minimist@1.2.0, camelcase-keys@1.0.0, redent@1.0.0, read-pkg-up@1.0.1, normalize-package-data@2.3.4) ├── lodash@3.10.1 ├── yeoman-environment@1.2.7 (diff@1.4.0, escape-string-regexp@1.0.3, log-symbols@1.0.2, text-table@0.2.0, untildify@2.1.0, debug@2.2.0, grouped-queue@0.3.0, mem-fs@1.1.0, globby@2.1.0, inquirer@0.8.5) ├── insight@0.6.0 (object-assign@2.1.1, async@0.9.2, lodash.debounce@3.1.1, tough-cookie@1.2.0, os-name@1.0.3, inquirer@0.8.5, request@2.64.0) └── yeoman-doctor@1.4.0 (object-values@1.0.0, log-symbols@1.0.2, user-home@1.1.1, each-async@1.1.1, semver@4.3.6, bin-version-check@2.1.0, twig@0.8.2)
스케폴딩을 위해 OmniSharp generator설치
yo를 이용해서 개발틀을 만들어준다.
$ npm install -g generator-aspnet generator-aspnet@0.0.75 /usr/local/lib/node_modules/generator-aspnet ├── vs_projectname@1.0.2 ├── uuid@2.0.1 ├── chalk@1.1.1 (ansi-styles@2.1.0, escape-string-regexp@1.0.3, supports-color@2.0.0, has-ansi@2.0.0, strip-ansi@3.0.0) ├── yosay@1.0.5 (ansi-styles@2.1.0, ansi-regex@1.1.1, word-wrap@1.1.0, strip-ansi@2.0.1, pad-component@0.0.1, minimist@1.2.0, taketalk@1.0.0, string-width@1.0.1, repeating@1.1.3) ├── chai@1.10.0 (assertion-error@1.0.0, deep-eql@0.1.3) └── yeoman-generator@0.19.2 (diff@1.4.0, read-chunk@1.0.1, detect-conflict@1.0.0, yeoman-welcome@1.0.1, xdg-basedir@1.0.1, user-home@1.1.1, rimraf@2.4.3, async@0.9.2, mime@1.3.4, text-table@0.2.0, dargs@4.0.1, class-extend@0.1.1, debug@2.2.0, shelljs@0.4.0, nopt@3.0.4, cross-spawn@0.2.9, mkdirp@0.5.1, istextorbinary@1.0.2, run-async@0.1.0, mem-fs-editor@1.2.3, through2@0.6.5, cli-table@0.3.1, underscore.string@3.2.2, yeoman-assert@1.0.0, glob@5.0.15, findup-sync@0.2.1, yeoman-environment@1.2.7, github-username@1.1.1, sinon@1.17.1, dateformat@1.0.11, pretty-bytes@1.0.4, lodash@3.10.1, inquirer@0.8.5, download@4.2.1, gruntfile-editor@1.0.0, html-wiring@1.2.0)
스케폴딩(Scheffolding)
-
솔루션을 위한 폴더를 만든다.
$ mkdir -p ~/AspNet/MyFirstDnxApp
-
솔루션 폴더에 global.json파일을 만들고 아래 내용을 넣는다.
{ "sdk": { "version": "1.0.0-beta7" } }
-
Application type선택: 위,아래 화살표키로 선택후 엔터
$ yo aspnet _-----_ | | .--------------------------. |--(o)--| | Welcome to the | `---------´ | marvellous ASP.NET 5 | ( _´U`_ ) | generator! | /___A___\ '--------------------------' | ~ | __'.___.'__ ´ ` |° ´ Y ` ? What type of application do you want to create? (Use arrow keys) ❯ Empty Application Console Application Web Application Web Application Basic [without Membership and Authorization] Web API Application Nancy ASP.NET Application Class Library Unit test project
-
Application Name 입력
? What's the name of your ASP.NET application? (EmptyApplication) create dnxFirstApp/.gitignore create dnxFirstApp/hosting.ini create dnxFirstApp/Startup.cs create dnxFirstApp/project.json create dnxFirstApp/Dockerfile create dnxFirstApp/wwwroot/README.md Your project is now created, you can use the following commands to get going cd "EmptyApplication" dnu restore dnu build (optional, build will also happen when it's run) dnx kestrel
실행
터미널로 EmptyApplication 디렉토리로 이동 dnu restore
를 실행 한다.
$ dnu restore Microsoft .NET Development Utility Mono-x64-1.0.0-beta7-15532 GET https://api.nuget.org/v3/index.json OK https://api.nuget.org/v3/index.json 1119ms Restoring packages for /Users/onlydel/AspNet/src/EmptyApplication/project.json GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnet.server.iis/index.json GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnet.server.weblistener/index.json GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnet.server.kestrel/index.json OK https://api.nuget.org/v3-flatcontainer/microsoft.aspnet.server.iis/index.json 1119ms GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnet.server.iis/1.0.0-beta7/microsoft.aspnet.server.iis.1.0.0-beta7.nupkg ... Installing System.Reflection.Emit.4.0.0 Installing System.Reflection.Emit.ILGeneration.4.0.0 Installing System.Reflection.TypeExtensions.4.0.0 Installing System.Diagnostics.Tracing.4.0.21-beta-23225 Installing System.Threading.Thread.4.0.0-beta-23225 Installing System.Diagnostics.TraceSource.4.0.0-beta-23225 Installing System.Reflection.Extensions.4.0.1-beta-23225 Installing Microsoft.Win32.Registry.4.0.0-beta-23225 Installing System.Diagnostics.Process.4.0.0-beta-23225 Installing System.Security.SecureString.4.0.0-beta-23225 Installing System.Security.Claims.4.0.0 Installing System.Net.NetworkInformation.4.0.10-beta-23123 Installing System.Private.Networking.4.0.0 Writing lock file /Users/onlydel/AspNet/src/EmptyApplication/project.lock.json Restore complete, 201807ms elapsed NuGet Config files used: /Users/onlydel/.config/NuGet/NuGet.Config Feeds used: https://api.nuget.org/v3-flatcontainer/ Installed: 128 package(s) to /Users/onlydel/.dnx/packages
혹시 다음과 같은 에러가 나면 mono설치를 다시 해 준다.
/Users/onlydel/.dnx/runtimes/dnx-mono.1.0.0-beta7/bin/dnx: line 14: exec: mono: not found
-
brew로 mono 설치
$ brew install mono ==> Downloading https://homebrew.bintray.com/bottles/mono-4.2.0.179.el_capitan.bottle.tar.gz ######################################################################## 100.0% ==> Pouring mono-4.2.0.179.el_capitan.bottle.tar.gz ==> Caveats To use the assemblies from other formulae you need to set: export MONO_GAC_PREFIX="/usr/local" ==> Summary 🍺 /usr/local/Cellar/mono/4.2.0.179: 1010 files, 184M
dnx kestrel
을 실행 하면 웹 애플리케이션이 시작된다.
$ dnx kestrel Application started. Press Ctrl+C to shut down.
브라우저에서 localhost:5000
으로 접속하면 Hello World!!
를 볼수 있다.
참조
ASP.NET
- OS X(10.11)에 ASP.NET Application
- OS X(10.10)에 ASP.NET 5 설치하기
- MVC Web Application에서 재사용 가능한 Authentication라이브러리 만들기
- 맥에서 ASP.NET vNext 애플리케이션 개발하기
- ASP.NET 5소개
- ASP.NET 5와 MVC 6에서 바뀌게 되는 기능 Top 10
- ASP.NET 5 스케폴딩(Scaffolding)
- MVC Controller와 ApiController의 차이점
- ASP.NET Accounts Management
- MVC를 이용해 RealGrid에 데이터를 표현하기
EF
Visual Studio
- Visual Studio Code v0.3.0
- 무서운 EF
- 해결 방법을 찾을 수 없습니다.
- GitHub Extension for Visual Studio
- Visual Studio Code for Mac
- 패러렐즈 Visual Studio Text Editor 스크롤을 부드럽게 하는 방법
Another Code
- BitBucket!! 너는 또 뭐야?
- Git! 너 뭐야?
- 슬랙앱 만들기
- 품질의 기본
- 대화의 수준
- javascript tutorial
- html tutorial
- OS X에서 Paralles Windows 10 VM의 localhost 사이트에 접속하는 방법
- OS X(10.11)에서 MongoDB
- OS X(10.11)에서 SVN(Subversion)
- OS X(10.11)에서 아파치웹서버 구동하기 (Virtual Hosting 구현)
- OS X(10.11)에서 메이븐(Maven)사용하기
- Jasmine을 이용한 Javascript 테스트
- Identicon
- 회사의 슬픔
- 지킬에서 사이드 메뉴 필터링 하기
- ASP.NET MVC vs WEB API
- 티스토리에서 구문 하이라이팅 기능 구현하기
Javascript
- react를 위한 webpack정리 (II) - 작성중
- react를 위한 webpack정리 (I)
- javascript에서 객체 정의
- Javascripting
- aws-ec2-amazon linux-nodejs
- Protractor
- AngulaJS 연습
티스토리(1) tistory(1) syntax highlighting(1) Visual Studio(3) ASP.NET(4) EF(3) RealGrid(2) Jekyll(2) GitHub(3) SqlServer(1) SqlServer 2014(1) MVC(2) ASP.NET 5(7) Identity(2) Account(1) Controller(1) ApiController(1) 스케폴딩(2) Schaffolding(2) MVC 6(1) 페러렐즈(2) Parallels(1) Liquid(1) Authentication(1) Entity Framework(2) Visual Studio Code(2) VS(2) VisualStudio(2) Visual Studio 2015(2) VS 2015(2) Extension(1) 잡설(3) Update-Database(1) Entension(1) 일을하지말아야지(1) osx(2) DNX(2) Iendticon(1) Jasmine(1) AngularJS(2) protractor(1) maven(1) java(1) OSX(5) yosemite(2) 메이븐(1) 요세미티(1) 서브라임(1) 아파치(2) apache(1) webserver(1) 웹서버(1) virtualhost(1) svn(1) subversion(1) 몽고디비(1) mongodb(2) localhost(1) 호스팅(1) hosting(1) VSCode(1) html(1) JavaScript(1) nodejs(2) aws(2) ec2(2) git(4) javascript(5) object(1) webpack(2) reactjs(2) react(2) browserify(2) 웹팩(3) 리액트(3) slack(1) api(1) slack app(1) 슬랙 앱(1) 깃(2) 깃허브(1) github(1) 비트버킷(1) BitBucket(1)