2012-04-23 82 views
3

我有一系列应用程序引用使用ClickOnce部署的单个库项目。这个库项目引用了几个库,用于数据处理和硬件接口。这些标记为LocalCopy = False,并且在使用ClickOnce时默认是“Application Files ...”中的先决条件。Clickonce部署程序集必须安装在全局程序集缓存(GAC)中

虽然这对于大多数应用程序来说是完美的,但并不是所有的应用程序都需要所有的库。例如,仅用于查看数据的程序不需要硬件库。

根据this thread的逻辑,我设置要排除的文件,因为我实际上并不需要它们,但得到错误“无法安装或运行该应用程序,应用程序需要安装NationalInstruments.Common 8.20.306首先是全局程序集缓存(GAC)。“

如果我将它们设置为包含应用程序将安装,但随后运行时会给出错误“应用程序无法启动。联系应用程序供应商”。如果我点击这个对话框中的详细信息按钮,我得到一个日志文件:

PLATFORM VERSION INFO 
Windows    : 5.1.2600.196608 (Win32NT) 
Common Language Runtime  : 2.0.50727.3623 
System.Deployment.dll  : 2.0.50727.3053 (netfxsp.050727-3000) 
mscorwks.dll   : 2.0.50727.3623 (GDR.050727-3600) 
dfdll.dll   : 2.0.50727.3053 (netfxsp.050727-3000) 
dfshim.dll   : 4.0.31106.0 (Main.031106-0000) 

SOURCES 
Deployment url   : file://nt_server/prog/Publish/ResultsLoader/ATE%20Results%20Loader.application 
Deployment Provider url  : file://nt_server/prog/Publish/ResultsLoader/ATE%20Results%20Loader.application 
Application url   : file://nt_server/prog/Publish/ResultsLoader/Application%20Files/ATE%20Results%20Loader_1_0_0_5/ATE%20Results%20Loader.exe.manifest 

IDENTITIES 
Deployment Identity  : ATE Results Loader.application, Version=1.0.0.5, Culture=neutral, PublicKeyToken=67305960c2b2ce03, processorArchitecture=msil 
Application Identity  : ATE Results Loader.exe, Version=1.0.0.5, Culture=neutral, PublicKeyToken=67305960c2b2ce03, processorArchitecture=msil, type=win32 

APPLICATION SUMMARY 
* Installable application. 

ERROR SUMMARY 
Below is a summary of the errors, details of these errors are listed later in the log. 
* Activation of \\nt_server\prog\Publish\ResultsLoader\ATE Results Loader.application resulted in exception. Following failure messages were detected: 
    + Value does not fall within the expected range. 

COMPONENT STORE TRANSACTION FAILURE SUMMARY 
No transaction error was detected. 

WARNINGS 
There were no warnings during this operation. 

OPERATION PROGRESS STATUS 
* [4/23/2012 11:07:42 AM] : Activation of \\nt_server\prog\Publish\ResultsLoader\ATE Results Loader.application has started. 
* [4/23/2012 11:07:52 AM] : Processing of deployment manifest has successfully completed. 
* [4/23/2012 11:07:52 AM] : Installation of the application has started. 
* [4/23/2012 11:07:52 AM] : Processing of application manifest has successfully completed. 
* [4/23/2012 11:07:55 AM] : Request of trust and detection of platform is complete. 
* [4/23/2012 11:08:02 AM] : Downloading of subscription dependencies is complete. 
* [4/23/2012 11:08:02 AM] : Commit of the downloaded application has started. 
* [4/23/2012 11:08:05 AM] : Installation of application has successfully completed. 

ERROR DETAILS 
Following errors were detected during this operation. 
* [4/23/2012 11:08:06 AM] System.ArgumentException 
    - Value does not fall within the expected range. 
    - Source: System.Deployment 
    - Stack trace: 
     at System.Deployment.Application.NativeMethods.CorLaunchApplication(UInt32 hostType, String applicationFullName, Int32 manifestPathsCount, String[] manifestPaths, Int32 activationDataCount, String[] activationData, PROCESS_INFORMATION processInformation) 
     at System.Deployment.Application.ComponentStore.ActivateApplication(DefinitionAppId appId, String activationParameter, Boolean useActivationParameter) 
     at System.Deployment.Application.SubscriptionStore.ActivateApplication(DefinitionAppId appId, String activationParameter, Boolean useActivationParameter) 
     at System.Deployment.Application.ApplicationActivator.Activate(DefinitionAppId appId, AssemblyManifest appManifest, String activationParameter, Boolean useActivationParameter) 
     at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl) 
     at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state) 

COMPONENT STORE TRANSACTION DETAILS 
* Transaction at [4/23/2012 11:08:05 AM] 
    + System.Deployment.Internal.Isolation.StoreOperationStageComponent 
     - Status: Installed 
     - HRESULT: 0x0 
     - Manifest: NRJMNL92.0H4.application 
    + System.Deployment.Internal.Isolation.StoreOperationSetDeploymentMetadata 
     - Status: Set 
     - HRESULT: 0x0 
    + System.Deployment.Internal.Isolation.StoreOperationStageComponent 
     - Status: Installed 
     - HRESULT: 0x0 
     - Manifest: ATE Results Loader.exe.manifest 
    + System.Deployment.Internal.Isolation.StoreOperationStageComponentFile 
     - Status: Installed 
     - HRESULT: 0x0 
     - File: ATE Results Loader.xml 
    + System.Deployment.Internal.Isolation.StoreOperationStageComponent 
     - Status: Installed 
     - HRESULT: 0x0 
     - Manifest: NationalInstruments.Common.Native.dll.genman 
    + System.Deployment.Internal.Isolation.StoreOperationStageComponentFile 
     - Status: Installed 
     - HRESULT: 0x0 
     - File: NationalInstruments.Common.Native.dll 
    + System.Deployment.Internal.Isolation.StoreOperationStageComponent 
     - Status: Installed 
     - HRESULT: 0x0 
     - Manifest: NationalInstruments.DAQmx.dll.genman 
    + System.Deployment.Internal.Isolation.StoreOperationStageComponentFile 
     - Status: Installed 
     - HRESULT: 0x0 
     - File: NationalInstruments.DAQmx.dll 
    + System.Deployment.Internal.Isolation.StoreOperationStageComponent 
     - Status: Installed 
     - HRESULT: 0x0 
     - Manifest: NationalInstruments.Common.dll.genman 
    + System.Deployment.Internal.Isolation.StoreOperationStageComponentFile 
     - Status: Installed 
     - HRESULT: 0x0 
     - File: NationalInstruments.Common.dll 
    + System.Deployment.Internal.Isolation.StoreOperationStageComponent 
     - Status: Installed 
     - HRESULT: 0x0 
     - Manifest: ATE.dll.genman 
    + System.Deployment.Internal.Isolation.StoreOperationStageComponentFile 
     - Status: Installed 
     - HRESULT: 0x0 
     - File: ATE.dll 
    + System.Deployment.Internal.Isolation.StoreOperationStageComponent 
     - Status: Installed 
     - HRESULT: 0x0 
     - Manifest: NationalInstruments.NI4882.dll.genman 
    + System.Deployment.Internal.Isolation.StoreOperationStageComponentFile 
     - Status: Installed 
     - HRESULT: 0x0 
     - File: NationalInstruments.NI4882.dll 
    + System.Deployment.Internal.Isolation.StoreOperationStageComponent 
     - Status: Installed 
     - HRESULT: 0x0 
     - Manifest: ATE Results Loader.exe.genman 
    + System.Deployment.Internal.Isolation.StoreOperationStageComponentFile 
     - Status: Installed 
     - HRESULT: 0x0 
     - File: ATE Results Loader.exe 
    + System.Deployment.Internal.Isolation.StoreOperationInstallDeployment 
     - Status: Installed 
     - HRESULT: 0x0 
     - AppId: file://nt_server/prog/Publish/ResultsLoader/ATE%20Results%20Loader.application#ATE Results Loader.application, Version=1.0.0.5, Culture=neutral, PublicKeyToken=67305960c2b2ce03, processorArchitecture=msil 
    + System.Deployment.Internal.Isolation.StoreOperationSetDeploymentMetadata 
     - Status: Set 
     - HRESULT: 0x0 
    + System.Deployment.Internal.Isolation.StoreTransactionOperationType (27) 
     - HRESULT: 0x0 
+0

试图运行clickonce安装程序的客户机是否具有足够的权限?他们通常会自动安装。 – 2012-04-23 15:25:34

+0

我相信是这样的,客户机上的用户是管理员。 – Fr33dan 2012-04-23 17:07:25

回答

7

再一次,我终于想出了一个解决方案,但仍不能解释为什么这就是问题所在。

重新设置应用程序文件后,我注意到这一个引用创建了2个DLL应用程序文件列出。一个列为NationalInstruments.Common.Native.dll,另一个没有本地标记。 dll的本地其中一个默认包含在哪里,另一个默认为先决条件。如果我更改了先决条件以排除其他条款,并将其他条款包含在内,则应用程序将进行安装。其他NationalInstruments参考文献仅生成一个可以毫无问题地排除的DLL应用程序文件。

技术上我的问题解决,但如果有人能提供洞察力,为什么这参考产生2 DLL的,为什么即使不使用它一个也不能排除我将不胜感激。

+7

为什么downvote?这是我的问题的解决方案,所以解释这个答案有什么问题将不胜感激。 – Fr33dan 2013-08-31 15:29:03

+0

这解决了我的问题:DLL文件在我的项目的一个直接引用而在另一个使用的NuGet。再次 参考问题,但ClickOnce的错误消息,真的不翔实这里。 – was 2015-10-12 02:24:34

相关问题