Skip to content

Instantly share code, notes, and snippets.

Avatar

Jimmy Garrido jimmgarrido

View GitHub Profile
@jimmgarrido
jimmgarrido / Hang Stacktrace.md
Last active Oct 25, 2019
Visual Studio for Mac Collect Diagnostic Info
View Hang Stacktrace.md

Collecting Stacktrace information

  1. Open Activity Monitor.app
  2. Under the "CPU" tab, find the "Visual Studio" process and note its PID (should be 2nd to last column)
  3. Open a terminal window
  4. Run kill -QUIT [VS PID] to dump the current thread stack into the current log file (not in the terminal)
  5. Zip up the logs from Visual Studio > Help > Open Log Directory
@jimmgarrido
jimmgarrido / workaround.md
Last active Oct 2, 2018
Broken Support Library Download Workaround
View workaround.md

1. Go to %LOCALAPPDATA%\Xamarin

2. If it doesn't already exist, create a new folder named after the support library NuGet package, e.g. Xamarin.Android.Support.v4

3. Repeat for every support library package in your project:

4. Open the Xamarin Android SDK Manager and download the Android Support Repository (under Tools > Extras):

5. Go to [Android SDK location]\extras\android\m2repository\com\android\support and open the directory for the support library you need

6. Find the correct version and copy the entire folder to directory you created in step 2. The correct version is the one that matches or is nearest to the NuGet package version. For example, if the package version is 23.4.0.1 the support library version would be 23.4.0. If you did not create a folder in

@jimmgarrido
jimmgarrido / build task
Last active Apr 13, 2017
Forms build examples
View build task
<Target Name="AfterBuild">
<ItemGroup>
<AssemblyFiles Include="$(OutputPath)\*.dll;$(OutputPath)\*.pdb;$(OutputPath)\*.pri"/>
<XmlFile Include="$(OutputPath)\*.xr.xml" />
<RdFile Include="$(ProjectDir)\Properties\*.rd.xml"/>
</ItemGroup>
<Copy SourceFiles="@(AssemblyFiles)" DestinationFolder="C:\Users\jigarrid\Documents\_Xamarin Work\UWP Forms" />
<Copy SourceFiles="@(XmlFile)" DestinationFolder="C:\Users\jigarrid\Documents\_Xamarin Work\UWP Forms\Xamarin.Forms.Platform.UAP" />
<Copy SourceFiles="@(RdFile)" DestinationFolder="C:\Users\jigarrid\Documents\_Xamarin Work\UWP Forms\Xamarin.Forms.Platform.UAP\Properties" />
View CustomTabbedRenderer
using System;
using UIKit;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
using xamtabproblem.iOS;
[assembly:ExportRenderer(typeof(TabbedPage), typeof(CustomTabbedRenderer))]
namespace xamtabproblem.iOS
{
public class CustomTabbedRenderer : TabbedRenderer
@jimmgarrido
jimmgarrido / AdjustResize.md
Last active Dec 12, 2019
AdjustResize Workaround for Xamarin.Forms
View AdjustResize.md

Forms 2.3.3+

Uses the new Platform Specifics feature

protected override void OnCreate(Bundle bundle)
{
	ToolbarResource = Resource.Layout.toolbar;
	TabLayoutResource = Resource.Layout.tabs;

	base.OnCreate(bundle);