Skip to content

Generate_Conceptual_Help: Creates additional CIM class definitions #27

@johlju

Description

@johlju

Details of the scenario you tried and the problem that is occurring

This was discovered when triaging issue #26.

When running the build task there are additional CIM clss definitions created linked to temporary files.

ERROR: A second CIM class definition for 'MSFT_xDnsServerConditionalForwarder' was found while processing the schema file 'C:\Users\JOHAN~1.LJU\AppData\Local\Temp\DscMofHelper_18a4e1cb-5944-4ca4-adf1-63a4dcaa7fdb.tmp'. This class was already defined in the file(s) 'C:\Users\JOHAN~1.LJU\AppData\Local\Temp\DscMofHelper_6c51dbaf-ba93-4d88-8f36-b6a85fc5aa0e.tmp,C:\Users\JOHAN~1.LJU\AppData\Local\Temp\DscMofHelper_d5588485-e327-412b-abdc-d2c8a950fee2.tmp,C:\Users\JOHAN~1.LJU\AppData\Local\Temp\DscMofHelper_2e9e6ee5-ae42-4c62-910c-e943f7487c69.tmp,C:\Users\JOHAN~1.LJU\AppData\Local\Temp\DscMofHelper_914e5a1a-eb8b-4036-9f6d-82797d62ecd4.tmp,C:\Users\JOHAN~1.LJU\AppData\Local\Temp\DscMofHelper_2bcb41fe-7625-4bdb-bdf5-250d1d02ef70.tmp'. Remove the redundant definition, and then try again.
At C:\source\xDnsServer\output\RequiredModules\DscResource.DocGenerator\0.4.0\DscResource.DocGenerator.psm1:505 char:9

Steps to reproduce the problem

Unsure. Might be when debugging Get-MofSchema and stopping the debug session without letting the code run through which maybe let it clean after it self. I got these errors after triaging issue #26 and after I fixed the double whitespace issue mentioned in that issue..

Although, when running the build step multiple times in a row it seemed to "repair" it self step by step, and after like the 6-7 run I cannot reproduce it no longer.

Expected behavior

For it to not throw an error for this error.

Current behavior

Do throw this error (at least when quick-fix for issue #26 is present).

Suggested solution to the issue

Maybe we can forcibly remove the CIM class definition before removing the temporary file?

The operating system the target node is running

Windows 10

Version and build of PowerShell the target node is running

Name                           Value
----                           -----
PSVersion                      7.0.0
PSEdition                      Core
GitCommitId                    7.0.0
OS                             Microsoft Windows 10.0.19041
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Version of the module that was used

0.4.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs more informationThe issue needs more information from the author or the community.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions