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

  • Question

  • 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 ____ 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,
    Wednesday, October 13, 2010 1:40 PM