Skip to main content

Posts

Showing posts with the label Windows 10

WSL–Getting started experience

Windows Subsystem for Linux (WSL) lets developers run a Linux environment directly on Windows, without the overhead of a traditional virtual machine or dual-boot setup. It is a very convenient way for developers to access and use a Linux environment. But although it not that difficult to get started , it can still take some time before you really understand how to use it. If you also had some trouble to get started with WSL2, or even never took a look at it before, I have some good news for you. Starting from WSL 2.4.4(Pre-release), you get a ‘Getting Started’ experience. Let me show… Getting Started experience First we need to make sure that we download and install the latest pre-release version. You can find the correct installer here . Download the msi file and run the installer. After the installation has completed, open the freshly installed WSL Settings app:   The WSL settings app gives you easy access to a lot of the options that can be configured w...

Podman Desktop–The WSL import of guest OS failed: exit status 0xffffffff

T o avoid carrying around multiple laptops for different customers I typically ask if they can provide me a VDI (for example through Azure Virtual Desktop). One of my clients is not on a cloud platform (yet), so the VM they provided me was running on a local(read: in a traditional datacenter) hyper-v cluster. As we were investigating to move to a container based development model, I installed Podman Desktop on the provided machine. Podman Desktop requires a Podman machine to be created to be able to run workloads. However when I tried to create a new machine, it failed with the following error message: Error: the WSL import of guest OS failed: exit status 0xffffffff I did a second attempt through the commandline but this failed as well: podman machine init Extracting compressed file: podman-machine-default-amd64: done Importing operating system into WSL (this may take a few minutes on a new WSL install)... WSL2 is not supported with your current machine configuration. Pl...

Winget–A package manager for Windows

I’ve been using Chocolatey for a long time as an easy way to get my Windows machine configured with all the software I need. With the release of version 1.1 of the Windows Package Manager(WinGet) I thought it was a good time to give it a try. Installation Chances are high that WinGet is already available on your machine. Open a terminal and type winget. If it is available you should see something like this: If not, the Windows Package Manager is distributed with the App Installer from the Microsoft Store. You can also download and install the Windows Package Manager from GitHub , or just directly install the latest available released version. Searching a package The list of available packages is quite large(more than 2,600 packages in the Windows Package Manager app repository ). Just run winget search <SomePackage> to see if the package you are looking for has available there. For example let’s search for my favorite git client GitKraken: PS C:\Users\bawu...

Kubernetes–Schedule a pod on a Linux node–Part 2

Yesterday I blogged about the usage of the “kubernetes.io/os” nodeselector to schedule a pod specifically on a windows or linux node pool. Today I want to share another way through the usage of taints and tolerations. This Kubernetes feature allows users to mark a node (taint the node) so that no pods can be scheduled to it, unless a pod has a toleration that indicates it will accept this taint. Using this Kubernetes feature we can create nodes that are reserved (dedicated) for specific pods.  Using this, we can pick one OS and taint all the nodes with this OS, so that any pods that do not specify toleration will use the non-tainted nodes. This Taint effectively allows us to specify a default OS for the cluster, and if you want to use the other OS, you need to state this explicitly. To enable this, we first need to taint our Windows nodes. We would run this command for each Windows node: kubectl taint nodes <nodeName> OS=Windows:NoSchedule After this is applied it...

Change password in another domain

As a consultant I’m active at multiple clients. For each of these clients I get a domain account to be able to login onto their systems. But as they all enforce a password policy, I have to update a lot of passwords every month(thank god that password managers exists). Here is a quick tip of you want to change the password of an Active Directory account but your PC isn’t part of the same domain: You can still change your password if your PC is able to talk to the domain controller: Hit CTRL-ALT-DELETE Select Change a Password You’ll see the Change a Password screen where the focus is on the old Password field. But what is not immediately obvious is that you can change the username(and domain!) in the first field. By setting here a different username you can change the password directly for any account you have access to.

Issue building UWP apps: Error WMC1006: Cannot resolve Assembly or Windows Metadata file

A customer contacted me because they had errors building an UWP application on one of their build servers. Here are the related build logs: MarkupCompilePass1:   Creating directory "obj\x86\Release\intermediatexaml\". App1\App1.csproj(0,0): Error WMC1006: Cannot resolve Assembly or Windows Metadata file 'Type universe cannot resolve assembly: System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.' D:\Builds\dev-agent-1\_work\76\s\App1\App1.csproj : XamlCompiler error WMC1006: Cannot resolve Assembly or Windows Metadata file 'Type universe cannot resolve assembly: System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.'   (Out) GeneratedCodeFiles: 'D:\Builds\dev-agent-1\_work\76\s\App1\obj\x86\Release\App.g.i.cs;D:\Builds\dev-agent-1\_work\76\s\App1\obj\x86\Release\App.g.cs'   (Out) Compile: 'App.xaml.cs;MainPage.xaml.cs;Properties\AssemblyInfo.cs;D:\Builds\dev-agent-1\_...

Create a .npmrc file on Windows

Kind of stupid but Windows doesn’t like it when you try to create a file with only an extension(like .gitignore, .npmrc,…). Windows will give you an error message instead: The trick to get it working is to include an ending dot also, like .npmrc. Don’t ask me why it works…

Windows 10–Remove the Windows.old folder after upgrading

After upgrading my Windows 10 installation to the Anniversary Update, I noticed that I had two windows folders; windows & windows.old. Both were eating up a lot of disk space, but I had no clue if I could safely delete the windows.old folder. The windows.old folder contains all information about your previous windows version. Idea is that if you want to roll back to the old version, it’s possible through the recovery option. Windows will automatically clean up the old folder after some time but if you can’t wait here is a (safe) alternative: Open Windows Explorer . Right click on the drive that contains your Windows installation. Choose Properties . Click the Disk Cleanup button on the General tab. After the Disk Cleanup tool is done calculating, click on the Cleanup System Files button. Select the Previous Windows Installation(s) option to delete the Windows.old folder Remark: I noticed that if you don’t run the Disk Cleanup tool as an administrato...

Microsoft Build–Code Labs

In case you weren’t at Build 2016 or had to miss the Code Lab sessions while there, all the content, instructions, setup and source is available now in the Microsoft-Build-2016 repo. CodeLabs-UWP CodeLabs-Data CodeLabs-WebDev CodeLabs-IoTDev CodeLabs-Office CodeLabs-MobileDevOps CodeLabs-GameDev-1-UnityIntro CodeLabs-GameDev-2-UnityWin10 CodeLabs-GameDev-3-ANGLE CodeLabs-GameDev-4-GraphicsDiag CodeLabs-GameDev-5-MonoGameIntro CodeLabs-GameDev-6-Azure

Templates for Windows 10 Universal Apps

To speed up the creation of a Windows 10 Universal App, Intense created a set of free templates to get you started. From the site: Controls, templates, and tools for building Universal Windows Platform apps on Windows 10. The Intense toolkit consists of two parts; a library of controls and helpers distributed as NuGet package, and a Visual Studio extension with project templates for creating new UWP apps. Intense Templates Adds new project and item templates to Visual Studio 2015 for creating Universal Windows apps. The templates are available in both C# and Visual Basic flavors. Blank App Composition App Composition XAML App Content App Navigation App SplitView App You can download the required Visual Extension from the Visual Studio Gallery: https://visualstudiogallery.msdn.microsoft.com/b7076e96-d4ab-4150-b2c6-12730abd5666

Windows 10 Development Workshop

Interested in learning Windows 10 development? But you don’t know where to start? Check out the training material for the Hands on Workshop for Windows 10 Developer Training (pfew, what a title!) From the GitHub repo : The purpose of the Workshop is to provide a more interactive developer training experience that minimizes lecture in favor of more instructor led lab experiences. Each module contains a minimal PPT deck and one or more 'hands on labs' for direct delivery in a classroom setting. The lab manuals and solution files for this module have been moved. All hands on labs are now in their own repo at https://github.com/Windows-Readiness/WinDevHOLs so that they can be easily downloaded independently of the slide decks. The day long agenda consists of the following modules, each 60 minutes split between PPT and Lab Intro to the Universal Windows Platform Adaptive UI Live Tiles & Notifications Edge & Web Apps Cloud ...

Caliburn.Micro & Windows 10 UWP apps - AmbiguousMatchException

I continued my journey on using Caliburn.Micro in Windows 10 UWP apps. The next thing I tried was to add a device specific view. In UWP apps this can easily be done by adding a second XAML file with the same name and a device family added to it. For example: a device specific version of ShellView.xaml can be ShellView.DeviceFamily-Mobile.xaml . Remark: This is not the only way to specify a device specific version. More information here: http://igrali.com/2015/08/02/three-ways-to-set-specific-devicefamily-xaml-views-in-uwp/   However after doing that, my Caliburn application started to fail with the following exception: AmbiguousMatchException: Ambiguous match found It seems that I’m not the first one with this problem as an issue(and a fix) had already been created on Github: https://github.com/Caliburn-Micro/Caliburn.Micro/pull/227 Unfortunately the fix is , at the moment of writing, not yet released so you have to download the source code and compile the code yo...

Caliburn.Micro & Windows 10 UWP apps

As a big fan of Caliburn.Micro , I’m happy to see that the team is working on extending their platform support to Windows 10, Xamarin, Xamarin.Forms and so on… An official release is not available yet, but I couldn’t wait to try the UWP support. So I created a Blank Universal Windows app:   I added the Caliburn.Micro package through NuGet(don’t forget to check the Include prerelease checkbox): And then replaced the default App.xaml file with the following code: The only thing missing is a View and a corresponding ViewModel. As Caliburn prefers convention over configuration, we can create a Views folder and put a ShellView.xaml there, the corresponding viewmodel is placed in the ViewModels folder: That’s all we need to get started!

Hidden gems from Build 2015

With the long list of announcements at Build, it’s hard to separate the good from the great stuff. 2 things on my radar that can make or break the success of Windows 10: Universal Windows Platform Bridge for Classic Windows Applications Windows has a huge portfolio of existing Win32, WPF and .NET apps. Unfortunately until now, they were not available through the Windows Store. This made the Windows Store the loser in the big number game about “which store has the most apps?”. With the announcement at Build, this will change: Microsoft announced Project Centennial , a bridge which will allow an existing Classic Windows application to be converted to a Universal Windows app and made available in the Windows Store. These apps will not only have the same install and update user experience that the Store provides today, they will also be able to call the Universal Windows Platform APIs and use new platform capabilities like Action Center, Actionable Notifications, and enhanced Live...

Developer's Guide to Windows 10 Preview

If you can’t wait until Windows 10 is released and you already want to learn how to develop against the next incarnation of Windows, Microsoft Virtual Academy created a free online course : Would you like a preview of the developer tools for Windows 10? If you’ve signed up for the Windows Insiders program , get early access and a head start on developing for Windows 10. Plus, you can offer your feedback to help us shape it! Join experts Jerry Nixon and Andy Wigley as they introduce the Windows 10 developer platform, give guidance on developing Windows universal and web apps, and take a look at some of the interesting new features for developers in Windows 10.