剛剛從nuget包安裝了Postsharp 2.1,然後安裝了Phil Haack的NullGuard軟件包。編譯器警告「Missing optimization information」OnEntry和OnExit with NullGuard.PostSharp
正如我在任一類或方法級別添加[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)它可能是一些值得擔心的事情。
任何幫助將不勝感激。
乾杯!
Tod。
用響應更新了你的github問題:https://github.com/Haacked/NullGuard/issues/3 – 2013-05-01 13:45:38
所以我只是從GitHub中取出最新的源代碼,並且仍然收到相同的警告(僅適用於OnEntry和你預測的OnSuccess)。 – 2013-05-02 00:18:26