0

バックグラウンド:コマンドラインから2番目の完全に別のアプリケーション ConvertExcelTo.Exe を呼び出すことにより、xlsxファイルをcsvに変換するC#で書かれたwinformsアプリがあります。

エラーの概要:

   Application validation did not succeed. Unable to continue.
   - Reference in the manifest does not match the identity of the downloaded assembly
     ConvertExcelTo.exe.    
   - Source: System.Deployment
  • マニフェストと参照セクションを編集する方法/場所を教えてください。
  • このインストールをエラーなしで正しく行うには、何を変更する必要がありますか??

アセンブリ ConvertExcelTo - C:\Users\bmccarthy\Documents\Visual Studio 2008\Projects\CCP Utility 3-31-11\CCP Utility\bin\Debug\ConvertExcelTo.exe

参照の下に、ConvertExcelTo.vshost があります。 ()、Object()、ReferenceEquals(オブジェクト、オブジェクト)、ToString()。

完全なエラーの詳細:

      WARNINGS
* The manifest for this application does not have a signature. Signature validation 
      will be ignored.
* The manifest for this application does not have a signature. Signature validation 
      will be ignored.

      ERROR DETAILS
Following errors were detected during this operation.
* [4/6/2011] System.Deployment.Application.InvalidDeploymentException(RefDefValidation)
    - Reference in the manifest does not match the identity of the downloaded assembly 
      ConvertExcelTo.exe.
    - Source: System.Deployment
    - Stack trace:
        at System.Deployment.Application.DownloadManager.ProcessDownloadedFile(Object sender, DownloadEventArgs e)
        at System.Deployment.Application.FileDownloader.DownloadModifiedEventHandler.Invoke(Object sender, DownloadEventArgs e)
        at System.Deployment.Application.FileDownloader.OnModified()
        at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
        at System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
        at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState)
        at System.Deployment.Application.DownloadManager.DownloadDependencies(SubscriptionState subState, AssemblyManifest deployManifest, AssemblyManifest appManifest, Uri sourceUriBase, String targetDirectory, String group, IDownloadNotification notification, DownloadOptions options)
        at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
        at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
        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)

ConvertExcelTo.exe アプリケーションを呼び出す MainForm.cs のコードを次に示します。

            //Process that creates all the xlsx files in temp folder to csv files.
            Process convertFilesProcess = new Process();

            // command prompt execution for Converting Files from XLSX to CSV 
            //convertFilesProcess.StartInfo.WorkingDirectory = ConfigurationSettings.AppSettings["WorkingDirectory"].ToString();
            convertFilesProcess.StartInfo.FileName = "ConvertExcelTo.exe";
            convertFilesProcess.StartInfo.Arguments = " " + tempfolder + "\\ " + "csv";
            convertFilesProcess.StartInfo.UseShellExecute = false;
            convertFilesProcess.StartInfo.CreateNoWindow = true;
            convertFilesProcess.StartInfo.RedirectStandardInput = true;
            convertFilesProcess.StartInfo.RedirectStandardOutput = true;
            convertFilesProcess.StartInfo.RedirectStandardError = true;
            convertFilesProcess.Start();
            convertFilesProcess.WaitForExit();

            StreamReader sOut = convertFilesProcess.StandardOutput;
            StreamReader sErr = convertFilesProcess.StandardError;
            sOut.Close();
            sErr.Close();

ご覧いただきありがとうございます。

4

2 に答える 2

1

説明してくれてありがとう。こちらのページをご覧ください。これにより、配置マニフェストを編集する方法を説明します。ConvertExcelTo.exeを別のアプリケーションとしてインストールする必要があります。マニフェストを介してインストールプロセスの前提条件として追加し、インストールにブートストラップすることができます。ここでブートストラップに関するいくつかの情報。VS 2005用ですが、プロセスは変わっていないと思います。BootstrapManifestGeneratorアプリはこちらです。[ダウンロード]タブをクリックするだけです。これがお役に立てば幸いです。

于 2011-04-06T15:14:23.033 に答える
1

コマンド ラインから 2 番目の完全に別のアプリケーション ConvertExcelTo.Exe を呼び出すことによって

それはあなたがしていることではなく、実際にそのEXEアセンブリを読み込もうとしています。実行可能ファイルのビジュアル スタジオ ホスティング プロセス バージョンを介して 2 回、EXE をデバッグする場合にのみ関連します。再び通常のEXEを介して。これが可能なのは.NETのちょっとした癖で、非常に限られたケースで便利です。ここではありません。CLR は、これにヒッシーなフィット感を投げかけています。

追加したアセンブリ参照を削除します。Process クラスを使用して、このプログラムを開始します。

于 2011-04-06T15:22:23.137 に答える