2

nuget パッケージから Postsharp 2.1 をインストールしてから、Phil Haack の NullGuard パッケージをインストールしました。

[EnsureNonNullAspect] アスペクトをクラスまたはメソッド レベルで追加すると、すぐに次のコンパイラ警告が表示されます。

Warning 1   Missing optimization information on method'
            NullGuard.PostSharp.EnsureNonNullAspect.OnEntry(
            PostSharp.Aspects.MethodExecutionArgs)'.
            This information is computed automatically by PostSharp.
            Make sure that assembly NullGuard.PostSharp is processed by PostSharp
Warning 2   Missing optimization information on method
            'NullGuard.PostSharp.EnsureNonNullAspect.OnExit(
            PostSharp.Aspects.MethodExecutionArgs)'.
            This information is computed automatically by PostSharp.
            Make sure that assembly NullGuard.PostSharp is processed by PostSharp

これは心配する必要がないかもしれませんが、次のようになります。

a) Google のどこにも答えが見つからないというコンパイラの警告が嫌いです。

b) 心配することかもしれません。

どんな助けでも大歓迎です。

乾杯!

トッド。

4

3 に答える 3

2

これは、アスペクト最適化機能が含まれていない無料版の PostSharp を使用しているためです。PostSharp.net で機能の比較を参照してください

https://github.com/Haacked/NullGuard/issues/3

于 2013-05-02T14:09:11.330 に答える
0

これは、その NuGet パッケージに含まれるライブラリが PostSharp によって処理されていないためです。

于 2013-05-06T10:11:33.017 に答える