{"action":"created","issue":{"url":"https://api.github.com/repos/Crypt32/PSPKI/issues/39","repository_url":"https://api.github.com/repos/Crypt32/PSPKI","labels_url":"https://api.github.com/repos/Crypt32/PSPKI/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/Crypt32/PSPKI/issues/39/comments","events_url":"https://api.github.com/repos/Crypt32/PSPKI/issues/39/events","html_url":"https://github.com/Crypt32/PSPKI/issues/39","id":326845024,"node_id":"MDU6SXNzdWUzMjY4NDUwMjQ=","number":39,"title":"Importing the module on recent PowerShell versions fails with Update-TypeData errors","user":{"login":"pronichkin","id":17203954,"node_id":"MDQ6VXNlcjE3MjAzOTU0","avatar_url":"https://avatars2.githubusercontent.com/u/17203954?v=4","gravatar_id":"","url":"https://api.github.com/users/pronichkin","html_url":"https://github.com/pronichkin","followers_url":"https://api.github.com/users/pronichkin/followers","following_url":"https://api.github.com/users/pronichkin/following{/other_user}","gists_url":"https://api.github.com/users/pronichkin/gists{/gist_id}","starred_url":"https://api.github.com/users/pronichkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pronichkin/subscriptions","organizations_url":"https://api.github.com/users/pronichkin/orgs","repos_url":"https://api.github.com/users/pronichkin/repos","events_url":"https://api.github.com/users/pronichkin/events{/privacy}","received_events_url":"https://api.github.com/users/pronichkin/received_events","type":"User","site_admin":false},"labels":[{"id":364522827,"node_id":"MDU6TGFiZWwzNjQ1MjI4Mjc=","url":"https://api.github.com/repos/Crypt32/PSPKI/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-27T19:46:16Z","updated_at":"2018-09-09T09:13:55Z","closed_at":null,"author_association":"NONE","body":"OS: Windows 10 version 1803—or corresponding Windows Server version\r\nPowerShell version: built-in (5.1.17134.1)\r\n\r\nTrying to import the module fails with multitude of the following errors:\r\n\r\n`Update-TypeData : Error in TypeData \"System.Security.Cryptography.X509Certificates.X509Certificate2\": The member ResolvedExtensions is already present.\r\n`\r\n\r\n### workaround\r\ncomment out (or remove) the following block in `.psm1` file\r\n\r\n`if ($PSVersionTable[\"PSVersion\"].Major -gt 2) {\r\n    try {\r\n        Update-TypeData $PSScriptRoot\\Types\\PSPKI.Types.ps1xml\r\n        Update-FormatData $PSScriptRoot\\Types\\PSPKI.Format.ps1xml\r\n    } catch { }\r\n}\r\n`\r\n\r\nThis works, but breaks digital signature, hence not very useful."},"comment":{"url":"https://api.github.com/repos/Crypt32/PSPKI/issues/comments/419701723","html_url":"https://github.com/Crypt32/PSPKI/issues/39#issuecomment-419701723","issue_url":"https://api.github.com/repos/Crypt32/PSPKI/issues/39","id":419701723,"node_id":"MDEyOklzc3VlQ29tbWVudDQxOTcwMTcyMw==","user":{"login":"Crypt32","id":6384119,"node_id":"MDQ6VXNlcjYzODQxMTk=","avatar_url":"https://avatars1.githubusercontent.com/u/6384119?v=4","gravatar_id":"","url":"https://api.github.com/users/Crypt32","html_url":"https://github.com/Crypt32","followers_url":"https://api.github.com/users/Crypt32/followers","following_url":"https://api.github.com/users/Crypt32/following{/other_user}","gists_url":"https://api.github.com/users/Crypt32/gists{/gist_id}","starred_url":"https://api.github.com/users/Crypt32/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Crypt32/subscriptions","organizations_url":"https://api.github.com/users/Crypt32/orgs","repos_url":"https://api.github.com/users/Crypt32/repos","events_url":"https://api.github.com/users/Crypt32/events{/privacy}","received_events_url":"https://api.github.com/users/Crypt32/received_events","type":"User","site_admin":false},"created_at":"2018-09-09T09:13:55Z","updated_at":"2018-09-09T09:13:55Z","author_association":"OWNER","body":"Fixed in: https://github.com/Crypt32/PSPKI/commit/14fe2ebebf4998de49e76989694e6e78c4511fed"}}
{"actor":{"display_login":"Crypt32"}}