libgit2/libgit2sharp — pull request #438 by phkelley (2013-05-29 21:25:17+00:00)
Title: Generate a unique ID at compile time to work around a CLR bug

Alternative to #437 that generates a GUID at compile time and makes it accessible as a const String. The String is then used as the value for MarshalCookie on all custom marshaler declarations. The MarshalCookie is used in the hash key by the CLR when caching ICustomMarshalers. This will allow multiple LibGit2Sharp assemblies to co-exist and use custom marshalers.

The build task is not as clean as I would like it to be, because XBuild is limited in its functionality in a few ways. (We can't use inline C# code, for example, with the CodeTaskFactory.) I would prefer not to have the .DLL be checked into the repository, but it looks like the only way to get what we want here. Incremental build still works, too.