【问题标题】:Visual Studio 2017 Setup Project error 2727Visual Studio 2017 安装项目错误 2727
【发布时间】:2018-03-22 17:31:19
【问题描述】:

大家好,我正在尝试为我的应用程序构建一个设置,但它似乎不想工作。

我使用 -l 开关运行它以获取安装日志,看起来它正在寻找一个名为“_8D5342EDA5924BABBF19E5682639F820”的文件夹,但该文件夹在开发环境中不存在。这是从哪里得到的?

这里是日志文件:https://pastebin.com/Y8BRAFjA

=== Logging started: 3/22/2018  12:26:49 ===
Action 12:26:49: INSTALL. 
Action start 12:26:49: INSTALL.
Action 12:26:49: DIRCA_CheckFX. 
Action start 12:26:49: DIRCA_CheckFX.
INFO   : [03/22/2018 12:26:50:124] [CheckFX                                 ]: Custom Action is starting...
INFO   : [03/22/2018 12:26:50:124] [CheckFX                                 ]: CoInitializeEx - COM initialization Apartment Threaded...
INFO   : [03/22/2018 12:26:50:124] [CheckFX                                 ]: MsiGetPropertyW - Determine size of property 'VSDFrameworkVersion'
INFO   : [03/22/2018 12:26:50:124] [CheckFX                                 ]: Allocating space...
INFO   : [03/22/2018 12:26:50:124] [CheckFX                                 ]: MsiGetPropertyW - Getting Property 'VSDFrameworkVersion'...
INFO   : [03/22/2018 12:26:50:124] [CheckFX                                 ]: Property 'VSDFrameworkVersion'  retrieved with value 'v4.6.1'.
INFO   : [03/22/2018 12:26:50:124] [CheckFX                                 ]: MsiGetPropertyW - Determine size of property 'VSDFrameworkProfile'
INFO   : [03/22/2018 12:26:50:124] [CheckFX                                 ]: Property 'VSDFrameworkProfile'  retrieved with value ''.
INFO   : [03/22/2018 12:26:50:124] [CheckFX                                 ]: Set VSDNETMSG with the FrameworkVersion.
INFO   : [03/22/2018 12:26:50:134] [CheckFX                                 ]: MsiGetPropertyW - Determine size of property 'VSDNETMSG'
INFO   : [03/22/2018 12:26:50:134] [CheckFX                                 ]: Allocating space...
INFO   : [03/22/2018 12:26:50:134] [CheckFX                                 ]: MsiGetPropertyW - Getting Property 'VSDNETMSG'...
INFO   : [03/22/2018 12:26:50:134] [CheckFX                                 ]: Property 'VSDNETMSG'  retrieved with value 'This setup requires the .NET Framework version [1].  Please install the .NET Framework and run this setup again.'.
INFO   : [03/22/2018 12:26:50:134] [CheckFX                                 ]: MsiSetPropertyW - Setting Property Value...
INFO   : [03/22/2018 12:26:50:134] [CheckFX                                 ]: MsiSetPropertyW - Setting property 'VSDNETMSG' to 'This setup requires the .NET Framework version v4.6.1.  Please install the .NET Framework and run this setup again.'.
INFO   : [03/22/2018 12:26:50:134] [CheckFX                                 ]: MsiGetPropertyW - Determine size of property 'VSDNETURLMSG'
INFO   : [03/22/2018 12:26:50:134] [CheckFX                                 ]: Allocating space...
INFO   : [03/22/2018 12:26:50:134] [CheckFX                                 ]: MsiGetPropertyW - Getting Property 'VSDNETURLMSG'...
INFO   : [03/22/2018 12:26:50:134] [CheckFX                                 ]: Property 'VSDNETURLMSG'  retrieved with value 'This setup requires the .NET Framework version [1].  Please install the .NET Framework and run this setup again.  The .NET Framework can be obtained from the web.  Would you like to do this now?'.
INFO   : [03/22/2018 12:26:50:134] [CheckFX                                 ]: MsiSetPropertyW - Setting Property Value...
INFO   : [03/22/2018 12:26:50:134] [CheckFX                                 ]: MsiSetPropertyW - Setting property 'VSDNETURLMSG' to 'This setup requires the .NET Framework version v4.6.1.  Please install the .NET Framework and run this setup again.  The .NET Framework can be obtained from the web.  Would you like to do this now?'.
INFO   : [03/22/2018 12:26:50:134] [CheckFX                                 ]: MsiSetPropertyW - Setting Property Value...
INFO   : [03/22/2018 12:26:50:134] [CheckFX                                 ]: MsiSetPropertyW - Setting property 'VSDFXAvailable' to 'TRUE'.
INFO   : [03/22/2018 12:26:50:134] [CheckFX                                 ]: Writing config file with version: '4.0'...
INFO   : [03/22/2018 12:26:50:134] [CheckFX                                 ]: Creating Config File...
DEBUG  : [03/22/2018 12:26:50:134] [CheckFX                                 ]: Calling MsiGetActiveDatabase...
DEBUG  : [03/22/2018 12:26:50:134] [CheckFX                                 ]: Calling MsiDatabaseOpenView...
DEBUG  : [03/22/2018 12:26:50:134] [CheckFX                                 ]: Calling MsiViewExecute...
DEBUG  : [03/22/2018 12:26:50:134] [CheckFX                                 ]: Calling MsiViewFetch...
DEBUG  : [03/22/2018 12:26:50:134] [CheckFX                                 ]: Calling MsiRecordDataSize...
INFO   : [03/22/2018 12:26:50:134] [CheckFX                                 ]: MsiSetPropertyW - Setting Property Value...
INFO   : [03/22/2018 12:26:50:134] [CheckFX                                 ]: MsiSetPropertyW - Setting property 'VSDFxConfigFile' to 'C:\Users\EZEKIE~1\AppData\Local\Temp\CFG81DE.tmp'.
INFO   : [03/22/2018 12:26:50:134] [CheckFX                                 ]: Custom Action succeeded.
INFO   : [03/22/2018 12:26:50:134] [CheckFX                                 ]: Custom Action completed with return code: '0'
Action ended 12:26:50: DIRCA_CheckFX. Return value 1.
Action 12:26:50: AppSearch. Searching for installed applications Property: [1], Signature: [2]
Action start 12:26:50: AppSearch.
Action ended 12:26:50: AppSearch. Return value 1.
Action 12:26:50: VSDCA_VsdLaunchConditions. 
Action start 12:26:50: VSDCA_VsdLaunchConditions.
INFO   : [03/22/2018 12:26:50:164] [VsdLaunchConditions                     ]: Custom Action is starting...
INFO   : [03/22/2018 12:26:50:174] [VsdLaunchConditions                     ]: CoInitializeEx - COM initialization Apartment Threaded...
INFO   : [03/22/2018 12:26:50:174] [VsdLaunchConditions                     ]: Enumerating table using SQL statement: 'SELECT * FROM `_VsdLaunchCondition`'
INFO   : [03/22/2018 12:26:50:174] [VsdLaunchConditions                     ]: Calling MsiGetActiveDatabase...
INFO   : [03/22/2018 12:26:50:174] [VsdLaunchConditions                     ]: MsiDatabaseOpenViewW - Prepare Database to view table...
INFO   : [03/22/2018 12:26:50:174] [VsdLaunchConditions                     ]: TMsiViewExecute - Open Database view on table...
INFO   : [03/22/2018 12:26:50:174] [VsdLaunchConditions                     ]: Checking a launch condition...
INFO   : [03/22/2018 12:26:50:174] [VsdLaunchConditions                     ]: Getting the condition to evaluate...
INFO   : [03/22/2018 12:26:50:174] [VsdLaunchConditions                     ]: MsiRecordGetStringW - Fetching value...
INFO   : [03/22/2018 12:26:50:174] [VsdLaunchConditions                     ]: MsiRecordGetStringW - Getting value from column '1'...
INFO   : [03/22/2018 12:26:50:174] [VsdLaunchConditions                     ]: Evaluating condition 'VSDFXAvailable'...
INFO   : [03/22/2018 12:26:50:174] [VsdLaunchConditions                     ]: RESULT:  Condition is true. Nothing more to do.
INFO   : [03/22/2018 12:26:50:174] [VsdLaunchConditions                     ]: Custom Action succeeded.
INFO   : [03/22/2018 12:26:50:174] [VsdLaunchConditions                     ]: Custom Action completed with return code: '0'
Action ended 12:26:50: VSDCA_VsdLaunchConditions. Return value 1.
Action 12:26:50: LaunchConditions. Evaluating launch conditions
Action start 12:26:50: LaunchConditions.
Action ended 12:26:50: LaunchConditions. Return value 1.
Action 12:26:50: CCPSearch. Searching for qualifying products
Action start 12:26:50: CCPSearch.
Action ended 12:26:50: CCPSearch. Return value 1.
Action 12:26:50: RMCCPSearch. Searching for qualifying products
Action start 12:26:50: RMCCPSearch.
Action ended 12:26:50: RMCCPSearch. Return value 0.
Action 12:26:50: ValidateProductID. 
Action start 12:26:50: ValidateProductID.
Action ended 12:26:50: ValidateProductID. Return value 1.
Action 12:26:50: DIRCA_TARGETDIR. 
Action start 12:26:50: DIRCA_TARGETDIR.
Action ended 12:26:50: DIRCA_TARGETDIR. Return value 1.
Action 12:26:50: CostInitialize. Computing space requirements
Action start 12:26:50: CostInitialize.
Action ended 12:26:50: CostInitialize. Return value 1.
Action 12:26:50: FileCost. Computing space requirements
Action start 12:26:50: FileCost.
Action ended 12:26:50: FileCost. Return value 1.
Action 12:26:50: IsolateComponents. 
Action start 12:26:50: IsolateComponents.
Action ended 12:26:50: IsolateComponents. Return value 1.
Action 12:26:50: CostFinalize. Computing space requirements
Action start 12:26:50: CostFinalize.
DEBUG: Error 2727:  The directory entry '_8D5342EDA5924BABBF19E5682639F820' does not exist in the Directory table
Info 2898.For VSI_MS_Sans_Serif13.0_0_0 textstyle, the system created a 'MS Sans Serif' font, in 0 character set, of 24 pixels height.
DEBUG: Error 2835:  The control ErrorIcon was not found on dialog ErrorDialog
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2835. The arguments are: ErrorIcon, ErrorDialog, 
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2727. The arguments are: _8D5342EDA5924BABBF19E5682639F820, , 
MSI (c) (18:78) [12:26:51:254]: Product: Setup1 -- The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2727. The arguments are: _8D5342EDA5924BABBF19E5682639F820, , 

Action ended 12:26:51: CostFinalize. Return value 3.
Action 12:26:51: FatalErrorForm. 
Action start 12:26:51: FatalErrorForm.
DEBUG: Error 2826:  Control Line1 on dialog FatalErrorForm extends beyond the boundaries of the dialog to the right by 4 pixels
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2826. The arguments are: FatalErrorForm, Line1, to the right
DEBUG: Error 2826:  Control Line2 on dialog FatalErrorForm extends beyond the boundaries of the dialog to the right by 4 pixels
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2826. The arguments are: FatalErrorForm, Line2, to the right
DEBUG: Error 2826:  Control BannerBmp on dialog FatalErrorForm extends beyond the boundaries of the dialog to the right by 4 pixels
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2826. The arguments are: FatalErrorForm, BannerBmp, to the right
Info 2898.For VsdDefaultUIFont.524F4245_5254_5341_4C45_534153783400 textstyle, the system created a 'MS Sans Serif' font, in 0 character set, of 24 pixels height.
Info 2898.For VSI_MS_Sans_Serif16.0_1_0 textstyle, the system created a 'MS Sans Serif' font, in 0 character set, of 29 pixels height.
Action 12:26:51: FatalErrorForm. Dialog created
Action ended 12:26:52: FatalErrorForm. Return value 1.
Action ended 12:26:52: INSTALL. Return value 3.
=== Logging stopped: 3/22/2018  12:26:52 ===
MSI (c) (18:78) [12:26:52:777]: Windows Installer installed the product. Product Name: Setup1. Product Version: 1.0.0. Product Language: 1033. Manufacturer: Default Company Name. Installation success or error status: 1603.

【问题讨论】:

  • 它不是在寻找文件夹,而是在 MSI 文件中寻找内部目录名称。这些是由 Visual Studio 生成的,目录表中缺少数据库行是非常奇怪的。如果您包含了合并模块,或者可能以某种可以解释的方式更改了 MSI。
  • @PhilDW 我没有做任何更改,创建了安装项目,构建并运行了它。这就是我得到的
  • 我又重做了一次,它成功了......奇怪

标签: c# visual-studio-2017 visual-studio-setup-proje


【解决方案1】:

我遇到了完全相同的问题。最后,我发现它是由我的项目依赖项的附属程序集引起的。不知道为什么:-(

在安装程序使用其发布文件的项目的 .csproj 文件中添加以下行后,问题得到解决:

<SatelliteResourceLanguages>en</SatelliteResourceLanguages>

添加后,bin 中将不再有诸如 fr-FRzh-Hans 等名称的特定语言文件夹. 并且安装项目将生成不再引发 2727 错误的 MSI。

如果有人知道这一点的解释以及如果您希望附属程序集成为安装程序的一部分,您会怎么做,那就太好了。

【讨论】:

    【解决方案2】:

    我遇到了类似的问题。我创建配置项目(在 VS 中创建为“空”项目类型)并在安装程序中包含该项目的“内容”。二进制文件作为合并模块包含在内。

    在我的配置项目中,有一个名为“Policies”的子目录,其中包含多个文件。我在这个目录中的所有“内容”文件都显示了相对路径“Policies\filename”,除了一个......它显示了“policies\filename em>”。注意小写的“p”。我删除并重新添加了文件,然后显示相对路径“Policies\filename”,这修复了 2727 错误。

    很奇怪,但它起作用了。

    【讨论】:

      【解决方案3】:

      我刚刚遇到了同样的问题 - 对于后代 - 我将把解决方案留在这里:

      可能来自VS的文件定义是错误的。因此,首先您可以通过以下方式检查输出文件:

      1. 输出组的属性
      2. 输出字段并单击“...”
      3. 它将显示结果,将被复制的文件
      4. 所以你必须验证列表是否正常并且没有像\\这样的双斜线

      这对我来说是个问题。我编辑了 Visual Studio 项目以强制它通过以下方式将 Web 文件从父目录复制到项目中:

        <ItemGroup>
          <ContentWithTargetPath Include="..\web-app\build\**">
            <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
            <TargetPath>wwwroot%(RecursiveDir)\%(Filename)%(Extension)</TargetPath>
          </ContentWithTargetPath>
        </ItemGroup>
      

      还有 \ 被解析为 \\ 并导致了这个问题。

      【讨论】:

        猜你喜欢
        • 2017-08-07
        • 2017-04-02
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2017-04-04
        相关资源
        最近更新 更多