Tooling: ASPNet Core Publish falla

Creado en 30 ago. 2016  ·  5Comentarios  ·  Fuente: aspnet/Tooling

Tengo una nueva maquina
Actualizado a Windows 10
Visual Studio Enterprise instalado con la actualización 3 14.0.25425.01
Microsoft .Net Core 1.0.0 instalado - VS 2015 Tooling Preview 2 (Versión 1.0.20811.48
asignó el código tfs a la nueva máquina
no se puede publicar en una nueva máquina (la máquina con Windows 8 funciona con el mismo código

)
C: \ Archivos de programa (x86) \ MSBuild \ Microsoft \ VisualStudio \ v14.0 \ DotNet \ Microsoft.DotNet.Publishing.targets (408,5): Error: El término 'Test-Path' no se reconoce como el nombre de un cmdlet, función, archivo de script o programa operable. Verifique la ortografía del nombre, o si se incluyó una ruta, verifique que la ruta sea correcta y vuelva a intentarlo.
C: \ Archivos de programa (x86) \ MSBuild \ Microsoft \ VisualStudio \ v14.0 \ DotNet \ Microsoft.DotNet.Publishing.targets (408,5): Error: El término 'Test-Path' no se reconoce como el nombre de un cmdlet, función, archivo de secuencia de comandos o programa operable. Verifique la ortografía del nombre, o si se incluyó una ruta, verifique que la ruta sea correcta y vuelva a intentarlo.
C: \ Archivos de programa (x86) \ MSBuild \ Microsoft \ VisualStudio \ v14.0 \ DotNet \ Microsoft.DotNet.Publishing.targets (408,5): Error: El término 'Test-Path' no se reconoce como el nombre de un cmdlet, función, archivo de script o programa operable. Verifique la ortografía del nombre o, si se incluyó una ruta, verifique que la ruta sea correcta y vuelva a intentarlo.
C: \ Archivos de programa (x86) \ MSBuild \ Microsoft \ VisualStudio \ v14.0 \ DotNet \ Microsoft.DotNet.Publishing.targets (408,5): Error: El término 'Test-Path' no se reconoce como el nombre de un cmdlet, función, archivo de secuencia de comandos o programa operable. Verifique la ortografía del nombre, o si se incluyó una ruta, verifique que la ruta sea correcta y vuelva a intentarlo.
C: \ Archivos de programa (x86) \ MSBuild \ Microsoft \ VisualStudio \ v14.0 \ DotNet \ Microsoft.DotNet.Publishing.targets (408,5): Error: El término 'Test-Path' no se reconoce como el nombre de un cmdlet, función, archivo de secuencia de comandos o programa operable. Verifique la ortografía del nombre, o si se incluyó una ruta, verifique que la ruta sea correcta y vuelva a intentarlo.
C: \ Archivos de programa (x86) \ MSBuild \ Microsoft \ VisualStudio \ v14.0 \ DotNet \ Microsoft.DotNet.Publishing.targets (408,5): Error: El término 'Objeto nuevo' no se reconoce como el nombre de un cmdlet, función, archivo de script o programa operable. Verifique la ortografía del nombre, o si se incluyó una ruta, verifique que la ruta sea correcta y vuelva a intentarlo.
C: \ Archivos de programa (x86) \ MSBuild \ Microsoft \ VisualStudio \ v14.0 \ DotNet \ Microsoft.DotNet.Publishing.targets (408,5): Error: El término 'Error de escritura' no se reconoce como el nombre de un cmdlet, función, archivo de script o programa operable. Verifique la ortografía del nombre, o si se incluyó una ruta, verifique que la ruta sea correcta y vuelva a intentarlo.

1> La publicación falló debido a errores de compilación. Consulte la lista de errores para obtener más detalles.

Comentario más útil

agregar esta entrada de registro solucionó mi problema. Gracias @ n777ty por

Editor del registro de Windows, versión 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"

Todos 5 comentarios

jayvijayrkn alguna idea?

Solo alguna información adicional sobre este problema que puede ser útil:

1) Jeff (OP) puede ejecutar correctamente estos cmdlets desde el símbolo del sistema de PS (es decir, Test-Path)
2) Al abrir Package Manager Console en VS, incluso antes de ejecutar cualquier comando, se observan los siguientes errores:

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.

Esto suena similar / igual a:

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

¿Cuál es la versión de powershell instalada?
>$PSVersionTable.PSVersion

Revisión menor importante de la construcción


5 0 10586 63

agregar esta entrada de registro solucionó mi problema. Gracias @ n777ty por

Editor del registro de Windows, versión 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"

¿Fue útil esta página
0 / 5 - 0 calificaciones