LoginSignup
0
1

More than 5 years have passed since last update.

CLRのexe.configの出力方法

Posted at

概要

CLRのexe.configの出力方法

アプリケーションの場合

.vcprojを開き

<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>

を追加

ライブラリの場合

.vcprojを開き

<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>

を追加

注意

ライブラリの場合上記設定で出力されるがNativeから参照した場合に自動的に使ってはくれなさそうで

AppDomain.CurrentDomain.AssemblyResolve

を使ってリダイレクト処理を書く必要がありそう

参考

https://social.msdn.microsoft.com/Forums/vstudio/en-US/fae48caa-7746-4c8f-9c44-839bd23ed128/warning-c4691-when-building-a-ccli-executable-referencing-microsoftextensionslogging-via-nuget?forum=vcgeneral
https://blog.slaks.net/2013-12-25/redirecting-assembly-loads-at-runtime/

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1