小编She*_*ets的帖子

Powershell 安装 - 找不到指定搜索条件和模块名称的匹配项

我在安装/更新我的 powershell 模块时遇到了困难。我在尝试安装 DBA Tools 模块时注意到了这一点。参考链接是https://dbatools.io/download/https://github.com/sqlcollaborative/dbatools

这是一台企业电脑。但我知道我以前安装过其他模块。有谁知道发生了什么?


PS(管理员)>

Install-Module DBATools

  • 注意:Install-Module 命令在返回警告消息之前会暂停几分钟。

警告:无法解析包源“https://www.powershellgallery.com/api/v2”。错误:“PackageManagement\Install-Package:未找到指定搜索条件和模块名称‘PowerShellGet’的匹配项”。

Update-Module PowerShellGet

错误:“更新模块:模块 'PowerShellGet' 未使用 Install-Module 安装,因此无法更新。”。

Update-Module PowerShellGet -Force

错误:“更新模块:模块 'PowerShellGet' 未使用 Install-Module 安装,因此无法更新。”。

Find-Module dbatools

  • 注意: Find-Module 命令在返回错误消息之前会暂停几分钟。

错误:“未找到与指定搜索条件和模块名称 'dbatools' 匹配的内容。尝试 Get-PSRepository 以查看所有可用的已注册模块存储库。”

Get-PSRepository | fl *

名称:PS画廊

来源位置:https ://www.powershellgallery.com/api/v2

信任:错误

注册 : 真

安装策略:不受信任

包管理提供程序:NuGet

发布位置:https ://www.powershellgallery.com/api/v2/package/

ScriptSourceLocation : https://www.powershellgallery.com/api/v2/items/psscript

ScriptPublishLocation : https://www.powershellgallery.com/api/v2/package/

提供者选项:{}

Get-Module PackageManagement -ListAvailable

目录:C:\Program Files\WindowsPowerShell\Modules

ModuleType 版本名称 ExportedCommands

二进制 1.0.0.1 PackageManagement {Find-Package、Get-Package、Get-PackageProvider、Get-Packa...

二进制 1.0.0.1 …

powershell windows-10

10
推荐指数
5
解决办法
4万
查看次数

XML文档(2,2)中存在错误:Visual Studio,SSRS项目文件错误(VS2015-VS2017)

我有一个使用开发的解决方案文件,VS2015它有大约20个项目文件。当我们打开文件时,VS2017出现提示:“ 不支持报表服务器项目的版本,必须升级项目 ”。我们选择升级项目并提交更改,解决方案/项目现在正在中运行VS2017

当我使用VS2015和使用版本控制来时Update Solution to Latest Version,将检索文件,但项目文件无法正确加载;“ 解决方案中的一个或多个项目未正确加载。请参见输出窗口以获取更多详细信息 ”。输出时,每个项目都有一条消息,指出:“ XML文档(2,2)中存在错误。 ”。我试图右键单击项目和Reload Project,但是它给出了相同的XML文档(2,2)错误消息。当我使用版本控制来时Update Solution to Specific Version (and choose the prior working version),项目文件仍然说“ (不可用) ”,但是当我选择Reload Project项目时,即可正确加载。

我想知道如何在VS2015中修复文件。然后最终,我想进行这项工作,以便VS2017和VS2015都可以更改解决方案文件(项目.RPTPROJ,数据源.RDS,报告.RDL等)。

完整的错误信息

C:\ Users \ myUser \ Documents \ Visual Studio 2015 \ Projects \ SSRS \ Project_ssrs2016 \ Transportation \ Transportation.rptproj:错误:XML文档(2,2)中存在错误。

Visual Studio版本信息

(编辑)

我大约一年前尝试使用VS 2017。正常运行了大约一周,然后有一天该程序突然无法启动,并显示以下错误消息:“程序包管理初始化失败:访问被拒绝。” 据SO人士介绍,这是VS 2017中非常常见的错误,但可能已在较新版本中修复:( 程序包管理初始化失败:打开Visual Studio 2017时访问被拒绝错误

我的一些同事使用VS2017,但他们并没有将它用于太多事情。

--Mine
Microsoft Visual Studio …
Run Code Online (Sandbox Code Playgroud)

visual-studio reporting-services visual-studio-2015 ssrs-2016 visual-studio-2017

7
推荐指数
4
解决办法
8646
查看次数

SSRS文件错误消息:定义的参数数不等于参数面板中的单元格定义数

我已经使用自动服务工具将报表文件从Crystal(.rpt)转换为SSRS(.rdl)。当我在Viusal Studio SSDT中预览报告时,收到一条非常奇怪的错误消息:

“定义的参数数量不等于参数面板中的单元格定义数量”

在此处输入图片说明

我也尝试在Report Builder中运行它,并且收到了相同的错误消息。

RDL文件有1710行;下面是看起来像它们相关的某些节点的代码-ReportParameters,ReportLayout,QueryParameters,CommandText。

有谁知道是什么原因导致此错误?而我该如何解决呢?我读过一篇文章,建议隐藏参数必须具有默认值-SSRS 报告的定义无效;8个参数中有7个是隐藏的,并且没有一个具有默认参数。但是我不确定默认值应该是什么(如果必须有一个)。

任何帮助表示赞赏。

第16..20行

    <QueryParameters>
      <QueryParameter Name=":PmPROD_WHSEPROD_CODE">
        <Value>=Parameters!PmPROD_WHSEPROD_CODE.Value</Value>
      </QueryParameter>
    </QueryParameters>
Run Code Online (Sandbox Code Playgroud)

行1533..1573

  <ReportParameters>
    <ReportParameter Name="PmPROD_WHSEPROD_CODE">
      <DataType>String</DataType>
      <Prompt>Pm-PROD_WHSE.PROD_CODE</Prompt>
    </ReportParameter>
    <ReportParameter Name="g_invtot">
      <DataType>Float</DataType>
      <Prompt>invtot</Prompt>
      <Hidden>true</Hidden>
    </ReportParameter>
    <ReportParameter Name="g_grdtotinv">
      <DataType>Float</DataType>
      <Prompt>grdtotinv</Prompt>
      <Hidden>true</Hidden>
    </ReportParameter>
    <ReportParameter Name="g_totweight">
      <DataType>Float</DataType>
      <Prompt>totweight</Prompt>
      <Hidden>true</Hidden>
    </ReportParameter>
    <ReportParameter Name="g_grand_tot_wgt">
      <DataType>Float</DataType>
      <Prompt>grand_tot_wgt</Prompt>
      <Hidden>true</Hidden>
    </ReportParameter>
    <ReportParameter Name="g_grdtotwgt">
      <DataType>Float</DataType>
      <Prompt>grdtotwgt</Prompt>
      <Hidden>true</Hidden>
    </ReportParameter>
    <ReportParameter Name="g_totinv">
      <DataType>Float</DataType>
      <Prompt>totinv</Prompt>
      <Hidden>true</Hidden>
    </ReportParameter>
    <ReportParameter Name="g_totqtyonorder">
      <DataType>Float</DataType>
      <Prompt>totqtyonorder</Prompt>
      <Hidden>true</Hidden>
    </ReportParameter>
  </ReportParameters>
Run Code Online (Sandbox Code Playgroud)

1574..1586行

  <ReportParametersLayout>
    <GridLayoutDefinition>
      <NumberOfColumns>4</NumberOfColumns>
      <NumberOfRows>2</NumberOfRows>
      <CellDefinitions>
        <CellDefinition>
          <ColumnIndex>0</ColumnIndex>
          <RowIndex>0</RowIndex>
          <ParameterName>PmPROD_WHSEPROD_CODE</ParameterName>
        </CellDefinition>
      </CellDefinitions> …
Run Code Online (Sandbox Code Playgroud)

xml reporting-services ssrs-2016

3
推荐指数
2
解决办法
1745
查看次数