{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/2462","labels_url":"https://api.github.com/repos/dotnet/roslyn/issues/2462/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/2462/comments","events_url":"https://api.github.com/repos/dotnet/roslyn/issues/2462/events","html_url":"https://github.com/dotnet/roslyn/issues/2462","id":72657111,"number":2462,"title":"Analyzer written in C# throws NotSupportedException on VB UnitTest","user":{"login":"bkoelman","id":10324372,"avatar_url":"https://avatars.githubusercontent.com/u/10324372?v=3","gravatar_id":"","url":"https://api.github.com/users/bkoelman","html_url":"https://github.com/bkoelman","followers_url":"https://api.github.com/users/bkoelman/followers","following_url":"https://api.github.com/users/bkoelman/following{/other_user}","gists_url":"https://api.github.com/users/bkoelman/gists{/gist_id}","starred_url":"https://api.github.com/users/bkoelman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkoelman/subscriptions","organizations_url":"https://api.github.com/users/bkoelman/orgs","repos_url":"https://api.github.com/users/bkoelman/repos","events_url":"https://api.github.com/users/bkoelman/events{/privacy}","received_events_url":"https://api.github.com/users/bkoelman/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/roslyn/labels/Area-Analyzers","name":"Area-Analyzers","color":"5319e7"},{"url":"https://api.github.com/repos/dotnet/roslyn/labels/Bug","name":"Bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"jmarolf","id":9797472,"avatar_url":"https://avatars.githubusercontent.com/u/9797472?v=3","gravatar_id":"","url":"https://api.github.com/users/jmarolf","html_url":"https://github.com/jmarolf","followers_url":"https://api.github.com/users/jmarolf/followers","following_url":"https://api.github.com/users/jmarolf/following{/other_user}","gists_url":"https://api.github.com/users/jmarolf/gists{/gist_id}","starred_url":"https://api.github.com/users/jmarolf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmarolf/subscriptions","organizations_url":"https://api.github.com/users/jmarolf/orgs","repos_url":"https://api.github.com/users/jmarolf/repos","events_url":"https://api.github.com/users/jmarolf/events{/privacy}","received_events_url":"https://api.github.com/users/jmarolf/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/dotnet/roslyn/milestones/1","html_url":"https://github.com/dotnet/roslyn/milestones/1.0%20(stable)","labels_url":"https://api.github.com/repos/dotnet/roslyn/milestones/1/labels","id":937397,"number":1,"title":"1.0 (stable)","description":"This is our 1.0 Milestone. ","creator":{"login":"jaredpar","id":146967,"avatar_url":"https://avatars.githubusercontent.com/u/146967?v=3","gravatar_id":"","url":"https://api.github.com/users/jaredpar","html_url":"https://github.com/jaredpar","followers_url":"https://api.github.com/users/jaredpar/followers","following_url":"https://api.github.com/users/jaredpar/following{/other_user}","gists_url":"https://api.github.com/users/jaredpar/gists{/gist_id}","starred_url":"https://api.github.com/users/jaredpar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaredpar/subscriptions","organizations_url":"https://api.github.com/users/jaredpar/orgs","repos_url":"https://api.github.com/users/jaredpar/repos","events_url":"https://api.github.com/users/jaredpar/events{/privacy}","received_events_url":"https://api.github.com/users/jaredpar/received_events","type":"User","site_admin":false},"open_issues":125,"closed_issues":388,"state":"open","created_at":"2015-01-15T20:45:24Z","updated_at":"2015-05-15T20:47:19Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-05-02T14:57:42Z","updated_at":"2015-05-15T20:48:29Z","closed_at":null,"body":"Repro steps:\r\n- In VS2015 RC, create new project: Visual C#, Extensibility, Analyzer with Code Fix\r\n- On the generated analyzer class, replace existing attribute with:\r\n    `[DiagnosticAnalyzer(LanguageNames.CSharp, LanguageNames.VisualBasic)]`\r\n- In generated file UnitTests.cs, override `GetBasicDiagnosticAnalyzer` and return same analyzer\r\n- In the same file, add a test with some enquoted VB code and call `VerifyBasicDiagnostic(text);`\r\n\r\nExpected:\r\nRun the test and verify that no diagnostics are triggered.\r\n\r\nActual:\r\nSystem.NotSupportedException: The language 'Visual Basic' is not supported.\r\n\r\nResult StackTrace:\t\r\nat Microsoft.CodeAnalysis.Host.HostWorkspaceServices.GetLanguageServices(String languageName)\r\n   at Microsoft.CodeAnalysis.Host.Mef.MefWorkspaceServices.GetLanguageServices(String languageName)\r\n   at Microsoft.CodeAnalysis.Solution.AddProject(ProjectInfo projectInfo)\r\n   at Microsoft.CodeAnalysis.Solution.AddProject(ProjectId projectId, String name, String assemblyName, String language)\r\n   at TestHelper.DiagnosticVerifier.CreateProject(String[] sources, String language) in D:\\Bart\\Documents\\Visual Studio 2015\\Projects\\Analyzers\\ReadonlyFieldsInStructs\\ReadonlyFieldsInStructs\\ReadonlyFieldsInStructs.Test\\Helpers\\DiagnosticVerifier.Helper.cs:line 158\r\n   at TestHelper.DiagnosticVerifier.GetDocuments(String[] sources, String language) in D:\\Bart\\Documents\\Visual Studio 2015\\Projects\\Analyzers\\ReadonlyFieldsInStructs\\ReadonlyFieldsInStructs\\ReadonlyFieldsInStructs.Test\\Helpers\\DiagnosticVerifier.Helper.cs:line 123\r\n   at TestHelper.DiagnosticVerifier.GetSortedDiagnostics(String[] sources, String language, DiagnosticAnalyzer analyzer) in D:\\Bart\\Documents\\Visual Studio 2015\\Projects\\Analyzers\\ReadonlyFieldsInStructs\\ReadonlyFieldsInStructs\\ReadonlyFieldsInStructs.Test\\Helpers\\DiagnosticVerifier.Helper.cs:line 42\r\n   at TestHelper.DiagnosticVerifier.VerifyDiagnostics(String[] sources, String language, DiagnosticAnalyzer analyzer, DiagnosticResult[] expected) in D:\\Bart\\Documents\\Visual Studio 2015\\Projects\\Analyzers\\ReadonlyFieldsInStructs\\ReadonlyFieldsInStructs\\ReadonlyFieldsInStructs.Test\\Verifiers\\DiagnosticVerifier.cs:line 90\r\n   at TestHelper.DiagnosticVerifier.VerifyBasicDiagnostic(String source, DiagnosticResult[] expected) in D:\\Bart\\Documents\\Visual Studio 2015\\Projects\\Analyzers\\ReadonlyFieldsInStructs\\ReadonlyFieldsInStructs\\ReadonlyFieldsInStructs.Test\\Verifiers\\DiagnosticVerifier.cs:line 55"},"comment":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/comments/102522899","html_url":"https://github.com/dotnet/roslyn/issues/2462#issuecomment-102522899","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/2462","id":102522899,"user":{"login":"srivatsn","id":20570,"avatar_url":"https://avatars.githubusercontent.com/u/20570?v=3","gravatar_id":"","url":"https://api.github.com/users/srivatsn","html_url":"https://github.com/srivatsn","followers_url":"https://api.github.com/users/srivatsn/followers","following_url":"https://api.github.com/users/srivatsn/following{/other_user}","gists_url":"https://api.github.com/users/srivatsn/gists{/gist_id}","starred_url":"https://api.github.com/users/srivatsn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srivatsn/subscriptions","organizations_url":"https://api.github.com/users/srivatsn/orgs","repos_url":"https://api.github.com/users/srivatsn/repos","events_url":"https://api.github.com/users/srivatsn/events{/privacy}","received_events_url":"https://api.github.com/users/srivatsn/received_events","type":"User","site_admin":false},"created_at":"2015-05-15T20:48:29Z","updated_at":"2015-05-15T20:48:29Z","body":"We could add the C#\\VB references to the test projects. I don't think we want to do that for the analyzer projects because then that leads to loading the VB dlls in a C# project unnecessarily."}}