{"action":"created","issue":{"url":"https://api.github.com/repos/zpqrtbnk/Zbu.ModelsBuilder/issues/44","labels_url":"https://api.github.com/repos/zpqrtbnk/Zbu.ModelsBuilder/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/zpqrtbnk/Zbu.ModelsBuilder/issues/44/comments","events_url":"https://api.github.com/repos/zpqrtbnk/Zbu.ModelsBuilder/issues/44/events","html_url":"https://github.com/zpqrtbnk/Zbu.ModelsBuilder/issues/44","id":62665506,"number":44,"title":"Error when upgrading to 2.1.1.","user":{"login":"RichardEyres","id":566336,"avatar_url":"https://avatars.githubusercontent.com/u/566336?v=3","gravatar_id":"","url":"https://api.github.com/users/RichardEyres","html_url":"https://github.com/RichardEyres","followers_url":"https://api.github.com/users/RichardEyres/followers","following_url":"https://api.github.com/users/RichardEyres/following{/other_user}","gists_url":"https://api.github.com/users/RichardEyres/gists{/gist_id}","starred_url":"https://api.github.com/users/RichardEyres/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RichardEyres/subscriptions","organizations_url":"https://api.github.com/users/RichardEyres/orgs","repos_url":"https://api.github.com/users/RichardEyres/repos","events_url":"https://api.github.com/users/RichardEyres/events{/privacy}","received_events_url":"https://api.github.com/users/RichardEyres/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-18T11:20:18Z","updated_at":"2015-03-18T12:15:21Z","closed_at":null,"body":"Hello\r\n\r\nI originally posted this on the Umbraco Forums (https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/63255-Error-using-ZbuModelsBuilder-211).\r\n\r\nUpgraded to 2.1.1. (installed a fresh install on my VS2013 machine - needed to be rebuilt, and upgraded the package on my dev site).\r\nRan the external program as per the instructions - and the follow occurs.\r\n\r\nAny ideas?\r\n\r\n\r\n\r\n\r\nZbuModelsBuilder: ZbuModelsBuilder failed to generate code: Exception: Response status code does not indicate success (InternalServerError)\r\n\r\n{\"Message\":\"An error has occurred.\",\"ExceptionMessage\":\"Common Language Runtime detected an invalid program.\",\"ExceptionType\":\"System.InvalidProgramException\",\"StackTrace\":\"   at System.Collections.Immutable.SecurePooledObject`1.Use[TCaller](TCaller& caller)\\r\\n   at System.Collections.Immutable.SortedInt32KeyNode`1.Enumerator.PushLeft(SortedInt32KeyNode`1 node)\\r\\n   at System.Collections.Immutable.SortedInt32KeyNode`1.Enumerator..ctor(SortedInt32KeyNode`1 root)\\r\\n   at System.Collections.Immutable.ImmutableDictionary`2.Enumerator..ctor(SortedInt32KeyNode`1 root, Builder builder)\\r\\n   at System.Collections.Immutable.ImmutableDictionary`2.GetEnumerator()\\r\\n   at System.Collections.Immutable.ImmutableDictionary`2.System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey,TValue>>.CopyTo(KeyValuePair`2[] array, Int32 arrayIndex)\\r\\n   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)\\r\\n   at System.Linq.OrderedEnumerable`1.<GetEnumerator>d__0.MoveNext()\\r\\n   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()\\r\\n   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)\\r\\n   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)\\r\\n   at System.Collections.Immutable.ImmutableArray.CreateRange[T](IEnumerable`1 items)\\r\\n   at Microsoft.CodeAnalysis.CSharp.DeclarationTable.Cache.<>c__DisplayClass0.<_ctor>b__1()\\r\\n   at System.Lazy`1.CreateValue()\\r\\n   at System.Lazy`1.LazyInitValue()\\r\\n   at Microsoft.CodeAnalysis.CSharp.DeclarationTable.Cache.<_ctor>b__4()\\r\\n   at System.Lazy`1.CreateValue()\\r\\n   at System.Lazy`1.LazyInitValue()\\r\\n   at System.Lazy`1.get_Value()\\r\\n   at Microsoft.CodeAnalysis.CSharp.DeclarationTable.GetMergedReferenceDirectives()\\r\\n   at System.Lazy`1.CreateValue()\\r\\n   at System.Lazy`1.LazyInitValue()\\r\\n   at Microsoft.CodeAnalysis.CSharp.DeclarationTable.get_ReferenceDirectives()\\r\\n   at Microsoft.CodeAnalysis.CommonReferenceManager`2.GetCompilationReferences(TCompilation compilation, DiagnosticBag diagnostics, ImmutableArray`1& references, IDictionary`2& boundReferenceDirectives, ImmutableArray`1& referenceDirectiveLocations)\\r\\n   at Microsoft.CodeAnalysis.CommonReferenceManager`2.ResolveMetadataReferences(TCompilation compilation, ImmutableArray`1& references, IDictionary`2& boundReferenceDirectiveMap, ImmutableArray`1& boundReferenceDirectives, ImmutableArray`1& assemblies, ImmutableArray`1& modules, DiagnosticBag diagnostics)\\r\\n   at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.ReferenceManager.CreateAndSetSourceAssemblyFullBind(CSharpCompilation compilation)\\r\\n   at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.ReferenceManager.CreateSourceAssemblyForCompilation(CSharpCompilation compilation)\\r\\n   at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.get_SourceAssembly()\\r\\n   at Microsoft.CodeAnalysis.CSharp.SyntaxTreeSemanticModel.GetDeclaredNamespace(NamespaceDeclarationSyntax declarationSyntax)\\r\\n   at Microsoft.CodeAnalysis.CSharp.SyntaxTreeSemanticModel.GetDeclaredNamespaceOrType(CSharpSyntaxNode declarationSyntax)\\r\\n   at Microsoft.CodeAnalysis.CSharp.SyntaxTreeSemanticModel.GetDeclaredTypeMemberContainer(CSharpSyntaxNode memberDeclaration)\\r\\n   at Microsoft.CodeAnalysis.CSharp.SyntaxTreeSemanticModel.GetDeclaredSymbol(BaseTypeDeclarationSyntax declarationSyntax, CancellationToken cancellationToken)\\r\\n   at Zbu.ModelsBuilder.Building.CodeParser.<>c__DisplayClass8.<Parse>b__0(ClassDeclarationSyntax x)\\r\\n   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()\\r\\n   at Zbu.ModelsBuilder.Building.CodeParser.Parse(ParseResult disco, CSharpCompilation compilation, SyntaxTree tree)\\r\\n   at Zbu.ModelsBuilder.Building.CodeParser.Parse(IDictionary`2 files, IEnumerable`1 referencedAssemblies)\\r\\n   at Zbu.ModelsBuilder.AspNet.ModelsBuilderApiController.GetModels(GetModelsData data)\\r\\n   at lambda_method(Closure , Object , Object[] )\\r\\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass13.<GetExecutor>b__c(Object instance, Object[] methodParameters)\\r\\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)\\r\\n   at System.Threading.Tasks.TaskHelpers.RunSynchronously[TResult](Func`1 func, CancellationToken cancellationToken)\"}\r\n\r\nZbuModelsBuilder:    at Zbu.ModelsBuilder.AspNet.ModelsBuilderApi.EnsureSuccess(HttpResponseMessage result)\r\n\r\n   at Zbu.ModelsBuilder.AspNet.ModelsBuilderApi.GetModels(Dictionary`2 ourFiles, String modelsNamespace)\r\n\r\n   at Zbu.ModelsBuilder.CustomTool.CustomTool.ZbuModelsBuilder.GenerateRaw(String wszInputFilePath, String wszDefaultNamespace, IntPtr[] rgbOutputFileContents, UInt32& pcbOutput, String& errMsg)"},"comment":{"url":"https://api.github.com/repos/zpqrtbnk/Zbu.ModelsBuilder/issues/comments/82943497","html_url":"https://github.com/zpqrtbnk/Zbu.ModelsBuilder/issues/44#issuecomment-82943497","issue_url":"https://api.github.com/repos/zpqrtbnk/Zbu.ModelsBuilder/issues/44","id":82943497,"user":{"login":"zpqrtbnk","id":2846429,"avatar_url":"https://avatars.githubusercontent.com/u/2846429?v=3","gravatar_id":"","url":"https://api.github.com/users/zpqrtbnk","html_url":"https://github.com/zpqrtbnk","followers_url":"https://api.github.com/users/zpqrtbnk/followers","following_url":"https://api.github.com/users/zpqrtbnk/following{/other_user}","gists_url":"https://api.github.com/users/zpqrtbnk/gists{/gist_id}","starred_url":"https://api.github.com/users/zpqrtbnk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zpqrtbnk/subscriptions","organizations_url":"https://api.github.com/users/zpqrtbnk/orgs","repos_url":"https://api.github.com/users/zpqrtbnk/repos","events_url":"https://api.github.com/users/zpqrtbnk/events{/privacy}","received_events_url":"https://api.github.com/users/zpqrtbnk/received_events","type":"User","site_admin":false},"created_at":"2015-03-18T12:15:21Z","updated_at":"2015-03-18T12:15:21Z","body":"Might be related to Roslyn issue https://github.com/dotnet/roslyn/issues/968 - which is scheduled to be fixed in 1.0-rc2. Looking into it."}}