{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/cli/issues/1303","repository_url":"https://api.github.com/repos/dotnet/cli","labels_url":"https://api.github.com/repos/dotnet/cli/issues/1303/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/cli/issues/1303/comments","events_url":"https://api.github.com/repos/dotnet/cli/issues/1303/events","html_url":"https://github.com/dotnet/cli/issues/1303","id":132302455,"number":1303,"title":"Preserve compilation context unusable for test projects","user":{"login":"JunTaoLuo","id":2030323,"avatar_url":"https://avatars.githubusercontent.com/u/2030323?v=3","gravatar_id":"","url":"https://api.github.com/users/JunTaoLuo","html_url":"https://github.com/JunTaoLuo","followers_url":"https://api.github.com/users/JunTaoLuo/followers","following_url":"https://api.github.com/users/JunTaoLuo/following{/other_user}","gists_url":"https://api.github.com/users/JunTaoLuo/gists{/gist_id}","starred_url":"https://api.github.com/users/JunTaoLuo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JunTaoLuo/subscriptions","organizations_url":"https://api.github.com/users/JunTaoLuo/orgs","repos_url":"https://api.github.com/users/JunTaoLuo/repos","events_url":"https://api.github.com/users/JunTaoLuo/events{/privacy}","received_events_url":"https://api.github.com/users/JunTaoLuo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/cli/labels/blocking-partner","name":"blocking-partner","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-09T01:02:29Z","updated_at":"2016-02-09T20:44:19Z","closed_at":null,"body":"If a test assembly requires preserving compilation context and it is run via the xunit test runner, the compilation context will not be found since the entry point assembly was the xunit runner. \r\n\r\nFor example, I ran into this issue in https://github.com/aspnet/Performance/pull/26. The test `Microbenchmarks.Tests.Mvc.MvcRoutingTests.RouteToAction` requires dynamic compilation since it has a view to render. However, even if you set the `preserveCompilationContext` flag in `project.json` of the `Microbenchmarks.Tests`, running the test will produce the exception \"System.InvalidOperationException : Entry assembly was compiled without `preserveCompilationContext` enabled\". You may want to set the fields `Iteration = 1, WarmupIterations = 0` on the `Benchmarks` attribute to avoid the spew.\r\n\r\ncc @davidfowl @pakrym "},"comment":{"url":"https://api.github.com/repos/dotnet/cli/issues/comments/182055680","html_url":"https://github.com/dotnet/cli/issues/1303#issuecomment-182055680","issue_url":"https://api.github.com/repos/dotnet/cli/issues/1303","id":182055680,"user":{"login":"muratg","id":1808428,"avatar_url":"https://avatars.githubusercontent.com/u/1808428?v=3","gravatar_id":"","url":"https://api.github.com/users/muratg","html_url":"https://github.com/muratg","followers_url":"https://api.github.com/users/muratg/followers","following_url":"https://api.github.com/users/muratg/following{/other_user}","gists_url":"https://api.github.com/users/muratg/gists{/gist_id}","starred_url":"https://api.github.com/users/muratg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muratg/subscriptions","organizations_url":"https://api.github.com/users/muratg/orgs","repos_url":"https://api.github.com/users/muratg/repos","events_url":"https://api.github.com/users/muratg/events{/privacy}","received_events_url":"https://api.github.com/users/muratg/received_events","type":"User","site_admin":false},"created_at":"2016-02-09T20:44:19Z","updated_at":"2016-02-09T20:44:19Z","body":"Marking as `blocking-partner` as I believe this blocks some ASP.NET repos from building."}}