.net - ASP.NET v5 on a Build Server -


i'm trying build vs2015 asp.net v5 web app on our build server (basically, outside of visual studio). our existing scripts invoke msbuild csproj file, project get:

project file empty

what "story" "building" these new webapps outside visual studio? believe can still target .net 4.5 (i hope so, we're not upgrading web servers time soon) assumed possible.

well there no .csproj in dnx project needed dnu build project contained in project.json. there xproj file can ignore that. microsoft has decided see light , uses xproj vs specific "stuff" , ide agnostic project details put in project.json.

so build dnx project need right version of dnx , project source code. afaik there no out of box solutions done command line commands script should easy. depends on how robust of solution want build.

to build dnx project command line (assuming have proper dnx installed , set active) 2 commands. dnu restore runs dependency check , dnu (a part of dnx) has built in nuget client reach out , grab dependencies if needed. dnu build runs actual compilation.

so cd project root (which contains project.json) , run dnu restore dnu build.

it gets more complex if need dynamically support different dnx versions. keep in mind dnx versions identified runtime (coreclr or clr), architecture (x86, x64, etc), , version number. if targetting x64 builds on clr (full .net runtime) eliminates 2 variables happens if project requires newer version of runtime installed on build server? example installed (manually using dnvm) dnx-clr-win-x64.1.0.0-beta4 on build server @ point in future developer requires dnx-clr-win-x64.1.0.0-beta6-1200 resolve bug.

the simplistic solution install new runtime versions needed , build projects against newest 1 needed. isn't bad might first sound. once dnx gets out of beta changes runtime should infrequent. remember runtime low level code , unmanaged dlls. bootstrapping stub bcl sits on top of. there should not many changes dnx given os, architecture , runtime.

for more robust solution use scripting find runtime version required project. found in solution level global.json. script use dnvm list determine if has runtime installed. if doesn't use dnvm install or dnvm upgrade install required version. before starting build use command dnvm use make correct runtime active , proceed dnu restore , dnu build.

honestly expect pretty robust solutions come along. task runners (gulp, grunt, etc) first class citizens in .net 5. workflow involve bower client side dependency resolution, npm, grunt/gulp , task packages things minifying js files. build server going need having build task grunt or gulp package seems pretty fit.


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -