Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional Application Lifecycle Management with Visual Studio 2010
This is the forum to discuss the Wrox book Professional Application Lifecycle Management with Visual Studio 2010 by Mickey Gousset, Brian Keller, Ajoy Krishnamoorthy, Martin Woodward; ISBN: 9780470484265
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Application Lifecycle Management with Visual Studio 2010 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old March 4th, 2011, 04:36 PM
Registered User
 
Join Date: Mar 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 6 - Creating a new rule and deploying

I've converted the C# example to VB to the best of my knowledge. The custom rule assembly compiles fine and I've added it to the 'rules' folder.

Anyone know what I need to do to correct this?

When I then try and build the sample code analysis project, I receive the following errors:

Error 1 CA0054 : Error loading rule 'AvoidExposingPublicConstants': Exception has been thrown by the target of an invocation.

Error 2 CA0001 : Error loading rule 'BaseStaticAnalysisRule': No parameterless constructor defined for this object.

The BaseStaticAnalysisRule.vb class is written like this...

Code:
Imports System
Imports Microsoft.FxCop.Sdk

Namespace CustomCodeAnalysisRules

    Public Class BaseStaticAnalysisRule
        Inherits BaseIntrospectionRule


        Sub New(ByVal name As String)

            MyBase.New(name, "CustomCodeAnalysisRules.Rules", GetType(BaseStaticAnalysisRule).Assembly)

        End Sub


    End Class
End Namespace
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Possible error on Chapter 18: Deploying windows applications hshi BOOK: Beginning Microsoft Visual C# 2008 ISBN: 978-0-470-19135-4 1 October 17th, 2010 03:42 PM
Chapter 18 Deploying locally mat41 BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 3 September 14th, 2010 03:09 AM
Chapter 18: Deploying the Web Site ASPNETBeginner BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 7 September 6th, 2010 07:08 AM
Chapter 8: Please insert HIW end rule. nclibrarian BOOK: Beginning Ruby on Rails 1 July 25th, 2007 12:58 AM



All times are GMT -4. The time now is 12:33 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.