Tooling: ASPNet Core Publish schlägt fehl

Erstellt am 30. Aug. 2016  ·  5Kommentare  ·  Quelle: aspnet/Tooling

Habe eine neue Maschine
Upgrade auf Windows 10
Visual Studio Enterprise mit Update 3 14.0.25425.01 installiert
Installierte Microsoft .Net Core 1.0.0 - VS 2015 Tooling Preview 2 (Version 1.0.20811.48 .)
tfs-Code auf neue Maschine gemappt
Kann nicht auf neuem Computer veröffentlichen (Windows 8-Computer funktioniert mit demselben Code)

)
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Publishing.targets(408,5): Fehler: Der Begriff 'Test-Path' wird nicht als Name erkannt ein Cmdlet, eine Funktion, eine Skriptdatei oder ein lauffähiges Programm. Überprüfen Sie die Schreibweise des Namens, oder wenn ein Pfad angegeben wurde, überprüfen Sie, ob der Pfad korrekt ist, und versuchen Sie es erneut.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Publishing.targets(408,5): Fehler: Der Begriff 'Test-Path' wird nicht als Name erkannt ein Cmdlet, eine Funktion, eine Skriptdatei oder ein lauffähiges Programm. Überprüfen Sie die Schreibweise des Namens, oder wenn ein Pfad angegeben wurde, überprüfen Sie, ob der Pfad korrekt ist, und versuchen Sie es erneut.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Publishing.targets(408,5): Fehler: Der Begriff 'Test-Path' wird nicht als Name erkannt ein Cmdlet, eine Funktion, eine Skriptdatei oder ein lauffähiges Programm. Überprüfen Sie die Schreibweise des Namens, oder wenn ein Pfad angegeben wurde, überprüfen Sie, ob der Pfad korrekt ist, und versuchen Sie es erneut.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Publishing.targets(408,5): Fehler: Der Begriff 'Test-Path' wird nicht als Name erkannt ein Cmdlet, eine Funktion, eine Skriptdatei oder ein lauffähiges Programm. Überprüfen Sie die Schreibweise des Namens, oder wenn ein Pfad angegeben wurde, überprüfen Sie, ob der Pfad korrekt ist, und versuchen Sie es erneut.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Publishing.targets(408,5): Fehler: Der Begriff 'Test-Path' wird nicht als Name erkannt ein Cmdlet, eine Funktion, eine Skriptdatei oder ein lauffähiges Programm. Überprüfen Sie die Schreibweise des Namens, oder wenn ein Pfad angegeben wurde, überprüfen Sie, ob der Pfad korrekt ist, und versuchen Sie es erneut.
C:\Programme (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Publishing.targets(408,5): Fehler: Der Begriff 'Neues Objekt' wird nicht als Name erkannt ein Cmdlet, eine Funktion, eine Skriptdatei oder ein lauffähiges Programm. Überprüfen Sie die Schreibweise des Namens, oder wenn ein Pfad angegeben wurde, überprüfen Sie, ob der Pfad korrekt ist, und versuchen Sie es erneut.
C:\Programme (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Publishing.targets(408,5): Fehler: Der Begriff 'Schreibfehler' wird nicht als Name erkannt ein Cmdlet, eine Funktion, eine Skriptdatei oder ein lauffähiges Programm. Überprüfen Sie die Schreibweise des Namens, oder wenn ein Pfad angegeben wurde, überprüfen Sie, ob der Pfad korrekt ist, und versuchen Sie es erneut.

1>Veröffentlichen ist aufgrund von Build-Fehlern fehlgeschlagen. Weitere Informationen finden Sie in der Fehlerliste.

Hilfreichster Kommentar

Das Hinzufügen dieses Registrierungseintrags hat mein Problem behoben. Danke @n777ty, dass hast .

Windows-Registrierungseditor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion\PublisherPolicy\Default\v4.0_Policy.1.0.System.Management.Automation__31bf3856ad364e35]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion\PublisherPolicy\Default\v4.0_Policy.1.0.System.Management.Automation__31bf3856ad364e35\1]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion\PublisherPolicy\Default\v4.0_Policy.1.0.System.Management.Automation__31bf3856ad364e35\1\1.0.0.0]
"ConfigFilePath"="C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Policy.1.0.System.Management.Automation\v4.0_1.0.0.0__31bf3856ad364e35\Policy.1.0.System.Management.Automation.config"

Alle 5 Kommentare

Jayvijayrkn irgendwelche Ideen?

Nur einige zusätzliche Informationen zu diesem Problem, die hilfreich sein können:

1) Jeff (OP) kann diese Cmdlets erfolgreich über die PS-Eingabeaufforderung (dh Test-Path) ausführen.
2) Beim Öffnen der Paket-Manager-Konsole in VS werden vor dem Ausführen von Befehlen die folgenden Fehler beobachtet:

The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(32) : Error in type "System.Xml.XmlNode": Exception: Cannot create a code method because of the method format. The method should be public, static, and have one parameter of type PSObject.
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(44) : Error in type "System.Xml.XmlNodeList": Exception: Cannot create a code method because of the method format. The method should be public, static, and have one parameter of type PSObject.
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(87) : Error in type "System.DirectoryServices.PropertyValueCollection": Exception: Cannot create a code method because of the method format. The method should be public, static, and have one parameter of type PSObject.
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(353) : Error in type "System.DirectoryServices.DirectoryEntry": Exception: Cannot create a code method because of the method format. The method should be public, static, and have one parameter of type PSObject.
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(360) : Error in type "System.DirectoryServices.DirectoryEntry": Exception: Cannot create a code method because of the method format. The method should be public, static, and have one parameter of type PSObject.
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(372) : Error in type "System.IO.DirectoryInfo": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(399) : Error in type "System.IO.FileInfo": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(3007) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(3014) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(3021) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(3028) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(3035) : Error in type "System.Security.AccessControl.ObjectSecurity": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(3249) : Error in type "Microsoft.PowerShell.DeserializingTypeConverter": Type "Microsoft.PowerShell.DeserializingTypeConverter" should be a TypeConverter or an PSTypeConverter.
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(3678) : Error in type "System.Management.Automation.ParameterSetMetadata": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
The following error occurred while loading the extended type data file: Microsoft.PowerShell.Core, C:\Windows\SysWOW64\WindowsPowerShell\v1.0\types.ps1xml(3763) : Error in type "System.Management.Automation.FormatViewDefinition": Exception: The getter method should be public, non void, static, and have one parameter of type PSObject.
The term 'Get-ExecutionPolicy' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Das klingt ähnlich/gleich wie:

http://stackoverflow.com/questions/23333057/visual-studio-2013-15-nuget-errors-on-console-the-module-to-process-nuget-ps

Welche Powershell-Version ist installiert?
>$PSVersionTable.PSVersion

Große kleinere Build-Revision


5 0 10586 63

Das Hinzufügen dieses Registrierungseintrags hat mein Problem behoben. Danke @n777ty, dass hast .

Windows-Registrierungseditor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion\PublisherPolicy\Default\v4.0_Policy.1.0.System.Management.Automation__31bf3856ad364e35]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion\PublisherPolicy\Default\v4.0_Policy.1.0.System.Management.Automation__31bf3856ad364e35\1]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion\PublisherPolicy\Default\v4.0_Policy.1.0.System.Management.Automation__31bf3856ad364e35\1\1.0.0.0]
"ConfigFilePath"="C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Policy.1.0.System.Management.Automation\v4.0_1.0.0.0__31bf3856ad364e35\Policy.1.0.System.Management.Automation.config"

War diese Seite hilfreich?
0 / 5 - 0 Bewertungen

Verwandte Themen

SoonDead picture SoonDead  ·  7Kommentare

danroth27 picture danroth27  ·  6Kommentare

sadjadbp picture sadjadbp  ·  7Kommentare

plachor picture plachor  ·  6Kommentare

Cybrosys picture Cybrosys  ·  7Kommentare