{"action":"closed","issue":{"url":"https://api.github.com/repos/aeroson/mcs-ICodeCompiler/issues/2","repository_url":"https://api.github.com/repos/aeroson/mcs-ICodeCompiler","labels_url":"https://api.github.com/repos/aeroson/mcs-ICodeCompiler/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/aeroson/mcs-ICodeCompiler/issues/2/comments","events_url":"https://api.github.com/repos/aeroson/mcs-ICodeCompiler/issues/2/events","html_url":"https://github.com/aeroson/mcs-ICodeCompiler/issues/2","id":156022642,"number":2,"title":"Compiling using CodeCompiler.CompileAssemblyFromSourceBatch() results in an exception","user":{"login":"Lypyl","id":11570942,"avatar_url":"https://avatars.githubusercontent.com/u/11570942?v=3","gravatar_id":"","url":"https://api.github.com/users/Lypyl","html_url":"https://github.com/Lypyl","followers_url":"https://api.github.com/users/Lypyl/followers","following_url":"https://api.github.com/users/Lypyl/following{/other_user}","gists_url":"https://api.github.com/users/Lypyl/gists{/gist_id}","starred_url":"https://api.github.com/users/Lypyl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lypyl/subscriptions","organizations_url":"https://api.github.com/users/Lypyl/orgs","repos_url":"https://api.github.com/users/Lypyl/repos","events_url":"https://api.github.com/users/Lypyl/events{/privacy}","received_events_url":"https://api.github.com/users/Lypyl/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-20T18:23:36Z","updated_at":"2016-05-21T21:38:29Z","closed_at":"2016-05-21T21:38:29Z","body":"> Error (101): The namespace `global::' already contains a definition for `Test'\r\n\r\nWhere Test is the name of one of the classes to be compiled (and no it's not already in the project).  \r\n\r\nIt doesn't throw an error if you compile only 1 source string at a time, and CompileAssemblyFromFileBatch() works fine with any number of files.\r\n\r\nThe best I've been able to determine what is happening is in CompileAssemblyFromSourceBatch(), the subsequent:\r\n\r\n`Func<Stream> getStream = () => { return new MemoryStream(Encoding.UTF8.GetBytes(source ?? \"\")); };`\r\n\r\noverwrite the previous MemoryStreams that are stored in source files, so all the source files end up with the same code."}}
{"actor":{"display_login":"aeroson"}}