Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions RuleDocumentation/AvoidUsingDeprecatedManifestFields.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#AvoidUsingDeprecatedManifestFields
**Severity Level: Warning**


##Description

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any other manifest properties that were deprecated? Also were they deprecated in PS v 3.0?

PowerShell V5.0 introduced some new fields and replaced some old fields with in module manifest files (.psd1). Therefore, fields such as "ModuleToProcess" is replaced with "RootModule". Using the deprecated manifest fields will result in PSScriptAnalyzer warnings.

##How to Fix

To fix a violation of this, please replace "ModuleToProcess" with "RootModule".

##Example

Wrong:
```
ModuleToProcess ='psscriptanalyzer'

ModuleVersion = '1.0'
```

Correct:
```
RootModule ='psscriptanalyzer'

ModuleVersion = '1.0'
```