2011年11月18日金曜日

ClickOnceインストール先

ClickOnceを使うと下記フォルダー以下にインストールされる。
<Documents and Settings>/<ユーザ>/Local Settings/Apps/2.0

http://msdn2.microsoft.com/ja-jp/library/267k390a.aspx






2011年1月11日火曜日

VS2010でWindowsRepoerViewerがエラーになる

VisualStudio2008のVBで開発中のWindowsFormアプリでRepoerViewerを使用したフォームをVS2010で開こうとすると下記のエラーが発生。

ファイルまたはアセンブリ 'Microsoft.ReportDesigner, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'、またはその依存関係の 1 つが読み込めませんでした。
見つかったアセンブリのマニフェスト定義はアセンブリ参照に一致しません。 (HRESULT からの例外: 0x80131040)

対策
Microsoft.ReportDesigner アセンブリの"バージョンリダイレクト" をアプリケーション構成ファイルに記述する。

 Visual Studio 2010のEXEは
"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe"
なのでアプリケーション構成ファイルは

"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe.config"

となる。
devenv.exe.configを開いてruntime/assemblyBinding ノードの最後の子要素に下記を追加する。

      < dependentassembly >
        < assemblyidentity culture="neutral" name="Microsoft.ReportDesigner" publickeytoken="b03f5f7f11d50a3a">
          < bindingredirect newversion="10.0.0.0" oldversion="9.0.0.0">
          < /bindingredirect>
        < /assemblyidentity>
      < /dependentassembly >


追加したdevenv.exe.configを保存し、VS2010を再起動させてエラーが出なければOK