How to install latest .NET Core SDK
Hi, I am trying to install the latest .NET Core SDK (RC4) and I am struggling to work out how to do this in my appveyor.yml.
The latest RC4 build seems to be not available, hence why I am trying to download and install it from here: https://github.com/dotnet/core/blob/master/release-notes/rc4-download.md
This is the appveyor.yml that I am using at the moment: https://github.com/dustinmoris/AspNetCore.Lambda/blob/feature/migrate_to_rc4/appveyor.yml#L7
This is my failing build: https://ci.appveyor.com/project/dustinmoris/aspnetcore-lambda/build/0.1.0-alpha003-60
Can someone maybe help me with the right powershell commands to do this?
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Dustin Moris Go... on 19 Feb, 2017 09:52 AM
It seems that the download doesn't really happen, because it runs in less than a second which is impossible.
Support Staff 2 Posted by Feodor Fitsner on 19 Feb, 2017 07:21 PM
I've noticed you managed to fix that already?
3 Posted by Dustin Moris Go... on 20 Feb, 2017 10:28 AM
Yes I found an example which worked, but I still don't understand why this didn't download the SDK before:
https://github.com/dustinmoris/AspNetCore.Lambda/blob/30aecaf97971a86c42d1fb7a7132b124664602cc/appveyor.ps1#L8
It didn't download anything, because the command ran so quickly that it could have never downloaded a 100MB file in a few milliseconds. Do you know why so at least I know for the future when I am facing a similar problem?
Support Staff 4 Posted by Feodor Fitsner on 20 Feb, 2017 05:47 PM
I've just checked that downloading line and it worked: https://ci.appveyor.com/project/FeodorFitsner/simple-console/build/...
If you mean the failed build here then I believe it's because of new line issue, i.e. those three statements are on the same line.
5 Posted by Dustin Moris Go... on 20 Feb, 2017 05:54 PM
Hmm yeah I can see that the linked build had all 3 commands on one new line. Not sure what this happened, but in those builds:
https://ci.appveyor.com/project/dustinmoris/aspnetcore-lambda/build/0.1.0-alpha003-68
https://ci.appveyor.com/project/dustinmoris/aspnetcore-lambda/build/0.1.0-alpha003-66
You can see that the commands were not in one line, but the installation step failed because it couldn't find the downloaded file. Unfortunately we don't see the time of each command, but the command which failed was run immediately after the download command, which is why it couldn't find the file, because it probably didn't exist at that point yet.
Support Staff 6 Posted by Feodor Fitsner on 20 Feb, 2017 05:57 PM
Yes, because
(New-Object System.Net.WebClient).DownloadFile('https://go.microsoft.com/fwlink/?linkid=841686','dotnet-core-sdk.exe')
command does not save to the current directory. To save the file to the root of build directory use this command instead:7 Posted by Dustin Moris Go... on 20 Feb, 2017 05:59 PM
Ah okay, that was my mistake. That makes sense and that's what I wanted to know in case I have to do something similar the next time. Thank you for the help!
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:15 AM.