Subscribe: Scott Hanselman's Computer Zen
http://www.hanselman.com/blog/SyndicationService.asmx/GetAtom
Added By: Feedage Forager Feedage Grade A rated
Language: English
Tags:
app  apps  core  dotnet  linux  make  net core  net  open source  powershell  run  store  things  windows store  windows 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Scott Hanselman's Computer Zen

Scott Hanselman's Blog



Scott Hanselman on Programming, User Experience, The Zen of Computers and Life in General



 



FIXED: Xbox One losing TV signal error message with DirectTV

Wed, 28 Sep 2016 18:30:42 GMT

I've got an Xbox One that I love that is connected to a DirectTV HDTV Receiver that I love somewhat less. The setup is quite simple. Since I can control the DirectTV with the Xbox One and we like to switch between Netflix and Hulu and DirectTV we use the Xbox One to control everything. The basic idea is this, which is quite typical with an Xbox One. In theory, it's amazing. However, this doesn't always work. Often you'll turn on the whole system and the Xbox will say "Your TV Signal was lost. Make sure your cable or satellite box is on and plugged into the Xbox." This got so bad in our house that my non-technical spouse was ready to "buy a whole new TV." I was personally blaming the Xbox. It turns out that's an issue of HDMI compliance. The DirectTV and other older cable boxes aren't super awesome about doing things the exact way HDMI like it, and the Xbox is rather picky about HDMI being totally legit. So how do I "clean" or "fix" my HDMI signal from my Cable/Satellite receiver? I took at chance and asked on Reddit and this very helpful user (thanks!) suggested an HDMI splitter. I was surprised but I was ready to try anything so I ordered this 2 port HDMI powered splitter from Amazon for just US$20. ADDING AN HDMI SPLITTED WORKS - TOTALLY SOLVED THE PROBLEM It totally works. The Xbox One now does its "negotiations" with the compliant splitter, not with the Receiver directly and we haven't seen a single problem since. If you have had this problem with your Xbox One then pick up a 2 port HDMI powered splitter and rejoice. This is a high quality splitter than doesn't change the audio signal and still works with HDCP if needed. Thanks internets! Sponsor: Big thanks to Telerik for sponsoring the feed this week. Try Kendo UI by Progress: The most complete set of HTML5 UI widgets and JavaScript app tools helping you cut development time.© 2016 Scott Hanselman. All rights reserved.       [...]



Self-contained .NET Core Applications

Sun, 18 Sep 2016 05:32:55 GMT

Just in case you missed it, .NET is all open source now and .NET Core is a free, open source, cross-platform framework that you can download and start with in <10 minutes. You can get it on Mac, Windows, and a half-dozen Unixes at http://dot.net. Take that along with the free, cross-platform Visual Studio Code and you'll be writing C# and F# all over the place. Ok, that said, there's two ways to deploy a .NET Core application. There's FDD and SCD. Since TLAs (three letter acronyms) are stupid, that's Framework-dependent and Self-contained. When .NET Core is installed it ends up in C:\program files\dotnet on Windows, for example. In the "Shared" folder there's a bunch of .NET stuff that is, well, shared. There may be multiple folders, as you can see in my folder below. You can have many and multiple installs of .NET Core. When you're installing your app and its dependencies BUT NOT .NET Core itself, you're dependent on .NET Core already being on the target machine. That's fine for Web Apps or systems with lots of apps, but what if I want to write an app and give it to you as zip or on a USB key and and I just want it to work. I'll include .NET Core as well so the whole thing is a Self Contained Deployment. It will make my "Hello World" application larger than if I was using an existing system-wide install, but I know it'll Just Work because it'll be totally self-contained. If I deploy my app along with .NET Core it's important to remember that I'll be responsible for servicing .NET Core and keeping it up to date. I also need to decide on my target platforms ahead of time. If I want it to run on Windows, Mac, and Linux AND just work, I'll need to include those target platforms and build deployment packages for them. This all makes mostly intuitive sense but it's good to know. I'll take my little app (I'm just using a "dotnet new" app) and I'll modify project.json in a text editor. My app is a .NETCore.App, but it's not going to use the .NET Core platform that's installed. It'll use a local version so I'll remove "type="platform"" from this dependency."frameworks": { "netcoreapp1.0": { "dependencies": { "Microsoft.NETCore.App": { "version": "1.0.1" } } } } Next I'll make a runtimes section to specify which ones I want to target. There's a list of ALL the Runtime IDs here."runtimes": { "win10-x64": {}, "osx.10.10-x64": {}, "ubuntu.14.04-x64": {} } After running "dotnet restore" you'll want to build for each of these like this:dotnet build -r win10-x64dotnet build -r osx.10.10-x64dotnet build -r ubuntu.14.04-x64 And then publish release versions after you've tested, etc.dotnet publish -c release -r win10-x64dotnet publish -c release -r osx.10.10-x64dotnet publish -c release -r ubuntu.14.04-x64 Once this is done, I've got my app self-contained in n folders, ready to deploy to whatever systems I want. You can see in the Win10 folder there's my "MYAPPLICATION.exe" (mine is called scd.exe) that can be run, rather than running things like developers do with "dotnet run." There's lots of good documentation about how you can tune and define exactly what gets deployed with your self contained application over at the .NET Core Docs. You can do considerable trimming to .NET Core, and there's talk of that becoming more and more automated in the future, possibly down to the method level. Sponsor: Big thanks to Redgate for sponsoring the feed this week. Discover the world’s most trusted SQL Server comparison tool. Enjoy a free trial of SQL Compare, the industry standard for comparing and deploying SQL Server schemas. © 2016 Scott Hanselman. All rights reserved.       [...]



Putting (my VB6) Windows Apps in the Windows 10 Store - Project Centennial

Wed, 14 Sep 2016 18:52:28 GMT

I noticed today that Evernote was in the Windows Store. I went to the store, installed Evernote, and it ran. No nextnextnextfinish-style install, it just worked and it worked nicely. It's a Win32 app and it appears to use NodeWebKit for part of it's UI. But it's a Windows app, just like VB6 apps and just like .NET apps and just like UWP (Universal Windows Platform) apps, so I found this to be pretty cool. Now that the Evernote app is a store app it can use Windows 10 specific features like Live Tiles and Notifications and it'll be always up to date. The Windows Store is starting (slowly) to roll out and include existing desktop apps and games by building and packaging those apps using the Universal Windows Platform. This was called "Project Centennial" when they announced it at the BUILD conference. It lets you basically put any Windows App in the Windows Store, which is cool. Apps that live there are safe, won't mess up your machine, and are quickly installed and uninstalled. Here's some of the details about what's happening with your app behind the scenes, from this article. This is one of the main benefits of the Windows Store. Apps from the Store can't mess up your system on a global scale. [The app] runs in a special environment where any accesses that the app makes to the file system and to the Registry are redirected. The file named Registry.dat is used for Registry redirection. It's actually a Registry hive, so you can view it in the Windows Registry Editor (Regedit). When it comes to the file system, the only thing redirected is the AppData folder, and it is redirected to the same location that app data is stored for all UWP apps. This location is known as the local app data store, and you access it by using the ApplicationData.LocalFolderproperty. This way, your code is already ported to read and write app data in the correct place without you doing anything. And you can also write there directly. One benefit of file system redirection is a cleaner uninstall experience. The "DesktopAppConverter" is now packaged in the Windows Store as well, even though it runs at the command prompt! If your Windows Desktop app has a "silent installer" then you can run this DesktopAppConvertor on your installer to make an APPX package that you can then theoretically upload to the Store. NOTE: This "Centennial" technology is in Windows 10 AU, so if you haven't auto-updated yet, you can get AU now. They are also working with install vendors like InstallShield and WiX to so their installation creation apps will create Windows Store apps with the Desktop Bridge automatically. This way your existing MSIs and stuff can turn into UWP packages and live in the store. It looks like there are a few ways to make your existing Windows apps into Windows 10 Store-ready apps. You can use this DesktopAppConverter and run it in your existing  silent installer. Once you've made your app a Store App, you can "light up" your app with Live Tiles and Notifications and  other features with code. Check out the https://github.com/Microsoft/DesktopBridgeToUWP-Samples GitHub Repro with samples that show you how to add Tiles or Background tasks. You can use [Conditional("DesktopUWP")] compilation if you have both a Windows Store and Windows desktop version of your app with a traditional installer. If your app is a simple Xcopy-deploy app that has no installer, it's even easier. To prove this I installed Visual Basic 6 on my Windows 10 machine. OH YES I DID. NOTE: I am using VB6 as a fun but also very cool example. VB6 is long out of support but apps created with it still run great on Windows because they are win32 apps. For me, this means that if I had a VB6 app that I wanted to move into the Store and widen my audience, I could. I made a quick little Project1.exe in VB6 that runs on its own. I made an AppxManifest.xml with these contents following this HelloWorld sample. How to deal with Technology Burnout - Maybe it's life's cycles

Tue, 06 Sep 2016 22:00:34 GMT

Sarah Mei had a great series of tweets last week. She's a Founder of RailsBridge, Director of Ruby Central, and the Chief Consultant of DevMynd so she's experienced with work both "on the job" and "on the side." Like me, she organizes OSS projects, conferences, but she also has a life, as do I. If you're reading this blog, it's likely that you have gone to a User Group or Conference, or in some way did some "on the side" tech activity. It could be that you have a blog, or you tweet, or you do videos, or you volunteer at a school. With Sarah's permission, I want to take a moment and call out some of these tweets and share my thoughts about them. I think this is an important conversation to have. My career has had a bunch of long cycles (months or years in length) of involvement & non-involvement in tech stuff outside of work.— Sarah Mei (@sarahmei) August 31, 2016 This is vital. Life is cyclical. You aren't required or expected to be ON 130 hours a week your entire working life. It's unreasonable to expect that of yourself. Many of you have emailed me about this in the past. "How do you do _____, Scott?" How do you deal with balance, hang with your kids, do your work, do videos, etc. I don't. Sometimes I just chill. Sometimes I play video games. Last week I was in bed before 10pm two nights. I totally didn't answer email that night either. Balls were dropped and the world kept spinning. Sometimes you need to be told it's OK to stop, Dear Reader. Slow down, breathe. Take a knee. Hell, take a day. When we pathologize the non-involvement side of the cycle as "burnout," we imply that the involvement side is the positive, natural state.— Sarah Mei (@sarahmei) August 31, 2016 Thank you, Sarah, for sharing this important reminder with us. Cycles happen. Related Reading Software and Saving Babies Give yourself permission to have work-life balance Self-care matters - Pay yourself first * Burnout photo by Michael Himbeault used under CC© 2016 Scott Hanselman. All rights reserved.       [...]



Publishing an ASP.NET Core website to a cheap Linux VM host

Thu, 01 Sep 2016 00:41:07 GMT

A little Linux VM on Azure is like $13 a month. You can get little Linux machines all over for between $10-15 a month. On Linode they are about $10 a month so I figured it would be interesting to setup an ASP.NET Core website running on .NET Core. As you may know, .NET Core is free, open source, cross platform and runs basically everywhere. Step 0 - Get a cheap host I went to Linode (or anywhere) and got the cheapest Linux machine they offered. In this case it's an Ubuntu 14.04 LTS Profile, 64-bit, 4.6.5 Kernel. Since I'm on Windows but I want to SSH into this Linux machine I'll need a SSH client. There's a bunch of options. If you have the latest Windows 10 you can just use the Bash/Ubuntu shell that is built into Windows itself. That's what I did. I ran bash, then ssh. You can download OpenSSH for Windows. This is the one that the Windows/PowerShell team is bringing to Windows. It's a win32 port of OpenSSH. SmarTTY - Nicer than Putty, this is a free multi-tabbed SSH client that also supports copying files Putty or Bitvise - Both free and both work fine Step 0.5 - Setup a user that isn't root It's always a good idea to avoid being root. After logging into the system as root, I made a new user and give them sudo (super user do):adduser scottusermod -aG sudo scott Then I'll logout and go back in as scott. Step 1 - Get .NET Core on your Linux Machine Head over to http://dot.net to get .NET Core and follow the instructions. There's at least 8 Linuxes supported in 6 flavors so you should have no trouble. I followed the Ubuntu instructions. To make sure it works after you've set it up, make a quick console app like this and run it.mkdir testappcd testappdotnet new dotnet restoredotnet run If it runs, then you've got .NET Core installed and you can move on to making a web app and exposing it to the internet. NOTE: If "dotnet restore" fails with a segmentation fault, you may be running into this issue with some 64-bit Linux Kernels. Here's commands to fix it that worked for me on Ubuntu 14.04 when I hit this. The fix has been released as a NuGet now but it will be included with the next minor release of .NET Core, but if you ever need to manually update the CoreCLR you can. Step 2 - Make an ASP.NET Core website You can make an ASP.NET Core website that is very basic and very empty and that's OK. You can also get Yeoman and use the ASP.NET yeoman-based generators to get more choices. There is also the great ASP.NET MVC Boilerplate project for Visual Studio. Or you can just start with:dotnet new -t web Today, this default site uses npm, gulp, and bower to manage JavaScript and CSS dependencies. In the future there will be options that don't require as much extra stuff but for now, in order to dotnet restore this site I'll need npm and what not so I'll do this to get node, npm, etc.sudo apt-get install npmsudo npm install gulpsudo npm install bower Now I can dotnet restore easily and run my web app to test. It will startup on localhost:5000 usually.$ dotnet restore$ dotnet runscott@ubuntu:~/dotnettest$ dotnet run Project dotnettest (.NETCoreApp,Version=v1.0) was previously compiled. Skipping compilation.info: Microsoft.Extensions.DependencyInjection.DataProtectionServices[0] User profile is available. Using '/home/scott/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest.Hosting environment: ProductionContent root path: /home/scott/dotnettestNow listening on: http://localhost:5000 Of course, having something startup on localhost:5000 doesn't help me as I'm over here at home so I can't test a local website like this. I want to expose this site (via a port) to the outside world. I want something like http://mysupermachine -> inside my machine -> localhost:5000. Step 3 - Expose your web app to the outside. I could tell Kestrel - that's the .NET Web Server - to expose itself to Port 80, although you usually want to have another process between you and the outside [...]



What is Serverless Computing? Exploring Azure Functions

Sat, 27 Aug 2016 00:11:21 GMT

There's a lot of confusing terms in the Cloud space. And that's not counting the term "Cloud." ;) IaaS (Infrastructure as a Services) - Virtual Machines and stuff on demand. PaaS (Platform as a Service) - You deploy your apps but try not to think about the Virtual Machines underneath. They exist, but we pretend they don't until forced. SaaS (Software as a Service) - Stuff like Office 365 and Gmail. You pay a subscription and you get email/whatever as a service. It Just Works. "Serverless Computing" doesn't really mean there's no server. Serverless means there's no server you need to worry about. That might sound like PaaS, but it's higher level that than. Serverless Computing is like this - Your code, a slider bar, and your credit card. You just have your function out there and it will scale as long as you can pay for it. It's as close to "cloudy" as The Cloud can get. With Platform as a Service, you might make a Node or C# app, check it into Git, deploy it to a Web Site/Application, and then you've got an endpoint. You might scale it up (get more CPU/Memory/Disk) or out (have 1, 2, n instances of the Web App) but it's not seamless. It's totally cool, to be clear, but you're always aware of the servers. New cloud systems like Amazon Lambda and Azure Functions have you upload some code and it's running seconds later. You can have continuous jobs, functions that run on a triggered event, or make Web APIs or Webhooks that are just a function with a URL. I'm going to see how quickly I can make a Web API with Serverless Computing. I'll go to http://functions.azure.com and make a new function. If you don't have an account you can sign up free. You can make a function in JavaScript or C#. Once you're into the Azure Function Editor, click "New Function" and you've got dozens of templates and code examples for things like: Find a face in an image and store the rectangle of where the face is. Run a function and comment on a GitHub issue when a GitHub webhook is triggered Update a storage blob when an HTTP Request comes in Load entities from a database or storage table I figured I'd change the first example. It is a trigger that sees an image in storage, calls a cognitive services API to get the location of the face, then stores the data. I wanted to change it to: Take an image as input from an HTTP Post Draw a rectangle around the face Return the new image You can do this work from Git/GitHub but for easy stuff I'm literally doing it all in the browser. Here's what it looks like. I code and iterate and save and fail fast, fail often. Here's the starter code I based it on. Remember, that this is a starter function that runs on a triggered event, so note its Run()...I'm going to change this.#r "Microsoft.WindowsAzure.Storage" #r "Newtonsoft.Json" using System.Net; using System.Net.Http; using System.Net.Http.Headers; using Newtonsoft.Json; using Microsoft.WindowsAzure.Storage.Table; using System.IO; public static async Task Run(Stream image, string name, IAsyncCollector outTable, TraceWriter log) { var image = await req.Content.ReadAsStreamAsync(); string result = await CallVisionAPI(image); //STREAM log.Info(result); if (String.IsNullOrEmpty(result)) { return req.CreateResponse(HttpStatusCode.BadRequest); } ImageData imageData = JsonConvert.DeserializeObject(result); foreach (Face face in imageData.Faces) { var faceRectangle = face.FaceRectangle; faceRectangle.RowKey = Guid.NewGuid().ToString(); faceRectangle.PartitionKey = "Functions"; faceRectangle.ImageFile = name + ".jpg"; await outTable.AddAsync(faceRectangle); } return req.CreateResponse(HttpStatusCode.OK, "Nice Job"); } static async Task CallVisionAPI(Stream image) { using (var client = new HttpClient()) { var content = new [...]



Psychic Weight - Dealing with the things that press on your mind

Wed, 24 Aug 2016 05:49:09 GMT

  I was really stressed out ten years ago. I felt that familiar pressure between my eyes and felt like all the things that remained undone were pressing on me. I called it "psychic weight." I have since then collected my Productivity Tips and written extensively on the topic of productivity and getting things done. I'm going to continue to remind YOU that Self-Care Matters in between my technical and coding topics. The essence of what I learned was to let go. The Serenity Prayer: God, grant me the serenity to accept the things I cannot change, Courage to change the things I can, And wisdom to know the difference. Everyone has stress and everyone has pressure. There's no magic fix or silver bullet for stress, but I have found that some stressors have a common root cause. Things that stress me are things I think I need to do, handle, watch, take care of, worry about, sweat, deal with, or manage. These things press on me - right between my eyes - and the resulting feeling is what I call psychic weight. For example: When the DVR (Digital Video Recorder) came out it was a gift from on high. What? A smart VCR that would just tape and hold all the TV Shows that I love? I don't have to watch shows when the time and day the shows come on? Sign me up. What a time saver! Fast forward a few years and the magical DVR is now an infinite todo list of TV shows. It's a guilt pile. A failure queue. I still haven't watched The Wire. (I know.) It presses on me. I've actually had conversations with my wife like "ok, if we bang out the first season by staying up tonight until 4am, we should be all ready when Season 2 drops next week." Seriously. Yes, I know, Unwatched TV is a silly example. But you've binge-watched Netflix when you should have been working/reading/working out so you can likely relate. But I'm letting go. I'll watch The Wire another time. I'll delete it from my DVR. I'm never going to watch the second season of Empire. (Sorry, Cookie. I love you Taraji!) I'm not going to read that pile of technical books on my desk. So I'm going to declare that to the universe and I'm going to remove the pile of books that's staring at me. This book stack, this failure pile is no more. And I'm not even mad. I'm OK with it. Every deletion like this from your life opens up your time - and your mind -for the more important things you need to focus on. What are your goals? What can you delete from your list (and I mean, DROP, not just postpone) that will free up your internal resources so you can focus on your goal? Delete those emails. Declare email bankruptcy. They'll likely email you again. Delete a few seasons of shows you won't watch. Delete Pokemon Go. Make that stack of technical books on your desk shorter. Now, what positive thing will you fill those gaps with? You deserve it. Remove psychic weight and lighten up. Then sound off in the comments! * Image Copyright Shea Parikh / used under license from getcolorstock.com Sponsor: Aspose makes programming APIs for working with files, like: DOC, XLS, PPT, PDF and countless more.  Developers can use their products to create, convert, modify, or manage files in almost any way.  Aspose is a good company and they offer solid products.  Check them out, and download a free evaluation.© 2016 Scott Hanselman. All rights reserved.       [...]



Announcing PowerShell on Linux - PowerShell is Open Source!

Thu, 18 Aug 2016 15:20:33 GMT

I started doing PowerShell almost 10 years ago. Check out this video from 2007 of me learning about PowerShell from Jeffrey Snover! I worked in PowerShell for many years and blogged extensively,  ultimately using PowerShell to script the automation and creation of a number of large systems in Retail Online Banks around the world. Fast forward to today and Microsoft is announcing PowerShell on Linux powered by .NET Core and it's all open source and hosted at http://GitHub.com/PowerShell/PowerShell. Jeffrey Snover predicted internally in 2014 that PowerShell would eventually be open sourced but it was the advent of .NET Core and getting .NET Core working on multiple Linux distros that kickstarted the process. If you were paying attention it's possible you could have predicted this move yourself. Parts of PowerShell have been showing up as open source: DSC Resources Script Analyzer Editor Services PowerShell Documentation PowerShell Gallery Get PowerShell everywhere Ok, but where do you GET IT? http://microsoft.com/powershell is the homepage for PowerShell and everything can be found starting from there. The PowerShell open source project is at https://github.com/PowerShell/PowerShell and there are alphas for Ubuntu 14.04/16.04, CentOS 7.1, and Mac OS X 10.11. To be clear, I'm told this is are alpha quality builds as work continues with community support. An official Microsoft-supported "release" will come sometime later. What's Possible? This is my opinion and somewhat educated speculation, but it seems to me that they want to make it so you can manage anything from anywhere. Maybe you're a Unix person who has some Windows machines (either local or in Azure) that you need to manage. You can use PowerShell from Linux to do that. Maybe you've got some bash scripts at your company AND some PowerShell scripts. Use them both, interchangeably. If you know PowerShell, you'll be able to use those skills on Linux as well. If you manage a hybrid environment, PowerShell isn't a replacement for bash but rather another tool in your toolkit. There are lots of shells (not just bash, zsh, but also ruby, python, etc) in the *nix world so PowerShell will be in excellent company. Related Links Be sure to check out the coverage from around the web and lots of blog posts from different perspectives! PowerShell Team Blog PowerShell Webinar PowerShell Team YouTube official channel GitHub PowerShell Project .NET Core Project Have fun! This open source thing is kind of catching on at Microsoft isn't it? Sponsor: Do you deploy the same application multiple times for each of your end customers? The team at Octopus have been trying to take the pain out of multi-tenant deployments. Check out their 3.4 beta release.© 2016 Scott Hanselman. All rights reserved.       [...]