msbuild调用Windows 7下的powershell脚本获取签名错误
发布时间:2021-03-06 00:02:38 所属栏目: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. (编辑:南平站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 28个Unix/Linux的命令行神器
- win10取消为硬件保留的内存操作方法
- Windows10创意者无法安装网络打印机怎么处理
- windows-server-2008 – Windows 2008忽略了Gratuitous ARP
- windows-update – 是否有“wusa.exe”的完整返回代码列表?
- 如何在Ubuntu中检查你的IP地址
- Windows 10家庭版千古罪人:97%的用户都被坑了
- Windows 11始终不会好用?教你几招让Windows 11变得更顺手
- Windows – 导出GFI MailArchiver电子邮件以导入Exchange 2
- 实时监控MS Windows服务器及其服务
站长推荐
热点阅读