internal static void SetId (SolutionItem item, string id) { MSBuildHandler handler = item.ItemHandler as MSBuildHandler; if (handler != null) handler.ItemId = id; else throw new InvalidOperationException ("Not an MSBuild project"); }