Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
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





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 02: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 02: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 06:08 AM
Chapter 8: Please insert HIW end rule. nclibrarian BOOK: Beginning Ruby on Rails 1 July 24th, 2007 11:58 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.