{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/PTVS/pulls/comments/71612016","id":71612016,"diff_hunk":"@@ -64,9 +67,33 @@ partial class PythonUwpProject :\n         /// information from the project)\n         /// </summary>\n         protected override void InitializeForOuter(string fileName, string location, string name, uint flags, ref Guid guidProject, out bool cancel) {\n+            var pythonProject = this.GetProject().GetPythonProject();\n+            var msbuildProject = pythonProject.GetMSBuildProjectInstance();\n+            msbuildProject.Build(\"CreatePythonUwpIoTPythonEnv\", null);\n+\n+            var sitePackagesDir = Path.Combine(pythonProject.ProjectDirectory, PythonUwpConstants.InterpreterRelativePath, PythonUwpConstants.InterpreterLibPath, \"site-packages\");\n+            var sitePackageDirInfo = new DirectoryInfo(sitePackagesDir);\n+            if (sitePackageDirInfo.Exists) {\n+                sitePackageWatcher = new FileSystemWatcher {\n+                    IncludeSubdirectories = true,\n+                    Path = sitePackagesDir,\n+                };\n+\n+                sitePackageWatcher.Created += SitePackageWatcher_Changed;\n+                sitePackageWatcher.Changed += SitePackageWatcher_Changed;\n+                sitePackageWatcher.Deleted += SitePackageWatcher_Changed;\n+                sitePackageWatcher.Renamed += SitePackageWatcher_Changed;\n+                sitePackageWatcher.EnableRaisingEvents = true;\n+            }\n+\n             base.InitializeForOuter(fileName, location, name, flags, ref guidProject, out cancel);\n         }\n \n+        private void SitePackageWatcher_Changed(object sender, System.IO.FileSystemEventArgs e) {\n+            var bps = this._innerProject as IVsBuildPropertyStorage;","path":"Python/Product/Uwp/Project/PythonUwpProject.cs","position":51,"original_position":51,"commit_id":"483961b851a5c8897d37eefbaa2c4e06f00195aa","original_commit_id":"483961b851a5c8897d37eefbaa2c4e06f00195aa","user":{"login":"zooba","id":1693688,"avatar_url":"https://avatars.githubusercontent.com/u/1693688?v=3","gravatar_id":"","url":"https://api.github.com/users/zooba","html_url":"https://github.com/zooba","followers_url":"https://api.github.com/users/zooba/followers","following_url":"https://api.github.com/users/zooba/following{/other_user}","gists_url":"https://api.github.com/users/zooba/gists{/gist_id}","starred_url":"https://api.github.com/users/zooba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zooba/subscriptions","organizations_url":"https://api.github.com/users/zooba/orgs","repos_url":"https://api.github.com/users/zooba/repos","events_url":"https://api.github.com/users/zooba/events{/privacy}","received_events_url":"https://api.github.com/users/zooba/received_events","type":"User","site_admin":false},"body":"Practically everything that goes through an `IVs*` interface is going to assume that it's running on the UI thread. It's very likely that any dictionary accesses behind this aren't synchronized, which means you'll get random NullReferenceExceptions (on a background thread, which will instantly terminate VS).\r\n\r\nUnless you can step through this and show that it's always hitting a code path that is synchronized. In that case, you should be able to use a hard cast since the incoming object must always support the interface.","created_at":"2016-07-20T21:40:45Z","updated_at":"2016-07-20T21:40:45Z","html_url":"https://github.com/Microsoft/PTVS/pull/1450#discussion_r71612016","pull_request_url":"https://api.github.com/repos/Microsoft/PTVS/pulls/1450","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/PTVS/pulls/comments/71612016"},"html":{"href":"https://github.com/Microsoft/PTVS/pull/1450#discussion_r71612016"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/PTVS/pulls/1450"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/PTVS/pulls/1450","id":78103063,"html_url":"https://github.com/Microsoft/PTVS/pull/1450","diff_url":"https://github.com/Microsoft/PTVS/pull/1450.diff","patch_url":"https://github.com/Microsoft/PTVS/pull/1450.patch","issue_url":"https://api.github.com/repos/Microsoft/PTVS/issues/1450","number":1450,"state":"open","locked":false,"title":"Adding PIP support for PythonUWP projects","user":{"login":"alanch-ms","id":14812956,"avatar_url":"https://avatars.githubusercontent.com/u/14812956?v=3","gravatar_id":"","url":"https://api.github.com/users/alanch-ms","html_url":"https://github.com/alanch-ms","followers_url":"https://api.github.com/users/alanch-ms/followers","following_url":"https://api.github.com/users/alanch-ms/following{/other_user}","gists_url":"https://api.github.com/users/alanch-ms/gists{/gist_id}","starred_url":"https://api.github.com/users/alanch-ms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alanch-ms/subscriptions","organizations_url":"https://api.github.com/users/alanch-ms/orgs","repos_url":"https://api.github.com/users/alanch-ms/repos","events_url":"https://api.github.com/users/alanch-ms/events{/privacy}","received_events_url":"https://api.github.com/users/alanch-ms/received_events","type":"User","site_admin":false},"body":"- Move PythonUWP templates under \"Windows IoT Core\" (same as 2.2.x)\r\n- Fix up PythonUWP msi projects\r\n- Enable per-project interpreter for PythonUWP projects\r\n- Added Uwp.Wizard to detect the version of PythonUWP sdk\r\n- Added msbuild targets to support packages files from site-packages to the appx\r\n","created_at":"2016-07-20T07:55:16Z","updated_at":"2016-07-20T21:40:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"489212222a2e801ca4b77d4088955e12a7ee7508","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/PTVS/pulls/1450/commits","review_comments_url":"https://api.github.com/repos/Microsoft/PTVS/pulls/1450/comments","review_comment_url":"https://api.github.com/repos/Microsoft/PTVS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/PTVS/issues/1450/comments","statuses_url":"https://api.github.com/repos/Microsoft/PTVS/statuses/483961b851a5c8897d37eefbaa2c4e06f00195aa","head":{"label":"alanch-ms:IoT","ref":"IoT","sha":"483961b851a5c8897d37eefbaa2c4e06f00195aa","user":{"login":"alanch-ms","id":14812956,"avatar_url":"https://avatars.githubusercontent.com/u/14812956?v=3","gravatar_id":"","url":"https://api.github.com/users/alanch-ms","html_url":"https://github.com/alanch-ms","followers_url":"https://api.github.com/users/alanch-ms/followers","following_url":"https://api.github.com/users/alanch-ms/following{/other_user}","gists_url":"https://api.github.com/users/alanch-ms/gists{/gist_id}","starred_url":"https://api.github.com/users/alanch-ms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alanch-ms/subscriptions","organizations_url":"https://api.github.com/users/alanch-ms/orgs","repos_url":"https://api.github.com/users/alanch-ms/repos","events_url":"https://api.github.com/users/alanch-ms/events{/privacy}","received_events_url":"https://api.github.com/users/alanch-ms/received_events","type":"User","site_admin":false},"repo":{"id":43521420,"name":"PTVS","full_name":"alanch-ms/PTVS","owner":{"login":"alanch-ms","id":14812956,"avatar_url":"https://avatars.githubusercontent.com/u/14812956?v=3","gravatar_id":"","url":"https://api.github.com/users/alanch-ms","html_url":"https://github.com/alanch-ms","followers_url":"https://api.github.com/users/alanch-ms/followers","following_url":"https://api.github.com/users/alanch-ms/following{/other_user}","gists_url":"https://api.github.com/users/alanch-ms/gists{/gist_id}","starred_url":"https://api.github.com/users/alanch-ms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alanch-ms/subscriptions","organizations_url":"https://api.github.com/users/alanch-ms/orgs","repos_url":"https://api.github.com/users/alanch-ms/repos","events_url":"https://api.github.com/users/alanch-ms/events{/privacy}","received_events_url":"https://api.github.com/users/alanch-ms/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alanch-ms/PTVS","description":"Python Tools for Visual Studio","fork":true,"url":"https://api.github.com/repos/alanch-ms/PTVS","forks_url":"https://api.github.com/repos/alanch-ms/PTVS/forks","keys_url":"https://api.github.com/repos/alanch-ms/PTVS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alanch-ms/PTVS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alanch-ms/PTVS/teams","hooks_url":"https://api.github.com/repos/alanch-ms/PTVS/hooks","issue_events_url":"https://api.github.com/repos/alanch-ms/PTVS/issues/events{/number}","events_url":"https://api.github.com/repos/alanch-ms/PTVS/events","assignees_url":"https://api.github.com/repos/alanch-ms/PTVS/assignees{/user}","branches_url":"https://api.github.com/repos/alanch-ms/PTVS/branches{/branch}","tags_url":"https://api.github.com/repos/alanch-ms/PTVS/tags","blobs_url":"https://api.github.com/repos/alanch-ms/PTVS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alanch-ms/PTVS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alanch-ms/PTVS/git/refs{/sha}","trees_url":"https://api.github.com/repos/alanch-ms/PTVS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alanch-ms/PTVS/statuses/{sha}","languages_url":"https://api.github.com/repos/alanch-ms/PTVS/languages","stargazers_url":"https://api.github.com/repos/alanch-ms/PTVS/stargazers","contributors_url":"https://api.github.com/repos/alanch-ms/PTVS/contributors","subscribers_url":"https://api.github.com/repos/alanch-ms/PTVS/subscribers","subscription_url":"https://api.github.com/repos/alanch-ms/PTVS/subscription","commits_url":"https://api.github.com/repos/alanch-ms/PTVS/commits{/sha}","git_commits_url":"https://api.github.com/repos/alanch-ms/PTVS/git/commits{/sha}","comments_url":"https://api.github.com/repos/alanch-ms/PTVS/comments{/number}","issue_comment_url":"https://api.github.com/repos/alanch-ms/PTVS/issues/comments{/number}","contents_url":"https://api.github.com/repos/alanch-ms/PTVS/contents/{+path}","compare_url":"https://api.github.com/repos/alanch-ms/PTVS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alanch-ms/PTVS/merges","archive_url":"https://api.github.com/repos/alanch-ms/PTVS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alanch-ms/PTVS/downloads","issues_url":"https://api.github.com/repos/alanch-ms/PTVS/issues{/number}","pulls_url":"https://api.github.com/repos/alanch-ms/PTVS/pulls{/number}","milestones_url":"https://api.github.com/repos/alanch-ms/PTVS/milestones{/number}","notifications_url":"https://api.github.com/repos/alanch-ms/PTVS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alanch-ms/PTVS/labels{/name}","releases_url":"https://api.github.com/repos/alanch-ms/PTVS/releases{/id}","deployments_url":"https://api.github.com/repos/alanch-ms/PTVS/deployments","created_at":"2015-10-01T21:11:12Z","updated_at":"2015-10-01T21:11:28Z","pushed_at":"2016-07-20T07:36:49Z","git_url":"git://github.com/alanch-ms/PTVS.git","ssh_url":"git@github.com:alanch-ms/PTVS.git","clone_url":"https://github.com/alanch-ms/PTVS.git","svn_url":"https://github.com/alanch-ms/PTVS","homepage":"https://microsoft.github.io/PTVS","size":152011,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"ec809db0b6e6d41de793b121f94a7f267adafdd2","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":32487763,"name":"PTVS","full_name":"Microsoft/PTVS","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/PTVS","description":"Python Tools for Visual Studio","fork":false,"url":"https://api.github.com/repos/Microsoft/PTVS","forks_url":"https://api.github.com/repos/Microsoft/PTVS/forks","keys_url":"https://api.github.com/repos/Microsoft/PTVS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/PTVS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/PTVS/teams","hooks_url":"https://api.github.com/repos/Microsoft/PTVS/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/PTVS/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/PTVS/events","assignees_url":"https://api.github.com/repos/Microsoft/PTVS/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/PTVS/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/PTVS/tags","blobs_url":"https://api.github.com/repos/Microsoft/PTVS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/PTVS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/PTVS/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/PTVS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/PTVS/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/PTVS/languages","stargazers_url":"https://api.github.com/repos/Microsoft/PTVS/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/PTVS/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/PTVS/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/PTVS/subscription","commits_url":"https://api.github.com/repos/Microsoft/PTVS/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/PTVS/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/PTVS/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/PTVS/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/PTVS/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/PTVS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/PTVS/merges","archive_url":"https://api.github.com/repos/Microsoft/PTVS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/PTVS/downloads","issues_url":"https://api.github.com/repos/Microsoft/PTVS/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/PTVS/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/PTVS/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/PTVS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/PTVS/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/PTVS/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/PTVS/deployments","created_at":"2015-03-18T22:30:53Z","updated_at":"2016-07-20T14:03:16Z","pushed_at":"2016-07-20T19:26:01Z","git_url":"git://github.com/Microsoft/PTVS.git","ssh_url":"git@github.com:Microsoft/PTVS.git","clone_url":"https://github.com/Microsoft/PTVS.git","svn_url":"https://github.com/Microsoft/PTVS","homepage":"https://microsoft.github.io/PTVS","size":153270,"stargazers_count":1168,"watchers_count":1168,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":307,"mirror_url":null,"open_issues_count":505,"forks":307,"open_issues":505,"watchers":1168,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/PTVS/pulls/1450"},"html":{"href":"https://github.com/Microsoft/PTVS/pull/1450"},"issue":{"href":"https://api.github.com/repos/Microsoft/PTVS/issues/1450"},"comments":{"href":"https://api.github.com/repos/Microsoft/PTVS/issues/1450/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/PTVS/pulls/1450/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/PTVS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/PTVS/pulls/1450/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/PTVS/statuses/483961b851a5c8897d37eefbaa2c4e06f00195aa"}}}}
{"actor":{"display_login":"zooba"}}