StockTrader RI\Desktop\StockTraderRI\StockTraderRIBootstrapper.cs(29): [CLSCompliant(false)] ?????????

Topics: Prism v4 - Silverlight 4
Feb 23, 2011 at 12:37 PM

 

 Can someone tell me the the StockTraderRIBootstrapper class in the StockTRaderRI.Silverlight demo that uses Prism 4 was marked non cls compliant?

You can email me directly at stevensrf1@inbox.com with any comment or explanation.

[

CLSCompliant(false)]  

 

public partial class StockTraderRIBootstrapper : MefBootstrapper

{

Feb 23, 2011 at 2:54 PM

Hi,

The reason why the StockTraderRIBootstrapper class is decorated with the CLSCompliant attribute is because of an internal code analysis rules defined for demo applications provided with Prism.

You can check this rule set by clicking on Analyze menu -> Configure Code Analysis for StockTraderRI submenu. In the Rule Set´s Group Box click Open button. In the Microsoft.Design node you will find Mark assemblies with CLSCompliantAttribute action defined.

I hope you find this information useful.

Thanks,

Miguel Bronzovic
http://blogs.southworks.net/mbronzovic

Feb 24, 2011 at 5:03 AM
Then how come that class is the only class the is marked non compliant. You telling me out of all those hundreds of file that the stock trader silverlight project access that this is the only class that need to be marked non compliant. When I compared the stock trader silverlight bootstapper to the quick start modularity silverlight MEF bootstrapper there was really no difference in the code. In fact the stock trader silver light bootstapper had a lot less code in it than the modularity silverlight MEF bootstrapper.


From: [email removed]
To: [email removed]
Date: Wed, 23 Feb 2011 07:54:38 -0800
Subject: Re: StockTrader RI\Desktop\StockTraderRI\StockTraderRIBootstrapper.cs(29): [CLSCompliant(false)] ?... [CompositeWPF:247213]

From: mbronzovic
Hi,
The reason why the StockTraderRIBootstrapper class is decorated with the CLSCompliant attribute is because of an internal code analysis rules defined for demo applications provided with Prism.
You can check this rule set by clicking on Analyze menu -> Configure Code Analysis for StockTraderRI submenu. In the Rule Set´s Group Box click Open button. In the Microsoft.Design node you will find Mark assemblies with CLSCompliantAttribute action defined.
I hope you find this information useful.
Thanks,
Miguel Bronzovic
http://blogs.southworks.net/mbronzovic
Read the full discussion online.
To add a post to this discussion, reply to this email (CompositeWPF@discussions.codeplex.com)
To start a new discussion for this project, email CompositeWPF@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com
Developer
Feb 24, 2011 at 4:43 PM

Hi,

The StockTraderRIBootstrapper class in the Stock Trader Reference Implementation is marked as not CLS compliant because it inherits from the MefBootstrapper class, which is not CLS compliant (as it is inside the MefExtensions assembly, which has been declared as not CLS compliant).

In the Modularity with MEF QuickStarts, the CLSCompliant attribute isn't specified on the ModularityWithMef.Silverlight assembly, hence there is not need to specify that the QuickStartBootstrapper class is not CLS compliant. As for not defining the CLSCompliant attribute, there is a supression in the GlobalSuppressions.cs file inside the ModularityWithMef.Silverlight project:

[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1014:MarkAssembliesWithClsCompliant")]

I hope you find this helpful.

Guido Leandro Maliandi
http://blogs.southworks.net/gmaliandi

Feb 24, 2011 at 7:36 PM
Wow nice insight.
Well I am still a little in the dark but sooner or later I will see the light.
Thanks for the insight.


From: [email removed]
To: [email removed]
Date: Thu, 24 Feb 2011 09:43:08 -0800
Subject: Re: StockTrader RI\Desktop\StockTraderRI\StockTraderRIBootstrapper.cs(29): [CLSCompliant(false)] ?... [CompositeWPF:247213]

From: GuidoMaliandi
Hi,
The StockTraderRIBootstrapper class in the Stock Trader Reference Implementation is marked as not CLS compliant because it inherits from the MefBootstrapper class, which is not CLS compliant (as it is inside the MefExtensions assembly, which has been declared as not CLS compliant).
In the Modularity with MEF QuickStarts, the CLSCompliant attribute isn't specified on the ModularityWithMef.Silverlight assembly, hence there is not need to specify that the QuickStartBootstrapper class is not CLS compliant. As for not defining the CLSCompliant attribute, there is a supression in the GlobalSuppressions.cs file inside the ModularityWithMef.Silverlight project:
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1014:MarkAssembliesWithClsCompliant")]


I hope you find this helpful.
Guido Leandro Maliandi
http://blogs.southworks.net/gmaliandi

Read the full discussion online.
To add a post to this discussion, reply to this email (CompositeWPF@discussions.codeplex.com)
To start a new discussion for this project, email CompositeWPF@discussions.codeplex.com
You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.
Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com