私はVSに以下の警告をエラーとして扱わせようとしています。私は特定の警告も警告も表示されず、成功しませんでした(プロジェクトのオプション)。警告をエラーとして扱います
出力
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1490,5): warning MSB3247: Found conflicts between different versions of the same dependent assembly.
エラー一覧
Warning 1 Found conflicts between different versions of the same dependent assembly.
私が解決しようとしている問題は、このです:MyAppには、LIBA v1とLibB V1を参照しています。 LibB v1はLibA v2を参照しています。最初はバージョンの違いに気付かなかった。アセンブリに署名すると、警告が表示されます。可能であれば、私はそれを間違いとして扱いたいと思っています。それらは見過ごされる可能性のある警告よりもはるかに早く通知されるためです。
更新 Philの答えを使用した後、私は今このマクロを使用しています。これはおそらくaddinを作ることは可能ですが、私は今それを行う時間がありません。
Private Sub BuildEvents_OnBuildDone(ByVal Scope As EnvDTE.vsBuildScope, ByVal Action As EnvDTE.vsBuildAction) Handles BuildEvents.OnBuildDone
' Create a tool window handle for the Output window.
Dim win As Window = DTE.Windows.Item(EnvDTE.Constants.vsWindowKindOutput)
' Create handles to the Output window and its panes.
Dim OW As OutputWindow = win.Object
OW.ActivePane.TextDocument.Selection.SelectAll()
If OW.ActivePane.TextDocument.Selection.Text.Contains("MSB3247") Then
System.Windows.Forms.MessageBox.Show("Found conflicts between different versions of the same dependent assembly.", "warning MSB3247")
End If
End Sub
どのバージョンをプレイすることができますか? – Connell
私はVS2010でこれを試していますが、WinCEプロジェクトにはVS2008も使用しています。 – Stijn