Skip to content

Instantly share code, notes, and snippets.

Avatar

Daniel Cazzulino kzu

View GitHub Profile
@kzu
kzu / gist:11154155
Created Apr 21, 2014
templates reference
View gist:11154155
<ProjectReference Include="..\Xamarin.QuickUI\Xamarin.QuickUI.VSTemplate\Xamarin.QuickUI.VSTemplate.csproj">
<Project>{57f94175-2001-4088-accf-f2fbdcb95638}</Project>
<Name>Xamarin.QuickUI.VSTemplate</Name>
<IncludeOutputGroupsInVSIX>BuiltProjectOutputGroup%3bPkgdefProjectOutputGroup%3bGetCopyToOutputDirectoryItems%3bSatelliteDllsProjectOutputGroup</IncludeOutputGroupsInVSIX>
<IncludeOutputGroupsInVSIXLocalOnly>DebugSymbolsProjectOutputGroup</IncludeOutputGroupsInVSIXLocalOnly>
</ProjectReference>
@kzu
kzu / Checkout
Created May 8, 2014
VsHelper.Checkout
View Checkout
/// <summary>
/// Checks-out the file from source control.
/// </summary>
public static void CheckOut(string fileName)
{
Guard.NotNullOrEmpty(() => fileName, fileName);
if (File.Exists(fileName))
{
var vs = ServiceProvider.GlobalProvider.GetService(typeof(EnvDTE.DTE)) as EnvDTE.DTE;
@kzu
kzu / CustomJsonNet
Created May 21, 2014
Json.NET Extensibility Example
View CustomJsonNet
namespace JsonExtensibility
{
public class JsonTests
{
[Fact]
public void when_serializing_itask_then_can_customize_properties ()
{
var serializer = new JsonSerializer {
Formatting = Formatting.Indented,
};
@kzu
kzu / test.proj
Created Jun 16, 2014
MSBuild supports non-quoted strings in conditions
View test.proj
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="Build">
<Message Condition="$(Message) != ''" Text="Message: $(Message)" />
</Target>
<Import Project="$(ProjectFile)" Condition="$(ProjectFile) != ''" />
</Project>
@kzu
kzu / DumpItems.targets
Last active Aug 29, 2015
Dump MSBuild Items
View DumpItems.targets
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask TaskName="DumpItems"
TaskFactory="CodeTaskFactory"
AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v$(MSBuildToolsVersion).dll">
<ParameterGroup>
<Items ParameterType="Microsoft.Build.Framework.ITaskItem[]" Required="true" />
</ParameterGroup>
<Task>
<Code Type="Fragment" Language="cs">
@kzu
kzu / MoveLaTrucha.md
Last active Aug 29, 2015
Move La Trucha demo
View MoveLaTrucha.md

Move La Trucha

This demo shows a dynamic view.

@kzu
kzu / msbuild.log
Created Jul 15, 2015
XBuild Returns
View msbuild.log
W:\>msbuild xbuild.proj
Microsoft (R) Build Engine version 12.0.31101.0
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 15/07/2015 12:53:04 p.m..
Project "W:\xbuild.proj" on node 1 (default targets).
Build:
Value: Foo
Done Building Project "W:\xbuild.proj" (default targets).
@kzu
kzu / GuidUtils.cs
Created Aug 2, 2010
Provides an easy way to create sequential guids
View GuidUtils.cs
using System;
using System.Runtime.InteropServices;
using System.Security;
public static class GuidUtil
{
[SuppressUnmanagedCodeSecurity]
[DllImport("rpcrt4.dll", SetLastError = true)]
private static extern int UuidCreateSequential(out Guid value);
@kzu
kzu / mtvs-setup
Created Sep 4, 2012
Missing files for setup
View mtvs-setup
D:\Code\Xamarin\AndroidVS\Setup\MonoTouch\Product.wxs(155,0): error LGHT0103: The system cannot find the file '..\..\Mono.IOS.VisualStudio\lib\MonoTouch.Dialog-1.dll'.
D:\Code\Xamarin\AndroidVS\Setup\MonoTouch\Product.wxs(156,0): error LGHT0103: The system cannot find the file '..\..\Mono.IOS.VisualStudio\lib\MonoTouch.Dialog-1.dll.mdb'.
D:\Code\Xamarin\AndroidVS\Setup\MonoTouch\Product.wxs(157,0): error LGHT0103: The system cannot find the file '..\..\Mono.IOS.VisualStudio\lib\monotouch.dll'.
D:\Code\Xamarin\AndroidVS\Setup\MonoTouch\Product.wxs(158,0): error LGHT0103: The system cannot find the file '..\..\Mono.IOS.VisualStudio\lib\monotouch.dll.mdb'.
D:\Code\Xamarin\AndroidVS\Setup\MonoTouch\Product.wxs(159,0): error LGHT0103: The system cannot find the file '..\..\Mono.IOS.VisualStudio\lib\MonoTouch.NUnitLite.dll'.
D:\Code\Xamarin\AndroidVS\Setup\MonoTouch\Product.wxs(160,0): error LGHT0103: The system cannot find the file '..\..\Mono.IOS.VisualStudio\lib\MonoTouch.NUnitLite.dll.mdb'.
D:\Code\Xamarin\Andr
@kzu
kzu / gist:3708340
Created Sep 12, 2012
Failed resource generation task
View gist:3708340
After hardcoding a fix to the GenerateResourceDesigner in the targets file with:
<GenerateResourceDesigner
IsApplication="true"
NetResgenOutputFile="$(ResgenTemporaryDirectory)\$(AndroidResgenFilename)"
JavaResgenInputFile="$(_GeneratedPrimaryJavaResgenFile)"
Namespace="$(AndroidResgenNamespace)"
Resources="@(_AndroidResourceDest)"
ResourceDirectory="$(MonoAndroidResDirIntermediate)"
/>