{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/8217","repository_url":"https://api.github.com/repos/dotnet/roslyn","labels_url":"https://api.github.com/repos/dotnet/roslyn/issues/8217/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/8217/comments","events_url":"https://api.github.com/repos/dotnet/roslyn/issues/8217/events","html_url":"https://github.com/dotnet/roslyn/issues/8217","id":129345976,"number":8217,"title":"Cannot compile PDB on Mono - CS0041: Unexpected error writing debug information -- 'The method or operation is not implemented.'","user":{"login":"MAX-POLKOVNIK","id":8066100,"avatar_url":"https://avatars.githubusercontent.com/u/8066100?v=3","gravatar_id":"","url":"https://api.github.com/users/MAX-POLKOVNIK","html_url":"https://github.com/MAX-POLKOVNIK","followers_url":"https://api.github.com/users/MAX-POLKOVNIK/followers","following_url":"https://api.github.com/users/MAX-POLKOVNIK/following{/other_user}","gists_url":"https://api.github.com/users/MAX-POLKOVNIK/gists{/gist_id}","starred_url":"https://api.github.com/users/MAX-POLKOVNIK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MAX-POLKOVNIK/subscriptions","organizations_url":"https://api.github.com/users/MAX-POLKOVNIK/orgs","repos_url":"https://api.github.com/users/MAX-POLKOVNIK/repos","events_url":"https://api.github.com/users/MAX-POLKOVNIK/events{/privacy}","received_events_url":"https://api.github.com/users/MAX-POLKOVNIK/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/roslyn/labels/Area-Compilers","name":"Area-Compilers","color":"5319e7"},{"url":"https://api.github.com/repos/dotnet/roslyn/labels/Resolution-By%20Design","name":"Resolution-By Design","color":"cccccc"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-01-28T05:49:02Z","updated_at":"2016-03-05T16:50:59Z","closed_at":"2016-01-29T06:19:50Z","body":"There is sample: \r\n```\r\nusing System;\r\nusing System.IO;\r\nusing Microsoft.CodeAnalysis;\r\nusing Microsoft.CodeAnalysis.CSharp;\r\n\r\nnamespace TestR\r\n{\r\n\tclass MainClass\r\n\t{\r\n\t\tpublic static void Main (string[] args)\r\n\t\t{\r\n\t\t\tvar code = @\"\t\t\t\t\t\t \r\n\t\t\t\t\t\tnamespace TestR\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tclass MainClass\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tpublic static void AAA (string[] args)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\";\r\n            \r\n\t\t\tvar syntaxTree = CSharpSyntaxTree.ParseText(code);\r\n            \r\n\t\t\tvar references = new [] {\r\n\t\t\t\tMetadataReference.CreateFromFile (typeof(Type).Assembly.Location)\r\n\t\t\t};\r\n            \r\n\t\t\tvar compilation = CSharpCompilation.Create(\r\n\t\t\t\t\"assembly\",\r\n\t\t\t\tnew[] {syntaxTree},\r\n\t\t\t\treferences,\r\n\t\t\t\tnew CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary));\r\n\r\n\r\n\t\t\tusing (var ms = new MemoryStream ())\r\n\t\t\tusing (var pdbs = new MemoryStream ()) \r\n\t\t\t{\r\n\t\t\t\tvar result = compilation.Emit (ms, pdbs);\r\n\r\n\t\t\t\tif (!result.Success) \r\n\t\t\t\t{\r\n\t\t\t\t\tthrow new Exception (\"Not compiled: \" + result.Diagnostics[0]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tConsole.WriteLine (\"Compiled and saved\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n```\r\n\r\nBut if I remove pdbs from **compilation.Emit (ms, pdbs)** that will compile successfully.\r\nRunning without mono all works."},"comment":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/comments/192685445","html_url":"https://github.com/dotnet/roslyn/issues/8217#issuecomment-192685445","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/8217","id":192685445,"user":{"login":"isomorphisms","id":170678,"avatar_url":"https://avatars.githubusercontent.com/u/170678?v=3","gravatar_id":"","url":"https://api.github.com/users/isomorphisms","html_url":"https://github.com/isomorphisms","followers_url":"https://api.github.com/users/isomorphisms/followers","following_url":"https://api.github.com/users/isomorphisms/following{/other_user}","gists_url":"https://api.github.com/users/isomorphisms/gists{/gist_id}","starred_url":"https://api.github.com/users/isomorphisms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isomorphisms/subscriptions","organizations_url":"https://api.github.com/users/isomorphisms/orgs","repos_url":"https://api.github.com/users/isomorphisms/repos","events_url":"https://api.github.com/users/isomorphisms/events{/privacy}","received_events_url":"https://api.github.com/users/isomorphisms/received_events","type":"User","site_admin":false},"created_at":"2016-03-05T16:50:59Z","updated_at":"2016-03-05T16:50:59Z","body":"I am getting this error too."}}