Aspnetcore: How to build the source files

Created on 28 Feb 2018  路  11Comments  路  Source: dotnet/aspnetcore

I want to build the source files for each project below.
Both ASP.NET Core and Microsoft.AspNetCore.Mvc fails when executing build.ps1, which is part of the root folder.

And why does it try to download another zip file?

Downloading KoreBuild from https://github.com/aspnet/KoreBuild/archive/rel/2.0.0.zip
Failed to download 'https://github.com/aspnet/KoreBuild/archive/rel/2.0.0.zip': The request was aborted: Could not create SSL/TLS secure channel.
Waiting 10 seconds before retrying. Retries left: 5

Most helpful comment

@pranavkm you can fix the TLS version thing with a client side change, but I'm of the opinion that our build.ps1 script should work out of the box for anyone that clones our repos with minimal setup. The solution to this as far as I can tell would be to update the bootstrap scripts in all of our repos.

All 11 comments

Which branch are you trying to build? The release/2.0 branch should be the most stable.

@natemcmaster \ @ryanbrandenburg - we ran in to this with one of our other builds too. Ended up fixing it by forcing Powershell to use TLS2.0. Is this something we need to fix across our repos or is this a client configuration thing?

@Legends in the meanwhile, try setting this in a powershell console before running build.ps1:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12. Credit to this SO answer: https://stackoverflow.com/a/41618979

I tried this one MVC v1.1.5.zip.

@pranavkm it seems to work with TLS 2, seems to take a bit long to download.
Whatever it downloads...

It ends with an error, I will take a look :

....

info: Run target: initialize
info: Run target: build-compile
info:
info: Exec
info: program: dotnet
info: commandline: build test//project.json --configuration Debug
info: workingdir: C:\Users\MyUser\Downloads\Mvc-1.1.5\Mvc-1.1.5
Sake.exe : Globbing pattern 'test/
/project.json' did not match any files
At C:\Users\MyUser\Downloads\Mvc-1.1.5\Mvc-1.1.5.build\KoreBuild.ps1:114 char:1

  • &"$koreBuildFolder\Sake\0.2.2\tools\Sake.exe" -I $koreBuildFolder\sha ...
  • ~~~~~~~~~~~~~~~~~

    • CategoryInfo : NotSpecified: (Globbing patter...match any files:String) [], RemoteException

    • FullyQualifiedErrorId : NativeCommandError

Tried to dotnet restore mvc.sln, but it I get a bunch of errors:

Mvc-1.1.5\src\Microsoft.AspNetCore.Mvc.ApiExplorer\Microsoft.AspNetCore.Mvc.ApiExplorer.csproj : error NU1603: Microsoft.AspNetCore.Mvc.Core depends on Microsoft.Extensions.DependencyModel (>= 1.1.4-servicing-001653) but Microsoft.Extensions.DependencyModel 1.1.4-servicing-001653 was not found. An approximate best match of Microsoft.Extensions.DependencyModel 2.0.0-preview1-002111 was resolved. [C:\Users\xxx\Downloads\Mvc-1.1.5\Mvc-1.1.5\mvc.sln]

@Tratcher, @pranavkm release v2.0.2 builds fine! Thanks to both of you!

@pranavkm you can fix the TLS version thing with a client side change, but I'm of the opinion that our build.ps1 script should work out of the box for anyone that clones our repos with minimal setup. The solution to this as far as I can tell would be to update the bootstrap scripts in all of our repos.

fyi: The build has finished now, I still get an error at the end, but the files are built.

__exec : dotnet.exe failed with exit code: 1
At C:\Users\xxx.dotnet\buildtools\korebuild\2.0.2-rc1-15526\scripts\KoreBuild.psm1:104 char:9

  • __exec $global:dotnet msbuild `@"$msBuildResponseFile"
  • ~~~~~~~~~~~~~~

    • CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException

    • FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,__exec

Sounds like a good idea. Could you file a bug so that engineering team could triage it?

I filed aspnet/BuildTools#593.

Was this page helpful?
0 / 5 - 0 ratings