SlideShare uma empresa Scribd logo
1 de 5
In part 1, we set upTFS.
In part 2, we configuredourLinux buildagent.
Nowinpart 3, we'll be settingupDNX(the .NETExecutionEnvironment) forLinux.SinceDNX/ASP.NET
5 isstill indevelopment,we'll be goingagainstthe latestdevbranchfor extrafun.Youcan findmore
detailsonthe ASPNETGitHubpage.
Firstup, we needtoinstall Mono,the open-source CLRandBCL implementation.
Run the followingcommandstogetthat processstarted.
sudoapt-keyadv --keyserverkeyserver.ubuntu.com --recv-keys
3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo"debhttp://download.mono-project.com/repo/debian wheezy main"|sudotee
/etc/apt/sources.list.d/mono-xamarin.list
sudoapt-getupdate
sudoapt-getinstall mono-complete
As always,answeranypromptsthatcome up with"yes",andwaitpatiently.InstallingMonotakesa
while!
Whenit's done,run mono--version
If everythingisokay,you'll see this:
Mono JIT compilerversion4.0.3(Stable 4.0.3.20/d6946b4 Tue Aug4 09:43:57 UTC 2015)
Copyright(C) 2002-2014 Novell, Inc, XamarinIncand Contributors. www.mono-project.com
TLS: __thread
SIGSEGV:altstack
Notifications:epoll
Architecture:amd64
Disabled:none
Misc: softdebug
LLVM: supported, notenabled.
GC: sgen
Nowwe can install DNVM/DNX.
sudoapt-getinstall unzip
curl -sSLhttps://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.sh |DNX_BRANCH=dev sh
&& source ~/.dnx/dnvm/dnvm.sh
Run those commands,answer"yes"toanyprompts,and whenthey're complete,runthe
dnvmcommandto testthat everythingisinstalled:
___ _ ___ ____ ___
/ _ /|/ / | / / |/ /
/ // / /||/ / /|_/ /
/____/_/|_/ |___/_/ /_/.NET VersionManager- Version1.0.0-beta7-10410
By MicrosoftOpenTechnologies,Inc.
DNVMcan be usedto downloadversionsof the .NETExecutionEnvironmentandmanage whichversion
youare using.
You can control the URL of the stable andunstable channel bysettingthe DNX_FEED and
DNX_UNSTABLE_FEED variables.
Currentfeedsettings:
DefaultStable:https://www.nuget.org/api/v2
DefaultUnstable:https://www.myget.org/F/aspnetvnext/api/v2
CurrentStable Override:
CurrentUnstable Override:
Use dnvm[help|-h|-help|--help]todisplayhelptext.
Then,we needtomake sure we have the mostrecentDNX,so run dnvmupgrade -u
You'll see textalongthese lines:
Determininglatestversion
Latestversion is1.0.0-beta7-12340
Downloadingdnx-mono.1.0.0-beta7-12340 fromhttps://www.myget.org/F/aspnetvnext/api/v2
Download:https://www.myget.org/F/aspnetvnext/api/v2/package/dnx-mono/1.0.0-beta7-12340
######################################################################## 100.0%
Installingto/home/ictfs-admin/.dnx/runtimes/dnx-mono.1.0.0-beta7-12340
Adding/home/ictfs-admin/.dnx/runtimes/dnx-mono.1.0.0-beta7-12340/bintoprocess PATH
Settingalias'default'to'dnx-mono.1.0.0-beta7-12340'
Make a note of that path -- you'll needitlater.
We alsoneedtoadd a package source to ourNuGet.Config,somodify~/.config/NuGet/NuGet.Config:
sudonano ~/.config/NuGet/NuGet.Config
Copyand paste thisconfigintothat file andsave it.It's okayif the file isemptyrightnow!
Now,a fewmore prerequisites.We have toinstall Libuvinordertotestthat DNX isworkingproperly,so
run these commands:
sudoapt-getinstall automake libtool curl
Answer"yes"toany prompts.
Thenrun:
curl -sSLhttps://github.com/libuv/libuv/archive/v1.4.2.tar.gz |sudotar zxfv - -C/usr/local/src
cd /usr/local/src/libuv-1.4.2
sudosh autogen.sh
sudo./configure
sudomake
sudomake install
sudorm -rf /usr/local/src/libuv-1.4.2&&cd ~/
sudoldconfig
Finally,we needGitsothatwe can clone the ASPNETrepowiththe sample projectsinit.
sudoapt-getinstall git
Answer"yes"toany prompts.
Nowwe can clone the repowiththe sample code init:
cd ~
git clone https://github.com/aspnet/Home.git
Navigate intothe clonedrepo:
cd Home/samples/latest/HelloWeb
Run the DNU utilitytorestore the missingNuGetpackages.There are some performance issueswith
this,so firstrun
exportMONO_THREADS_PER_CPU=2000
then
dnurestore
If you getan error at thisstep,run
sudoservice unscdstop
, thenrerun
dnurestore
You may alsogetsome errors aboutmissingpackages.Thisisadevelopmentrepo,sostuff isina state
of flux.WhenIwaswritingthisblog,Ihad to openupproject.jsonandaddtwo dependencies:
"Microsoft.CodeAnalysis.CSharp":"1.0.0-*",
"System.Reflection.Metadata":"1.0.0-*"
and rerunthe package restore.
Once the restore isdone successfully,we cantestthat everythingisinstalledandworkingproperlyby
running
dnx kestrel
You shouldsee
Application started. PressCtrl+Ctoshutdown.
You should be able toopenup a browserandnavigate to http://yourbuildserver:5004/and see the ASP
.NET welcome page.
Okay,you're done!Your environmentiscorrectlyconfiguredtobuildASP.NET5 applicationsusingDNX!
In our lastblogpost,we'll create a newTFSbuilddefinitionthatwillbuildandpackage upthis
applicationfordeployment!
- See more at: http://www.incyclesoftware.com/2015/08/building-asp-net-5-applications-on-linux-with-
tfs-2015-part-3-installing-dnx/#sthash.6DTnLGaa.dpuf Inpart1, we setup TFS.
In part 2, we configuredourLinux buildagent.
Nowinpart 3, we'll be settingupDNX(the .NETExecutionEnvironment) forLinux.SinceDNX/ASP.NET
5 isstill indevelopment,we'll be goingagainstthe latestdevbranchforextrafun.Youcan findmore
detailsonthe ASPNETGitHubpage.
Firstup, we needtoinstall Mono,the open-source CLRandBCL implementation.
Run the followingcommandstogetthat processstarted.
sudoapt-keyadv --keyserverkeyserver.ubuntu.com --recv-keys
3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo"debhttp://download.mono-project.com/repo/debian wheezy main"|sudotee
/etc/apt/sources.list.d/mono-xamarin.list
sudoapt-getupdate
sudoapt-getinstall mono-complete
As always,answeranypromptsthatcome up with"yes",andwaitpatiently.InstallingMonotakesa
while!
Whenit's done,run mono--version
If everythingisokay,you'll see this:
Mono JIT compilerversion4.0.3(Stable 4.0.3.20/d6946b4 Tue Aug4 09:43:57 UTC 2015)
Copyright(C) 2002-2014 Novell, Inc, XamarinIncand Contributors. www.mono-project.com
TLS: __thread
SIGSEGV:altstack
Notifications:epoll
Architecture:amd64
Disabled:none
Misc: softdebug
LLVM: supported, notenabled.
GC: sgen
Nowwe can install DNVM/DNX.
sudoapt-getinstall unzip
curl -sSLhttps://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.sh |DNX_BRANCH=dev sh
&& source ~/.dnx/dnvm/dnvm.sh
Run those commands,answer"yes"toanyprompts,and whenthey're complete,runthe
dnvmcommandto testthat everythingisinstalled:
___ _ ___ ____ ___
/ _ /|/ / | / / |/ /
/ // / /||/ / /|_/ /
/____/_/|_/ |___/_/ /_/.NET VersionManager- Version1.0.0-beta7-10410
By MicrosoftOpenTechnologies,Inc.
DNVMcan be usedto downloadversionsof the .NETExecutionEnvironmentandmanage whichversion
youare using.
You can control the URL of the stable andunstable channel bysettingthe DNX_FEED and
DNX_UNSTABLE_FEED variables.
Currentfeedsettings:
DefaultStable:https://www.nuget.org/api/v2
DefaultUnstable:https://www.myget.org/F/aspnetvnext/api/v2
CurrentStable Override:
CurrentUnstable Override:
Use dnvm[help|-h|-help|--help]todisplayhelptext.
Then,we needtomake sure we have the mostrecentDNX,so run dnvmupgrade -u
You'll see textalongthese lines:
Determininglatestversion
Latestversion is1.0.0-beta7-12340
Downloadingdnx-mono.1.0.0-beta7-12340 fromhttps://www.myget.org/F/aspnetvnext/api/v2
Download:https://www.myget.org/F/aspnetvnext/api/v2/package/dnx-mono/1.0.0-beta7-12340
######################################################################## 100.0%
Installingto/home/ictfs-admin/.dnx/runtimes/dnx-mono.1.0.0-beta7-12340
Adding/home/ictfs-admin/.dnx/runtimes/dnx-mono.1.0.0-beta7-12340/bintoprocess PATH
Settingalias'default'to'dnx-mono.1.0.0-beta7-12340'
Make a note of that path -- you'll needitlater.
We alsoneedtoadd a package source to ourNuGet.Config,somodify~/.config/NuGet/NuGet.Config:
sudonano ~/.config/NuGet/NuGet.Config
Copyand paste thisconfigintothat file andsave it.It's okayif the file isemptyrightnow!
Now,a fewmore prerequisites.We have toinstall Libuvinordertotestthat DNX isworkingproperly,so
run these commands:
sudoapt-getinstall automake libtool curl
Answer"yes"toany prompts.
Thenrun:
curl -sSLhttps://github.com/libuv/libuv/archive/v1.4.2.tar.gz |sudotar zxfv - -C/usr/local/src
cd /usr/local/src/libuv-1.4.2
sudosh autogen.sh
sudo./configure
sudomake
sudomake install
sudorm -rf /usr/local/src/libuv-1.4.2&&cd ~/
sudoldconfig
Finally,we needGitsothatwe can clone the ASPNETrepowiththe sample projectsinit.
sudoapt-getinstall git
Answer"yes"toany prompts.
Nowwe can clone the repowiththe sample code init:
cd ~
git clone https://github.com/aspnet/Home.git
Navigate intothe clonedrepo:
cd Home/samples/latest/HelloWeb
Run the DNU utilitytorestore the missingNuGetpackages.There are some performance issueswith
this,so firstrun
exportMONO_THREADS_PER_CPU=2000
then
dnurestore
If you getan error at thisstep,run
sudoservice unscdstop
, thenrerun
dnurestore
You may alsogetsome errors aboutmissingpackages.Thisisadevelopmentrepo,sostuff isina state
of flux.WhenIwaswritingthisblog,Ihad to openupproject.jsonandaddtwo dependencies:
"Microsoft.CodeAnalysis.CSharp":"1.0.0-*",
"System.Reflection.Metadata":"1.0.0-*"
and rerunthe package restore.
Once the restore isdone successfully,we cantestthat everythingisinstalledandworkingproperlyby
running
dnx kestrel
You shouldsee
Application started. PressCtrl+Ctoshutdown.
You shouldbe able toopenup a browserandnavigate to http://yourbuildserver:5004/and see the ASP
.NET welcome page.
Okay,you're done!Your environmentis correctlyconfiguredtobuildASP.NET5 applicationsusingDNX!
In our lastblogpost,we'll create a newTFSbuilddefinitionthatwillbuildandpackage upthis
applicationfordeployment!

Mais conteúdo relacionado

Destaque (8)

Resume-Shrinivas Dasgude
Resume-Shrinivas DasgudeResume-Shrinivas Dasgude
Resume-Shrinivas Dasgude
 
Aman Mani
Aman ManiAman Mani
Aman Mani
 
sahana_CV
sahana_CVsahana_CV
sahana_CV
 
Rob Venable - Developer
Rob Venable - DeveloperRob Venable - Developer
Rob Venable - Developer
 
CV_Venkatesanupdated
CV_VenkatesanupdatedCV_Venkatesanupdated
CV_Venkatesanupdated
 
nagababu-sys-admin-main
nagababu-sys-admin-mainnagababu-sys-admin-main
nagababu-sys-admin-main
 
Bhaskar_Profile_Latest
Bhaskar_Profile_LatestBhaskar_Profile_Latest
Bhaskar_Profile_Latest
 
BradleyJLong-Resume2015
BradleyJLong-Resume2015BradleyJLong-Resume2015
BradleyJLong-Resume2015
 

Mais de InCycleSoftware

Mais de InCycleSoftware (14)

Azure DevOps Presentation
Azure DevOps PresentationAzure DevOps Presentation
Azure DevOps Presentation
 
TFS 2015 Upgrade Tips & Tricks
TFS 2015 Upgrade Tips & TricksTFS 2015 Upgrade Tips & Tricks
TFS 2015 Upgrade Tips & Tricks
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Azure Labs QA Testing Webcast
Azure Labs QA Testing WebcastAzure Labs QA Testing Webcast
Azure Labs QA Testing Webcast
 
Tfs 2015 Upgrade Tips and Tricks
Tfs 2015 Upgrade Tips and TricksTfs 2015 Upgrade Tips and Tricks
Tfs 2015 Upgrade Tips and Tricks
 
Release Management in TFS 2015
Release Management in TFS 2015Release Management in TFS 2015
Release Management in TFS 2015
 
Webcast: TFS 2015 & Why Upgrade
Webcast: TFS 2015 & Why UpgradeWebcast: TFS 2015 & Why Upgrade
Webcast: TFS 2015 & Why Upgrade
 
Cloud-based Performance & Web Load Testing
Cloud-based Performance & Web Load TestingCloud-based Performance & Web Load Testing
Cloud-based Performance & Web Load Testing
 
InCycle's DevOps with Azure
InCycle's DevOps with AzureInCycle's DevOps with Azure
InCycle's DevOps with Azure
 
Microsoft Development Tools & Platforms for 2015
Microsoft Development Tools & Platforms for 2015Microsoft Development Tools & Platforms for 2015
Microsoft Development Tools & Platforms for 2015
 
Hybrid IT With Azure's Cloud Services
Hybrid IT With Azure's Cloud ServicesHybrid IT With Azure's Cloud Services
Hybrid IT With Azure's Cloud Services
 
Increase Delivery Speed Using Azure
Increase Delivery Speed Using AzureIncrease Delivery Speed Using Azure
Increase Delivery Speed Using Azure
 
Moving Your Business to Azure
Moving Your Business to AzureMoving Your Business to Azure
Moving Your Business to Azure
 
Understanding Azure Networking Services
Understanding Azure Networking ServicesUnderstanding Azure Networking Services
Understanding Azure Networking Services
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 

Building ASP .NET 5 Applications on Linux with TFS 2015, Part 3: Installing DNX

  • 1. In part 1, we set upTFS. In part 2, we configuredourLinux buildagent. Nowinpart 3, we'll be settingupDNX(the .NETExecutionEnvironment) forLinux.SinceDNX/ASP.NET 5 isstill indevelopment,we'll be goingagainstthe latestdevbranchfor extrafun.Youcan findmore detailsonthe ASPNETGitHubpage. Firstup, we needtoinstall Mono,the open-source CLRandBCL implementation. Run the followingcommandstogetthat processstarted. sudoapt-keyadv --keyserverkeyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF echo"debhttp://download.mono-project.com/repo/debian wheezy main"|sudotee /etc/apt/sources.list.d/mono-xamarin.list sudoapt-getupdate sudoapt-getinstall mono-complete As always,answeranypromptsthatcome up with"yes",andwaitpatiently.InstallingMonotakesa while! Whenit's done,run mono--version If everythingisokay,you'll see this: Mono JIT compilerversion4.0.3(Stable 4.0.3.20/d6946b4 Tue Aug4 09:43:57 UTC 2015) Copyright(C) 2002-2014 Novell, Inc, XamarinIncand Contributors. www.mono-project.com TLS: __thread SIGSEGV:altstack Notifications:epoll Architecture:amd64 Disabled:none Misc: softdebug LLVM: supported, notenabled. GC: sgen Nowwe can install DNVM/DNX. sudoapt-getinstall unzip curl -sSLhttps://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.sh |DNX_BRANCH=dev sh && source ~/.dnx/dnvm/dnvm.sh Run those commands,answer"yes"toanyprompts,and whenthey're complete,runthe dnvmcommandto testthat everythingisinstalled: ___ _ ___ ____ ___ / _ /|/ / | / / |/ / / // / /||/ / /|_/ / /____/_/|_/ |___/_/ /_/.NET VersionManager- Version1.0.0-beta7-10410 By MicrosoftOpenTechnologies,Inc. DNVMcan be usedto downloadversionsof the .NETExecutionEnvironmentandmanage whichversion youare using. You can control the URL of the stable andunstable channel bysettingthe DNX_FEED and DNX_UNSTABLE_FEED variables. Currentfeedsettings: DefaultStable:https://www.nuget.org/api/v2 DefaultUnstable:https://www.myget.org/F/aspnetvnext/api/v2 CurrentStable Override: CurrentUnstable Override:
  • 2. Use dnvm[help|-h|-help|--help]todisplayhelptext. Then,we needtomake sure we have the mostrecentDNX,so run dnvmupgrade -u You'll see textalongthese lines: Determininglatestversion Latestversion is1.0.0-beta7-12340 Downloadingdnx-mono.1.0.0-beta7-12340 fromhttps://www.myget.org/F/aspnetvnext/api/v2 Download:https://www.myget.org/F/aspnetvnext/api/v2/package/dnx-mono/1.0.0-beta7-12340 ######################################################################## 100.0% Installingto/home/ictfs-admin/.dnx/runtimes/dnx-mono.1.0.0-beta7-12340 Adding/home/ictfs-admin/.dnx/runtimes/dnx-mono.1.0.0-beta7-12340/bintoprocess PATH Settingalias'default'to'dnx-mono.1.0.0-beta7-12340' Make a note of that path -- you'll needitlater. We alsoneedtoadd a package source to ourNuGet.Config,somodify~/.config/NuGet/NuGet.Config: sudonano ~/.config/NuGet/NuGet.Config Copyand paste thisconfigintothat file andsave it.It's okayif the file isemptyrightnow! Now,a fewmore prerequisites.We have toinstall Libuvinordertotestthat DNX isworkingproperly,so run these commands: sudoapt-getinstall automake libtool curl Answer"yes"toany prompts. Thenrun: curl -sSLhttps://github.com/libuv/libuv/archive/v1.4.2.tar.gz |sudotar zxfv - -C/usr/local/src cd /usr/local/src/libuv-1.4.2 sudosh autogen.sh sudo./configure sudomake sudomake install sudorm -rf /usr/local/src/libuv-1.4.2&&cd ~/ sudoldconfig Finally,we needGitsothatwe can clone the ASPNETrepowiththe sample projectsinit. sudoapt-getinstall git Answer"yes"toany prompts. Nowwe can clone the repowiththe sample code init: cd ~ git clone https://github.com/aspnet/Home.git Navigate intothe clonedrepo: cd Home/samples/latest/HelloWeb Run the DNU utilitytorestore the missingNuGetpackages.There are some performance issueswith this,so firstrun exportMONO_THREADS_PER_CPU=2000 then dnurestore If you getan error at thisstep,run sudoservice unscdstop , thenrerun dnurestore You may alsogetsome errors aboutmissingpackages.Thisisadevelopmentrepo,sostuff isina state of flux.WhenIwaswritingthisblog,Ihad to openupproject.jsonandaddtwo dependencies:
  • 3. "Microsoft.CodeAnalysis.CSharp":"1.0.0-*", "System.Reflection.Metadata":"1.0.0-*" and rerunthe package restore. Once the restore isdone successfully,we cantestthat everythingisinstalledandworkingproperlyby running dnx kestrel You shouldsee Application started. PressCtrl+Ctoshutdown. You should be able toopenup a browserandnavigate to http://yourbuildserver:5004/and see the ASP .NET welcome page. Okay,you're done!Your environmentiscorrectlyconfiguredtobuildASP.NET5 applicationsusingDNX! In our lastblogpost,we'll create a newTFSbuilddefinitionthatwillbuildandpackage upthis applicationfordeployment! - See more at: http://www.incyclesoftware.com/2015/08/building-asp-net-5-applications-on-linux-with- tfs-2015-part-3-installing-dnx/#sthash.6DTnLGaa.dpuf Inpart1, we setup TFS. In part 2, we configuredourLinux buildagent. Nowinpart 3, we'll be settingupDNX(the .NETExecutionEnvironment) forLinux.SinceDNX/ASP.NET 5 isstill indevelopment,we'll be goingagainstthe latestdevbranchforextrafun.Youcan findmore detailsonthe ASPNETGitHubpage. Firstup, we needtoinstall Mono,the open-source CLRandBCL implementation. Run the followingcommandstogetthat processstarted. sudoapt-keyadv --keyserverkeyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF echo"debhttp://download.mono-project.com/repo/debian wheezy main"|sudotee /etc/apt/sources.list.d/mono-xamarin.list sudoapt-getupdate sudoapt-getinstall mono-complete As always,answeranypromptsthatcome up with"yes",andwaitpatiently.InstallingMonotakesa while! Whenit's done,run mono--version If everythingisokay,you'll see this: Mono JIT compilerversion4.0.3(Stable 4.0.3.20/d6946b4 Tue Aug4 09:43:57 UTC 2015) Copyright(C) 2002-2014 Novell, Inc, XamarinIncand Contributors. www.mono-project.com TLS: __thread SIGSEGV:altstack Notifications:epoll Architecture:amd64 Disabled:none Misc: softdebug LLVM: supported, notenabled. GC: sgen Nowwe can install DNVM/DNX. sudoapt-getinstall unzip curl -sSLhttps://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.sh |DNX_BRANCH=dev sh && source ~/.dnx/dnvm/dnvm.sh Run those commands,answer"yes"toanyprompts,and whenthey're complete,runthe dnvmcommandto testthat everythingisinstalled:
  • 4. ___ _ ___ ____ ___ / _ /|/ / | / / |/ / / // / /||/ / /|_/ / /____/_/|_/ |___/_/ /_/.NET VersionManager- Version1.0.0-beta7-10410 By MicrosoftOpenTechnologies,Inc. DNVMcan be usedto downloadversionsof the .NETExecutionEnvironmentandmanage whichversion youare using. You can control the URL of the stable andunstable channel bysettingthe DNX_FEED and DNX_UNSTABLE_FEED variables. Currentfeedsettings: DefaultStable:https://www.nuget.org/api/v2 DefaultUnstable:https://www.myget.org/F/aspnetvnext/api/v2 CurrentStable Override: CurrentUnstable Override: Use dnvm[help|-h|-help|--help]todisplayhelptext. Then,we needtomake sure we have the mostrecentDNX,so run dnvmupgrade -u You'll see textalongthese lines: Determininglatestversion Latestversion is1.0.0-beta7-12340 Downloadingdnx-mono.1.0.0-beta7-12340 fromhttps://www.myget.org/F/aspnetvnext/api/v2 Download:https://www.myget.org/F/aspnetvnext/api/v2/package/dnx-mono/1.0.0-beta7-12340 ######################################################################## 100.0% Installingto/home/ictfs-admin/.dnx/runtimes/dnx-mono.1.0.0-beta7-12340 Adding/home/ictfs-admin/.dnx/runtimes/dnx-mono.1.0.0-beta7-12340/bintoprocess PATH Settingalias'default'to'dnx-mono.1.0.0-beta7-12340' Make a note of that path -- you'll needitlater. We alsoneedtoadd a package source to ourNuGet.Config,somodify~/.config/NuGet/NuGet.Config: sudonano ~/.config/NuGet/NuGet.Config Copyand paste thisconfigintothat file andsave it.It's okayif the file isemptyrightnow! Now,a fewmore prerequisites.We have toinstall Libuvinordertotestthat DNX isworkingproperly,so run these commands: sudoapt-getinstall automake libtool curl Answer"yes"toany prompts. Thenrun: curl -sSLhttps://github.com/libuv/libuv/archive/v1.4.2.tar.gz |sudotar zxfv - -C/usr/local/src cd /usr/local/src/libuv-1.4.2 sudosh autogen.sh sudo./configure sudomake sudomake install sudorm -rf /usr/local/src/libuv-1.4.2&&cd ~/ sudoldconfig Finally,we needGitsothatwe can clone the ASPNETrepowiththe sample projectsinit. sudoapt-getinstall git Answer"yes"toany prompts. Nowwe can clone the repowiththe sample code init: cd ~
  • 5. git clone https://github.com/aspnet/Home.git Navigate intothe clonedrepo: cd Home/samples/latest/HelloWeb Run the DNU utilitytorestore the missingNuGetpackages.There are some performance issueswith this,so firstrun exportMONO_THREADS_PER_CPU=2000 then dnurestore If you getan error at thisstep,run sudoservice unscdstop , thenrerun dnurestore You may alsogetsome errors aboutmissingpackages.Thisisadevelopmentrepo,sostuff isina state of flux.WhenIwaswritingthisblog,Ihad to openupproject.jsonandaddtwo dependencies: "Microsoft.CodeAnalysis.CSharp":"1.0.0-*", "System.Reflection.Metadata":"1.0.0-*" and rerunthe package restore. Once the restore isdone successfully,we cantestthat everythingisinstalledandworkingproperlyby running dnx kestrel You shouldsee Application started. PressCtrl+Ctoshutdown. You shouldbe able toopenup a browserandnavigate to http://yourbuildserver:5004/and see the ASP .NET welcome page. Okay,you're done!Your environmentis correctlyconfiguredtobuildASP.NET5 applicationsusingDNX! In our lastblogpost,we'll create a newTFSbuilddefinitionthatwillbuildandpackage upthis applicationfordeployment!