msbuild调用Windows 7下的powershell脚本获取签名错误
发布时间:2021-03-06 01:06:28 所属栏目:Windows 来源:网络整理
导读:我们有一个powerhell构建脚本,可以调用其他脚本,这些脚本在 Windows 7 64位下给我带来麻烦.它在XP下工作正常.我已经运行set-executionpolicy到RemoteSigned(并尝试使用Bypass和Unrestricted).我可以从错误信息中拉出命令行,并自行运行,并且运行正常. 构建错
|
我们有一个powerhell构建脚本,可以调用其他脚本,这些脚本在 Windows 7 64位下给我带来麻烦.它在XP下工作正常.我已经运行set-executionpolicy到RemoteSigned(并尝试使用Bypass和Unrestricted).我可以从错误信息中拉出命令行,并自行运行,并且运行正常. 构建错误在这里看起来很糟糕但是我还包括他们的完整性. Project "C:dev7SourceDashPortalDashboardGeneratorDashboardGenerator.csproj" (2) is building "C:dev7SourceDashPo
rtalDashboardControllerDashboardController.csproj" (15) on node 0 (default targets).
File C:Userspmckinney.NADocumentsWindowsPowerShellprofile.ps1 cannot be lo
aded because the execution of scripts is disabled on this system. Please see "g
et-help about_signing" for more details.
At line:1 char:2
+ . <<<< 'C:Userspmckinney.NADocumentsWindowsPowerShellprofile.ps1'
+ CategoryInfo : NotSpecified: (:) [],PSSecurityException
+ FullyQualifiedErrorId : RuntimeException
File C:dev7SourceDashPortalDashboardController......BuildcreateReportI
nstallScript.ps1 cannot be loaded because the execution of scripts is disabled
on this system. Please see "get-help about_signing" for more details.
At line:1 char:87
+ C:dev7SourceDashPortalDashboardController......BuildcreateReportInst
allScript <<<< -t C:dev7SourceDashPortalDashboardController......Sourc
eDashPortalDashboardReportsReportSetupScriptTemplate.sql -l C:dev7SourceD
ashPortalDashboardController......SourceDashPortalDashboardReportsRepor
tSetupReportList.xml -c C:dev7SourceDashPortalDashboardController......
SourceDashPortalConfig
+ CategoryInfo : NotSpecified: (:) [],PSSecurityException
+ FullyQualifiedErrorId : RuntimeException
C:dev7SourceDashPortalDashboardControllerDashboardController.csproj(265,5): error MSB3073: The command "powershell
C:dev7SourceDashPortalDashboardController......BuildcreateReportInstallScript -t C:dev7SourceDashPortalDa
shboardController......SourceDashPortalDashboardReportsReportSetupScriptTemplate.sql -l C:dev7SourceDashPorta
lDashboardController......SourceDashPortalDashboardReportsReportSetupReportList.xml -c C:dev7SourceDashPorta
lDashboardController......SourceDashPortalConfig" exited with code 1.
只是猜测:您在x64 PowerShell中运行了Set-ExecutionPolicy,构建运行x86 PowerShell?
也许在两个shell中尝试Get-ExcutionPolicy. (编辑:均轻资讯网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 如何在VMware虚拟机上安装Windows 11,即使它不符合系统需求
- 如何批量把换行符替换为逗号 怎样批量替换换行符
- Windows 10 桌面壁纸怎么换方法很简单
- windows-server-2008 – 如何从IIS 7提供未知文件类型
- win10系统好不好
- 我对Windows裸机系统/映像备份与文件备份的理解是否正确?
- windows – 如何重命名脱机文件夹引用的服务器?
- windows-server-2008 – 在Windows Server 2008上移动和更改
- windows-server-2008-r2 – 我可以在服务器上运行Excel 201
- win10优化 win10升级后优化教程
站长推荐

