0

What is your experience with the Code Analysis Framework? Wrong error messages, overlook errors messages etc.

Error List:

  1. SPDispose Check and the SPSiteRootWeb - Wrong SPDispose Error Dispose SPSiteRootWeb

1 Answer 1

1

It might be helpful to be a little more specific in your question. It's definitely possible to get false positives in MSOCAF, and if you can provide a good explanation for it you should be able to submit the explanation as part of the documentation with your change request.

In this case, the rule you referred to is (I believe) generally triggered by explicitly disposing of SPSite.RootWeb object, instead of just disposing the SPSite itself. The RootWeb will be cleaned up automatically, and in fact manually disposing it can cause issues. Generally, just dispose of the SPSite as long as it's one that you're actually supposed to dispose (i.e. not just hanging off a context object). The links in the article you referenced have much more detail on these topics.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.