Title: 'Add-Type' produces different assemblies when running the same source code multiple times in PS Core · Issue #5515 · PowerShell/PowerShell · GitHub
Open Graph Title: 'Add-Type' produces different assemblies when running the same source code multiple times in PS Core · Issue #5515 · PowerShell/PowerShell
X Title: 'Add-Type' produces different assemblies when running the same source code multiple times in PS Core · Issue #5515 · PowerShell/PowerShell
Description: On Windows PowerShell, Add-Type returns the same assembly when running it multiple times with the same source code. While on PowerShell Core, Add-Type returns different assemblies when running it multiple times with the same source code....
Open Graph Description: On Windows PowerShell, Add-Type returns the same assembly when running it multiple times with the same source code. While on PowerShell Core, Add-Type returns different assemblies when running it m...
X Description: On Windows PowerShell, Add-Type returns the same assembly when running it multiple times with the same source code. While on PowerShell Core, Add-Type returns different assemblies when running it m...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/5515
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"'Add-Type' produces different assemblies when running the same source code multiple times in PS Core","articleBody":"On Windows PowerShell, `Add-Type` returns the same assembly when running it multiple times with the same source code.\r\nWhile on PowerShell Core, `Add-Type` returns different assemblies when running it multiple times with the same source code.\r\n\r\nSteps to reproduce\r\n------------------\r\n\r\n```powershell\r\n\u003e $code = @'\r\npublic class Foo {\r\n public string Name = \"name\";\r\n}\r\n'@\r\n\u003e (Add-Type $code -PassThru).Assembly.FullName\r\n```\r\n\r\nExpected behavior\r\n-----------------\r\nLike on Windows PowerShell, the same assembly is returned when using the same source code.\r\n```powershell\r\n\u003e (Add-Type $code -PassThru).Assembly.FullName\r\n4woxc1pb, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null\r\n\u003e (Add-Type $code -PassThru).Assembly.FullName\r\n4woxc1pb, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null\r\n\u003e (Add-Type $code -PassThru).Assembly.FullName\r\n4woxc1pb, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null\r\n```\r\n\r\nActual behavior\r\n---------------\r\n\r\n```powershell\r\n\u003e (Add-Type $code -PassThru).Assembly.FullName\r\nz4vydr0b.yke, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null\r\n\u003e (Add-Type $code -PassThru).Assembly.FullName\r\ngyos43ig.yjb, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null\r\n\u003e (Add-Type $code -PassThru).Assembly.FullName\r\nwsxcciz3.544, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null\r\n```\r\n\r\nEnvironment data\r\n----------------\r\n\r\n\u003c!-- provide the output of $PSVersionTable --\u003e\r\n\r\n```powershell\r\n\u003e $PSVersionTable\r\nName Value\r\n---- -----\r\nPSVersion 6.0.0-rc\r\nPSEdition Core\r\nGitCommitId v6.0.0-rc-3-g5702081ae6d116455f6cff30e7b509abf21ae609\r\nOS Microsoft Windows 10.0.15063\r\nPlatform Win32NT\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\nWSManStackVersion 3.0\r\n```\r\n","author":{"url":"https://github.com/daxian-dbw","@type":"Person","name":"daxian-dbw"},"datePublished":"2017-11-21T01:50:17.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/5515/PowerShell/issues/5515"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5eddd039-b835-3498-7b29-918361b95cf3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8106:397D2A:1FB5031:2D88487:6A58E7E8 |
| html-safe-nonce | 41f859f610b2ec4a8f6709562ec760c8f7da2f2208914b643c1cf4435315ef2b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MTA2OjM5N0QyQToxRkI1MDMxOjJEODg0ODc6NkE1OEU3RTgiLCJ2aXNpdG9yX2lkIjoiNTY0MzE0ODE4MTg1NDgwODA0MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 74b9e138ed674e65dc4c89dc702ae938c775759436023ee24051264439a744c1 |
| hovercard-subject-tag | issue:275558565 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/5515/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5e32df842491e0ed60b5c2625a3ccff4525b7c5a80b4d6f50800a95ef605b630/PowerShell/PowerShell/issues/5515 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5e32df842491e0ed60b5c2625a3ccff4525b7c5a80b4d6f50800a95ef605b630/PowerShell/PowerShell/issues/5515 |
| og:image:alt | On Windows PowerShell, Add-Type returns the same assembly when running it multiple times with the same source code. While on PowerShell Core, Add-Type returns different assemblies when running it m... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | daxian-dbw |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f2a0c7865178af3d91dd9f13b0cdfc3c73a2529c873d2780bb4c01271a57ec6 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8aae7b8d6caacacf5c66eaeb2702d8dc88d85b4a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width