Skip to content

Instantly share code, notes, and snippets.

.NET Workload Troubleshooting

To install the maui workload, you have two options:

  1. dotnet workload install commands
  2. Visual Studio on Windows can install .msi files for each workload pack. Note that the concept of a "Visual Studio workload" is different than a ".NET workload".

VS for Mac's installer and updater use dotnet workload install commands. It's considerably simpler to get a Mac machine to a clean state.

Mac

@PureWeen
PureWeen / ShellFlyoutHack.xaml
Last active May 15, 2020 00:22
ShellFlyoutHack.xaml
<Shell.ItemTemplate>
<DataTemplate>
<ContentView IsVisible="False"></ContentView>
</DataTemplate>
</Shell.ItemTemplate>
<!-- add these dynamically the Shell.Items ->
<MenuItem Text="Customer1 " Command="{Binding Command}" />
<MenuItem Text="Customer2 " Command="{Binding Command}" />
<MenuItem Text="Customer3 " Command="{Binding Command}" />
<MenuItem Text="Customer4 " Command="{Binding Command}" />
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Linq;
using Xamarin.Forms;
using TinyNavigationHelper.Abstraction;
namespace TinyNavigationHelper.Forms
@PureWeen
PureWeen / FusedLayout.md
Last active March 30, 2020 20:13
Fused Layout

Let's you base all layout measurements relatively against the layout properties of other views

Properties you can use to calculate against

public double X { get; set; } 
public double Width { get; set; } 
public double Right { get; set; } 
public double Left { get; set; } 
public double Y { get; set; } 
public double Height { get; set; }
@PureWeen
PureWeen / Xmas.md
Last active December 23, 2019 05:46
Xmas project
@PureWeen
PureWeen / Xmas.md
Created December 21, 2019 22:36
Xmas project
  • Install VSCode extension
@PureWeen
PureWeen / Alternative.md
Last active December 11, 2019 00:01
FlyoutItem and Tab Styling with Shell

Currently we already do everything with property explosion based on the following

Shell.TitleColor //applies to tab and flyout color
Shell.TabBarTitleColor //applies to tab and overrides TitleColor

So if we were to keep consistent here then we should just add the following Attached Properties

@PureWeen
PureWeen / FlyoutMenuTemplates.md
Created November 23, 2019 03:44
Flyout and MenuTemplates
<?xml version="1.0" encoding="UTF-8"?>
<Shell xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:d="http://xamarin.com/schemas/2014/forms/design" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" xmlns:local="clr-namespace:ShellFlyouts.Views" Title="ShellFlyouts" x:Class="ShellFlyouts.AppShell"
    Shell.ItemTemplate="{StaticResource FlyoutTemplates}"
    Shell.MenuItemTemplate="{StaticResource FlyoutTemplates}"
      >
    <!-- 
        Styles and Resources 
    -->
    <Shell.Resources>
@PureWeen
PureWeen / Crashes.md
Created August 30, 2019 14:27
Android Crashes
08-30 08:09:55.562 3318-3318/? E/memtrack: Couldn't load memtrack module (No such file or directory)
08-30 08:09:55.562 3318-3318/? E/android.os.Debug: failed to load memtrack module: -2
08-30 08:09:56.865 4366-4413/com.android.launcher3 E/Surface: getSlotFromBufferLocked: unknown buffer: 0xb403d3e0
08-30 08:10:00.190 1264-1293/? E/SurfaceFlinger: ro.sf.lcd_density must be defined as a build property
08-30 08:10:00.330 3327-3351/AndroidControlGallery.AndroidControlGallery E/eglCodecCommon: glUtilsParamSize: unknow param 0x00008cdf
08-30 08:10:00.330 3327-3351/AndroidControlGallery.AndroidControlGallery E/eglCodecCommon: glUtilsParamSize: unknow param 0x00008824
08-30 08:10:03.663 3327-3327/AndroidControlGallery.AndroidControlGallery E/SpannableStringBuilder: SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
08-30 08:10:03.663 3327-3327/AndroidControlGallery.AndroidControlGallery E/SpannableStringBuilder: SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
08-30 08:10:03.780 3327-3327/AndroidCo
@PureWeen
PureWeen / PickerIOS.md
Last active August 29, 2019 19:40
Picker
[assembly:ExportRenderer(typeof(Picker), typeof(PlaceHolderPicker), new[] { typeof(VisualMarker.MaterialVisual), typeof(CustomMaterial) })]
namespace VisualPicker.iOS
{
    public class PlaceHolderPicker : MaterialPickerRenderer, IMaterialEntryRenderer
    {
        public PlaceHolderPicker()
        {
        }