question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Type exposed using `InternalsVisibleTo` is not available when using `5.0.100-preview.6.20314.3` SDK

See original GitHub issue

PowerShell has a dependency on Microsoft.Management.Infrastructure.dll which has an internal type CimMofDeserializer. It has System.Management.Automation in the list of InternalsVisibleTo.

When trying to build System.Management.Automation we see the following errors:

D:\PSGit\PowerShell\src\System.Management.Automation\DscSupport\CimDSCParser.cs(323,17): error CS0122: 'CimMofDeserializer' is inaccessible due to its protection level [D:\PSGit\PowerShell\src\System.Management.Automation\System.Management.Automation.csproj]
D:\PSGit\PowerShell\src\System.Management.Automation\DscSupport\CimDSCParser.cs(324,17): error CS0122: 'CimMofDeserializer' is inaccessible due to its protection level [D:\PSGit\PowerShell\src\System.Management.Automation\System.Management.Automation.csproj]
D:\PSGit\PowerShell\src\System.Management.Automation\DscSupport\CimDSCParser.cs(327,31): error CS0122: 'CimMofDeserializer' is inaccessible due to its protection level [D:\PSGit\PowerShell\src\System.Management.Automation\System.Management.Automation.csproj]
D:\PSGit\PowerShell\src\System.Management.Automation\DscSupport\CimDSCParser.cs(335,31): error CS0122: 'CimMofDeserializer' is inaccessible due to its protection level [D:\PSGit\PowerShell\src\System.Management.Automation\System.Management.Automation.csproj]
D:\PSGit\PowerShell\src\System.Management.Automation\DscSupport\CimDSCParser.cs(335,129): error CS0122: 'MofDeserializerSchemaValidationOption' is inaccessible due to its protection level [D:\PSGit\PowerShell\src\System.Management.Automation\System.Management.Automation.csproj]

This only happens when we upgrade the SDK version from 5.0.100-preview.5.20279.10 to 5.0.100-preview.6.20314.3

Repro steps:

  1. Clone repository https://github.com/PowerShell/PowerShell.git
  2. Update the global.json file to have 5.0.100-preview.6.20314.3
  3. In PowerShell (on Windows), Import-Module build.psm1
  4. Start-PSBootstrap to install the Preview 6 SDK
  5. Start-PSBuild -Clean

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
jkoritzinskycommented, Jun 18, 2020

When we move the target we need to be careful that we still fail on rebuilds (that the incremental build output doesn’t cause us to skip the error or appear successful).

0reactions
marcpopMSFTcommented, Jun 25, 2020

Jeremy’s changed resolved this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found