Object reference not set to an instance of an object.
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- powershell
- Ambito
- devtools
Direzione di ricerca
Inizia riproducendo l’errore di riferimento null con il modulo PowerShell segnalato e PSScriptAnalyzer 1.21.0, confrontando le esecuzioni normali e -Verbose di Invoke-ScriptAnalyzer. Restringi il problema a una funzione o a un’operazione specifica dell’analizzatore usando le versioni del modulo e dello strumento di build elencate nel report; il lavoro è completato quando la causa è stata identificata e l’eccezione viene impedita senza richiedere un output dettagliato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Good morning,
I have a PowerShell module at work with almost 400 functions. Recently I switched from PSScriptAnalyzer version 1.13.0 to version 1.21.0, fixed a lot of problems, but I have one left. On random functions I get the error:
Exception: Object reference not set to an instance of an object.
If I use the Invoke-ScriptAnalyzer function with the -Verbose switch, the error does not occur. I discovered this by accident while looking for which function is causing the error.
Please advise how to trace the cause.
Somewhere I found information that this can be caused by the Export-ModuleMember function, but I don't want to get rid of it because I would have to fiddle with building the manifest file and that's how Psake does it for me.
For building and checking a powershell module I use
TeamCity and
Psake = '4.9.0'
Pester = '5.3.3'
BuildHelpers = '2.0.16'
PSScriptAnalyzer = '1.21.0'
PSDepend = '0.3.8'

- Lingua principale
- C#
- Stelle
- 2.2k
- Fork
- 415
- Merge medio
- 13h 1m
- PR unite (30g)
- 2
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di PowerShell/PSScriptAnalyzer
-
Up-for-Grabs
Difficoltà 1/5 1-3 ore Idoneità per principianti 78/100
PowerShell/PSScriptAnalyzer#2213 · 2 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
PowerShell/PSScriptAnalyzer#2217 · 1 commento ·
-
PSUseConsistentIndentation double-indents attribute bodies that open a scriptblock (`[Attr({ … })]`) Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 70/100
PowerShell/PSScriptAnalyzer#2216 · 2 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
PowerShell/PSScriptAnalyzer#2211 ·
-
`PSPlaceOpenBrace` and `PSPlaceCloseBrace` leave trailing whitespace when expanding one-line blocks Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 70/100
PowerShell/PSScriptAnalyzer#2210 ·
Tutte le issue di PowerShell/PSScriptAnalyzer
Issue simili
-
Status: Waiting triage Type: Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
nanoframework/Home#1857 ·
-
kind/bug kind/regression
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
unoplatform/uno.toolkit.ui#1646 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
nightscout/nocturne#1379 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
elastic/esql-dotnet#47 ·
-
port: add go-steam fork Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100