Spatacoli

Spatacoli Blog

  1. Installing .NET Core 3.0 on a Raspberry Pi

    I went into this exercise thinking this would be a tough challenge. However, it turns out to be a very simple process. It’s just prepare, download, unpack, configure, and roll with it.

    Prepare

    First make sure that your Raspberry Pi is running the latest software updates with this command:

    sudo apt-get update && sudo apt-get upgrade

    Once that is done, we need to install libunwind8

    sudo apt-get install libunwind8

    That's it for prepare.

    Download

    Next from the command prompt run this command to get the latest build of .NET Core 3:

    wget https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/dotnet-sdk-latest-linux-arm.tar.gz

    Unpack

    Create a folder in your home directory called dotnet:

    mkdir $HOME/dotnet

    Then unpack the contents of the .NET SDK into that folder

    tar xzf dotnet-sdk-latest-linux-arm.tar.gz –C $HOME/dotnet

    Configure

    Update the .bashrc file to include these lines:

    export PATH=$PATH:$HOME/dotnet

    export DOTNET_ROOT=$HOME/dotnet

    Restart your console session.

    Roll With It

    First let’s make sure it works with this command:

    dotnet --version

    Now that we have it installed let's try it out. Create a directory called hello-world and change to that directory. Next run the following command:

    dotnet new console

    This will scaffold out a new console application for you. Type:

    dotnet run

    and you’ll see the following!

    RPiDotNet

  2. Build 2018

    Another year and another Build conference. Last year I said I’d go this year given the opportunity, and I was given the opportunity.

    The original build conference was billed as //build/ Windows. You could bring whatever tools you knew to build great Windows apps. This conference has morphed over the years and is now //build/ Azure. This is disappointing to me.

    Like last year the first day keynotes were centered around the server and Azure. Day 2 was focused on Windows. The Windows part wasn’t as spellbinding as it has been in the past, and overall it felt evolutionary as opposed to revolutionary in it’s content.

    There was advancements in the Fluent Design Language, but it is still for XAML developers only. There was the announcement of .NET Core 3.0 that will be in preview later this year.

    The things that stuck out to me were the Adaptive Cards to be used in Windows new Timeline feature that was released last October, Sets which may or may not appear in Windows this fall, and finally but certainly not least is Visual Studio Live Share.

    Timeline, as I said before, is a feature of Windows that was introduced last fall. You can see what you were working on in the past and reopen windows that you have closed. Right now it seems to work best with Edge and not much else. So that’s why Microsoft was making a big push for it at Build to teach us how to incorporate the Timeline into our own apps.

    Sets is using tabs everywhere, not just in your browser. They look at it this way, “Imagine I’m planning a trip. I’ve got Excel open and PowerPoint and three browser tabs plus this trip planning application.” The problem I see with this is that they haven’t learned from their Windows 8 experience yet. People don’t look at one thing at a time. They like to have Windows next to each other so they can compare or copy text or just look at two different things. Sets forced you to have one tab open at a time. If you want to switch between that Excel spreadsheet and PowerPoint tabs you can only have one open at a time. You can’t place them side by side. So unless they are going to come out with a split view for Sets, I don’t see it taking off anytime soon. Having said all that though, I do like the Sets integration with Timeline feature. You can click once and rehydrate the entire set you had open.

    Finally there was Visual Studio Live Share. This is an add-on for Visual Studio and Visual Studio Code that allows multiple people, I was told at most 6 people at a time, to be working on a codebase and sharing the debugging. I can actually see this working for the teams I work on and I will push for us to try it when I get back to the office on Monday.

    The only party I went to this year was the Windows Weekly party. That was a really great time.

    This year’s build was a lot of fun, but not all that useful to my current job. I’m wondering to myself if I just haven’t been keeping up or if Microsoft has left me behind. Time will tell. Once again, if given the opportunity to go again next year, I sure will.

  3. AppUrlHandlers

    The promise of web-to-app linking is that a developer can associate an app with a website. That way when you load the website the app will launch. Really cool!image_4

    However, the sad truth of the matter is that you have to do a Windows Key – R to Run the website. Normally I, and I assume most people, go to their browser to view websites. There’s simply no point in running the web page. It would be just as easy using a protocol like vudu: to launch the app from this Run dialog.

    There is a note in the blog post that reads: 

    image_6

    I’m on the Fall Creators Update now and I’m not seeing this behavior. Was this a feature that was dropped? Could someone update the blog post?

    Getting to the point where all of this works was fairly simple. Add an extension to the app manifest. Then add a JSON file to the well-known folder on the website. Finally tweak the OnActivated method of the app to handle whatever URL comes our way. It’s all straight forward and spelled out in the documentation.

    I just don’t see the point of this when we have Protocol handlers already. What do you think?

  4. Installing Windows 10 from a Flash Drive

    8 and a half years ago I wrote about Installing Windows from a Flash Drive. These instructions have served very well for all that time. Like most things, however, times change and instructions that used to work need tweaking.

    I recently got a Microsoft Surface Laptop and it’s a great machine. The first thing I did was to upgrade from Windows 10 S to Windows 10 Pro. Then I installed a Windows Insiders build on it and that’s when things started going bad. All Win32 apps would fail to launch. Making it seem like this machine has gone back to Windows 10 S.

    So I decided that a fresh install of the OS was needed. However, when I built the flash drive to install the OS refused to boot from it. Someone in a forum suggested that I had secure boot enabled in the BIOS and that’s why the flash drive wouldn’t boot. Looking deeper into this situation I found that you need to use the GPT format instead of MBR.

    Okay, let’s try that. Here’s how to prepare the USB drive now. From an elevated command line run these commands:

    1. diskpart
    2. list disk
    3. select disk x
    4. clean
    5. convert gpt
    6. create partition primary
    7. select partition 1
    8. active
    9. format fs=fat32 quick
    10. assign
    11. exit
    12. robocopy D:\ E:\ /MIR

    As with the old instructions, we are assuming that the ISO image is mounted on D: and that the new thumb drive is E:. If either of these assumptions are wrong then modify line 12 accordingly.

    Again, line 2 will list out the disks and you have to decide which one is your thumb drive. This number goes in line 3 where the x is.

    Once all this is done, select boot to USB Device in the UEFI and good luck!

  5. Build 2017

    Microsoft Build is the ultimate conference for me. It’s a developer conference that focuses on Microsoft’s roadmap for the coming year. Every year after the keynote and first day of sessions I rush to a computer to try out what I’ve learned. It’s such a rush to, as everyone says, drink from the firehose. This year, however, was different.

    The first day was about server technologies. Normally they save that for the second day. There’s some interesting advances in Cortana, and I think it might be fun to code up a skill for her. ASP.NET Core 2.0 is coming soon, but the major feature there, Razor Pages, is like a giant step into the past with Web Pages. Not really impressive. I’m working on rewriting my web sites using Core, but I’ll probably stick with ASP.NET Core 1.0 for them.

    Day two was about Windows. This should have been the day that excited me the most. Really though, the most inspiring part was the new Fluent Design Language. The major building blocks are: Light, Depth, Motion, Material and Scale. It looks great and I was excited to learn more, but it’s XAML only. They said implementing it in HTML/JS/CSS would be difficult. I may have to prove them wrong on that. In fact, aside from the TypeScript talk, there was very little in the way of JavaScript. It’s almost as if Microsoft is pushing XAML and not recommending HTML for building apps. This is further exasperated by the fact that Microsoft introduced XAML Standard 1.0.  I bet next year we’ll see a tool to convert XAML to HTML so that you can build your web sites in XAML and not have to touch HTML. The problem is that it makes it really convenient to share code between apps if it’s written in HTML. I’ll have to think on this more, but expect samples to come from me of how to do things in the Microsoft Universe in HTML. I’m thinking of starting with some Surface Dial examples.

    The Parties!

    First I’d like to thank everyone that invited me to a party. I had a great time at all of the parties that I attended. There was a Windows Insider’s Party and I think that was the best one. It wasn’t crowded and everyone was friendly. There wasn’t a super star that everyone crowded around, except maybe Brandon LeBlanc. I didn’t get to meet him, but I also didn’t talk to Mary Jo Foley or Paul Thurrott at the Windows Weekly party.

    Other

    Tuesday night when I first arrived I was invited to a Visual Studio Developer Day. It was like speed dating mixed with a job interview. It was scary and took a lot out of me. They sat us at a table then we’d have 20 minutes with a product team that would grill us on an aspect of Visual Studio. They were trying to learn as much as they could about customer usage of Visual Studio. After the 20 minutes were up they’d switch. This went on for a couple hours. Then they had some drinks and appetizers down in the lobby outside the Company Store where we were given vouchers to spend $200.

    Final Thoughts

    Build was a lot of fun. It wasn’t as exciting as previous years, but I am still glad that I had a chance to go. I’ll definitely go next year (given the opportunity).