Skip to content

Instantly share code, notes, and snippets.

View jbevain's full-sized avatar

Jb Evain jbevain

View GitHub Profile
using System;
using System.IO;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using UnityEngine;
using UnityEditor;
#if ENABLE_VSTU
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
index e09132e2798..aa109ebd70d 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
@@ -1786,6 +1786,11 @@ namespace Mono.Debugger.Soft
Send (CommandSet.VM, (int)CmdVM.STOP_BUFFERING);
}
+ internal VersionInfo VM_IsDeferred () {
+ var res = SendReceive (CommandSet.VM, (int)CmdVM.DEFERRED, null);
diff --git a/symbols/mdb/Mono.Cecil.Mdb/MdbReader.cs b/symbols/mdb/Mono.Cecil.Mdb/MdbReader.cs
index 05ab3fb..e55109f 100644
--- a/symbols/mdb/Mono.Cecil.Mdb/MdbReader.cs
+++ b/symbols/mdb/Mono.Cecil.Mdb/MdbReader.cs
@@ -94,7 +94,6 @@ static void ReadLocalVariables (MethodEntry entry, MethodBody body, Scope [] sco
void ReadLineNumbers (MethodEntry entry, InstructionMapper mapper)
{
- Document document = null;
var table = entry.GetLineNumberTable ();
using System;
struct Vector3
{
public float X, Y, Z;
public static bool operator true(Vector3 v)
{
return v.X != 0 && v.Y != 0 && v.Z != 0;
}
diff --git a/src/OmniSharp.MSBuild/MSBuildProjectSystem.cs b/src/OmniSharp.MSBuild/MSBuildProjectSystem.cs
index 3ebdeb9..66c8236 100644
--- a/src/OmniSharp.MSBuild/MSBuildProjectSystem.cs
+++ b/src/OmniSharp.MSBuild/MSBuildProjectSystem.cs
@@ -134,6 +134,12 @@ public void Initalize(IConfiguration configuration)
compilationOptions = compilationOptions.WithAllowUnsafe(true);
}
+ if (projectFileInfo.SignAssembly && !string.IsNullOrEmpty(projectFileInfo.AssemblyOriginatorKeyFile))
+ {

#The hacky way of getting VS to provide syntax highlighting for Unity's compute shaders.

  1. Turn off Visual Studio

  2. In C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\VC

As administrator, remove the read-only flag on the file VC_Pkg_Core_Registration.pkgdef, and edit it in a evelated text editor.

  1. Search for .cginc, and for each cginc entry in the file, add a similar entry for .compute. Like this:
using System;
using Mono.Cecil;
class AssemblyRenamer
{
private static void Main(string[] args)
{
var file = args[0];
var newName = args[1];
@jbevain
jbevain / README.md
Last active January 12, 2025 14:33
pdb2mdb for Visual Studio 2015

The Visual Studio Tools for Unity are able to convert .NET debug symbol files (namely pdb files) to debug symbols files that are understood by Unity's scripting engine (namely .dll.mdb files) when importing both the .dll and the .pdb in the Assets folder.

If you prefer to handle the conversion yourself you need to call a tool named pdb2mdb on the .dll associated with the .pdb:

pdb2mdb MyLibrary.dll

Will produce a MyLibrary.dll.mdb usable on Unity if MyLibrary.pdb is present.

@jbevain
jbevain / TinySwitch.cs
Last active August 29, 2015 14:20
Switch opcode size analyser for CoreCLR #918
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Mono.Cecil;
using Mono.Cecil.Cil;
namespace TinySwitch
{
class Program
using System;
class Program
{
static void Main()
{
Console.WriteLine("Hello, CoreCLR!");
}
}