Type exposed using `InternalsVisibleTo` is not available when using `5.0.100-preview.6.20314.3` SDK
See original GitHub issuePowerShell 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:
- Clone repository https://github.com/PowerShell/PowerShell.git
- Update the global.json file to have
5.0.100-preview.6.20314.3
- In PowerShell (on Windows),
Import-Module build.psm1
Start-PSBootstrap
to install the Preview 6 SDK- Start-PSBuild -Clean
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (14 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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).
Jeremy’s changed resolved this.