Visual Studio 2017安装项目错误2727

时间:2018-03-22 17:31:20

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

嘿伙计们我正在尝试为我的应用程序构建一个设置但它似乎不想工作。

我用-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.

3 个答案:

答案 0 :(得分:0)

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

在我的配置项目中,有一个名为“策略”的子目录,其中包含多个文件。我在该目录中的所有“内容”文件都显示了相对路径“ Policies \ 文件名”,除了一个...它显示了“ p olicies \ 文件名”。注意小写的“ p”。我删除并重新添加了该文件,然后显示了相对路径“ P olicies \ filename ”,从而解决了2727错误。

很奇怪,但是有效。

答案 1 :(得分:0)

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

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

<SatelliteResourceLanguages>en</SatelliteResourceLanguages>

添加后, bin 中将没有名称为 fr-FR zh-Hans 等的特定于语言的文件夹。和setup项目将生成不再引发2727错误的MSI。

如果有人知道这方面的解释,那太好了;如果您希望卫星组件成为安装程序的一部分,您会怎么做。

答案 2 :(得分:0)

我刚刚遇到了同样的问题,所以 - 为了后代 - 我将解决方案留在这里:

可能是来自 VS 的文件定义是错误的。所以首先你要检查输出文件:

  1. 输出组的属性
  2. 输出字段并点击“...”
  3. 它将显示结果,将复制的文件
  4. 因此您必须验证列表是否正常并且没有像 recv 那样的双斜线

VDProj editing the output

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

\\

并且有 <ItemGroup> <ContentWithTargetPath Include="..\web-app\build\**"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <TargetPath>wwwroot%(RecursiveDir)\%(Filename)%(Extension)</TargetPath> </ContentWithTargetPath> </ItemGroup> 被解析为 \ 并导致了这个问题。