Monday 30 June 2008

Code Metrics don't run with a reference to Microsoft.SharePoint.dll

I thought it might be worthwhile to run some code metrics on an event receiver that I'm writing to send emails when someone submits a request.

When running the metrics an error is returned:

Message: An error occurred while calculating code metrics for target file <YourFileName> in project <YourProjectName>. The following error was encountered while reading module 'Microsoft.SharePoint': Security attribute type does not have a default constructor: Microsoft.SharePoint.Security.SharePointPermissionAttribute, Microsoft.SharePoint.Security, Version=12.0.0.0, Culture=neutral, Publickeytoken=71e9bce111e9429c.

Solution: https://connect.microsoft.com/VisualStudio/feedback/Workaround.aspx?FeedbackID=324796

No comments: