次の方法で共有


Microsoft Dynamics 365 レポート作成拡張機能をインストールした後、Visual Studio 2015 が動作を停止する

この記事では、SQL Server Data Tools for Visual Studio を起動するときに発生するエラーの解決策について説明します。

適用対象:microsoft Dynamics CRM
元の KB 番号: 4032777

現象

Note

ここで説明する問題は、Microsoft Dynamics 365 レポート作成拡張機能のバージョン 8.2.2.248 で解決されています。

次のシナリオでは、

  • SQL Server Data Tools がインストールされた Visual Studio 2015 がインストールされています。
  • Microsoft Dynamics 365 レポート作成拡張機能 (バージョン 8.2.2.0171) をインストールする

SQL Server Data Tools for Visual Studio を起動すると、Visual Studio は次のメッセージで閉じます。

"Microsoft Visual Studio 2015 が動作を停止しました。"

Windows イベント ビューアーのエラーは次のようになります。

アプリケーション: devenv.exe
説明: プロセスは未処理の例外によって中止されました。
例外情報: System.IO.FileNotFoundException
at Microsoft.VisualStudio.Services.Client.AccountManagement.AccountManager.GetAccountProviderCore(System.Guid)
at Microsoft.VisualStudio.Services.Client.AccountManagement.AccountManager+<>c__DisplayClass32_0.<GetAccountProviderAsync>b__0()
at System.Threading.Tasks.Task'1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089].InnerInvoke()
at System.Threading.Tasks.Task.Execute()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task)

レポート作成拡張機能をアンインストールしても、問題は解決されません。

原因

この問題は、レポート作成拡張機能のセットアップ プロセスの問題が原因で発生します。 既定のインストール パスを使用してレポート作成拡張機能をインストールすると、次のアセンブリが C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDEに配置され、その場所に既に存在するファイルの古いバージョンが置き換えられます。

  • Microsoft.IdentityModel.Clients.ActiveDirectory.dll - ファイル バージョン: 2.22.x.x
  • Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll - ファイル バージョン: 2.22.x.x

devenv.exe.config ファイルには、バージョン 2.16.0.0 を引き続き指すバインド リダイレクト エントリが含まれているため、Visual Studio は存在しない古いバージョンのファイルを読み込もうとします。 レポート作成拡張機能のセットアップ プロセスでは、ファイルが置き換えられたときに、バージョン 2.22.0.0 を指すバインド リダイレクトが更新されませんでした。

解決方法

この問題を解決するには、次の手順に従って、devenv.exe.config ファイルのバインド リダイレクトをバージョン 2.22.0.0 を指すように変更します。

  • 次の 2 つのファイルを編集して、bindingRedirect エントリのバージョンの値を正しいバージョン 2.22.0.0 に変更します。

    • C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE - devenv.exe.config
    • C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies - PreviewProcessingService.exe.config

    Note

    既定とは異なるインストール場所を使用した場合は、Visual Studio をインストールした場所にこれらのファイルへのパスを変更する必要があります。
    PreviewProcessingService.exe.config ファイルに bindingRedirect がまだ含まれていない場合は、追加する必要はありません。

  • 両方のファイルで次のセクションを見つけます。

    <dependentAssembly>
        <assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="2.0.0.0-2.16.0.0" newVersion="2.16.0.0" />
    </dependentAssembly>
    <dependentAssembly>
        <assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="2.0.0.0-2.16.0.0" newVersion="2.16.0.0" />
    </dependentAssembly>
    
  • 次の行を次の行から変更します。

    <bindingRedirect oldVersion="2.0.0.0-2.16.0.0" newVersion="2.16.0.0" />
    移動先:
    <bindingRedirect oldVersion="2.0.0.0- **2.22.0.0**" newVersion="**2.22.0.0**" />

  • ファイルを保存し、Visual Studio を再起動します。