{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/1622","labels_url":"https://api.github.com/repos/dotnet/roslyn/issues/1622/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/1622/comments","events_url":"https://api.github.com/repos/dotnet/roslyn/issues/1622/events","html_url":"https://github.com/dotnet/roslyn/issues/1622","id":64639119,"number":1622,"title":"Should analyzers be disabled while compiling XAML MarkupCompilePass1?","user":{"login":"KirillOsenkov","id":679326,"avatar_url":"https://avatars.githubusercontent.com/u/679326?v=3","gravatar_id":"","url":"https://api.github.com/users/KirillOsenkov","html_url":"https://github.com/KirillOsenkov","followers_url":"https://api.github.com/users/KirillOsenkov/followers","following_url":"https://api.github.com/users/KirillOsenkov/following{/other_user}","gists_url":"https://api.github.com/users/KirillOsenkov/gists{/gist_id}","starred_url":"https://api.github.com/users/KirillOsenkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KirillOsenkov/subscriptions","organizations_url":"https://api.github.com/users/KirillOsenkov/orgs","repos_url":"https://api.github.com/users/KirillOsenkov/repos","events_url":"https://api.github.com/users/KirillOsenkov/events{/privacy}","received_events_url":"https://api.github.com/users/KirillOsenkov/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/Area-Compilers","name":"Area-Compilers","color":"5319e7"},{"url":"https://api.github.com/repos/dotnet/roslyn/labels/Area-External","name":"Area-External","color":"5319e7"},{"url":"https://api.github.com/repos/dotnet/roslyn/labels/Bug","name":"Bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-26T21:32:37Z","updated_at":"2015-03-26T21:37:10Z","closed_at":null,"body":"WPF (and other XAML flavors) has special magic to invoke the compiler twice (in two passes) – once for the .tmp_proj to produce an assembly that it can reflect upon, and the second is the real compiler invocation that receives the input that was calculated after pass1.\r\n\r\nThis is where it generates a temporary project to build:\r\nhttp://referencesource.microsoft.com/#XamlBuildTask/Microsoft/Build/Tasks/Xaml/GenerateTemporaryAssemblyTask.cs,87\r\n\r\nWe should probably be disabling the analyzers for .tmp_proj compilation. This will likely require changes to MSBuild targets/tasks."},"comment":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/comments/86728100","html_url":"https://github.com/dotnet/roslyn/issues/1622#issuecomment-86728100","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/1622","id":86728100,"user":{"login":"KirillOsenkov","id":679326,"avatar_url":"https://avatars.githubusercontent.com/u/679326?v=3","gravatar_id":"","url":"https://api.github.com/users/KirillOsenkov","html_url":"https://github.com/KirillOsenkov","followers_url":"https://api.github.com/users/KirillOsenkov/followers","following_url":"https://api.github.com/users/KirillOsenkov/following{/other_user}","gists_url":"https://api.github.com/users/KirillOsenkov/gists{/gist_id}","starred_url":"https://api.github.com/users/KirillOsenkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KirillOsenkov/subscriptions","organizations_url":"https://api.github.com/users/KirillOsenkov/orgs","repos_url":"https://api.github.com/users/KirillOsenkov/repos","events_url":"https://api.github.com/users/KirillOsenkov/events{/privacy}","received_events_url":"https://api.github.com/users/KirillOsenkov/received_events","type":"User","site_admin":false},"created_at":"2015-03-26T21:37:10Z","updated_at":"2015-03-26T21:37:10Z","body":"In fact, longer term we should avoid invoking the compiler during pass1 in the first place, we should retrieve whatever information is needed by XAML resource generation from the sources by using a lighter-weight Roslyn-based tool (I'm guessing even parsing should be sufficient). However this requires non-trivial changes to XAML targets and tasks."}}