PC Review


Reply
Thread Tools Rate Thread

Attribute '<Attribute>' cannot be applied to an assembly

 
 
Crazy Cat
Guest
Posts: n/a
 
      12th Oct 2010
Hi,

I am rewriting a COM+ application originally written in VB 6.0 to run
in .NET 3.5. When I attempt to set
attribute values for some attributes I am getting the following -- for
example if I try to set TransactionAttribute
I get the following error -- Attribute 'TransactionAttribute' cannot
be applied to an assembly.

What in the hell does this mean? I can't find any documentation beyond
the following blurb in msdn --
You attempted to apply an attribute to an assembly whose
AttributeUsageAttribute does not specify AttributeTargets.Assembly.
When the attribute was declared, it was not defined to be applicable
to an assembly.

Here's the code segment that is causing my grief ---

<Assembly: ApplicationActivation(ActivationOption.Server)> _
<Assembly: ApplicationAccessControl(False,
AccessChecksLevel:=AccessChecksLevelOption.ApplicationComponent)>
<Assembly: Transaction(TransactionOption.Required)>
Public Class SomeClass
Inherits ServicedComponent

Public ServerAddress As String
Public DatabaseName As String
Public UserName As String


Please help!

Thanks,

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
When is the System.ComponentModel.DefaultValue attribute applied? Nathan Sokalski Microsoft ASP .NET 2 27th Jan 2009 02:46 PM
When is the System.ComponentModel.DefaultValue attribute applied? Nathan Sokalski Microsoft VB .NET 2 27th Jan 2009 02:46 PM
Is there a way to change attribute of an assembly (i.e. Executing Assembly) during runtime? gulfam.murad@gmail.com Microsoft Dot NET 1 15th Dec 2005 07:44 PM
Getting a class instance from within the applied attribute =?Utf-8?B?V291dGVyIGRlIEtvcnQ=?= Microsoft C# .NET 2 13th Nov 2005 08:52 PM
Can attribute be inherited with the class it applied to? feng Microsoft VB .NET 2 8th May 2004 02:35 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:37 PM.