Skip to main content

Microsoft Silverlight

Answered Question Warning in SL projectRSS Feed

(1)

codebased
codebased

Participant

Participant

806 points

360 Posts

Warning in SL project

Gents,

 I'm able to compile SL and Webapp. However, I am getting following two warnings:

 Warning 1 Custom tool warning: Removing unsupported type System.Windows.Controls.OpenFileDialog
System.TypeLoadException: Could not load type 'System.Security.SecuritySafeCriticalAttribute' from assembly 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
   at System.ModuleHandle.ResolveType(Int32 typeToken, RuntimeTypeHandle* typeInstArgs, Int32 typeInstCount, RuntimeTypeHandle* methodInstArgs, Int32 methodInstCount)
   at System.ModuleHandle.ResolveTypeHandle(Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
   at System.Reflection.Module.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
   at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, Module decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, RuntimeMethodHandle& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)
   at System.Reflection.CustomAttribute.IsCustomAttributeDefined(Module decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable)
   at System.Reflection.CustomAttribute.IsDefined(RuntimeType type, RuntimeType caType, Boolean inherit)
   at System.RuntimeType.IsDefined(Type attributeType, Boolean inherit)
   at Microsoft.VisualStudio.ServicesProxy.WcfSilverlightCodeGenerationExtension.WsdlImporting(WsdlImporter importer) C:\projects\2\UILayer\Silverlight\VisAdmin\Service References\VisAdminInterfacePort\Reference.svcmap 1 1 VisAdmin


 

Warning 2 Custom tool warning: Removing unsupported type System.Windows.Browser.HttpUtility
System.TypeLoadException: Could not load type 'System.Security.SecuritySafeCriticalAttribute' from assembly 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
   at System.ModuleHandle.ResolveType(Int32 typeToken, RuntimeTypeHandle* typeInstArgs, Int32 typeInstCount, RuntimeTypeHandle* methodInstArgs, Int32 methodInstCount)
   at System.ModuleHandle.ResolveTypeHandle(Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
   at System.Reflection.Module.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
   at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, Module decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, RuntimeMethodHandle& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)
   at System.Reflection.CustomAttribute.IsCustomAttributeDefined(Module decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable)
   at System.Reflection.CustomAttribute.IsDefined(RuntimeType type, RuntimeType caType, Boolean inherit)
   at System.RuntimeType.IsDefined(Type attributeType, Boolean inherit)
   at Microsoft.VisualStudio.ServicesProxy.WcfSilverlightCodeGenerationExtension.WsdlImporting(WsdlImporter importer) C:\projects\2\UILayer\Silverlight\VisAdmin\Service References\VisAdminInterfacePort\Reference.svcmap 1 1 VisAdmin

 

How to get away from it?

"If I've answered your query then please mark it as "Answered".

mchlsync
mchlsync

Star

Star

14606 points

2,730 Posts

Silverlight MVP

Re: Warning in SL project

Hello Codebased. Are you using two or more user accounts in this forum? Are you " RezaMohamed"?

I think you are referencing wrong dll or something. mscorlib (Microsoft Core Library) should be 2.0.5.0. This dll located under   c:\Program Files\Microsoft Silverlight\2.0.30226.2\.

(If this has answered your question, please click on "Mark as Answer" on this post. Thank you!)

Regards,
Michael Sync
Silverlight MVP

Blog : http://michaelsync.net


RezaMohamed
RezaMohamed

Member

Member

509 points

291 Posts

Re: Warning in SL project

Michael,

the original poster is not me, but its funny cause I was just talking to you about this on your blog with the same exact problem!

I guess when the errors come, they come in bunches.

-Reza

 

mchlsync
mchlsync

Star

Star

14606 points

2,730 Posts

Silverlight MVP

Re: Warning in SL project

Oh.. haha.. I thought both of you are the one. :)  

Anyway, did you check the assembly? how is it?  

(If this has answered your question, please click on "Mark as Answer" on this post. Thank you!)

Regards,
Michael Sync
Silverlight MVP

Blog : http://michaelsync.net


codebased
codebased

Participant

Participant

806 points

360 Posts

Re: Warning in SL project

I am a fan of SSO - Single Sign on   Stick out tongue

I dont know if it would be linked with what you are saying because when I clicked on warning, it openece reference.cs that is for web service reference that I'd added.

I'm off now and I will check tomorrow about it.

Cheers

Ricky

"If I've answered your query then please mark it as "Answered".

codebased
codebased

Participant

Participant

806 points

360 Posts

Re: Warning in SL project

mchlSync:

Hello Codebased. Are you using two or more user accounts in this forum? Are you " RezaMohamed"?

I think you are referencing wrong dll or something. mscorlib (Microsoft Core Library) should be 2.0.5.0. This dll located under   c:\Program Files\Microsoft Silverlight\2.0.30226.2\.

Umm... interesting:

I checked the following path: C:\Program Files\Microsoft Silverlight\2.0.30226.2\  and the file version is: mscorlib.dll -> 2.0.30226.2

How it should be 2.0.5.0?

BTW I got SL2.0 BETA 1 .... !

Cheers,
Ricky

"If I've answered your query then please mark it as "Answered".

Wilfred Pinto
Wilfred ...

Participant

Participant

1318 points

258 Posts

Re: Warning in SL project

I think Michael meant 2.0.30226.2 - which is the version you should be using.

You log indicates that your version of mscorlib is 2.0.0.0 so this could likely be the problem.
 

Wilfred Pinto
http://projectsilverlight.blogspot.com
 

Wilfred Pinto
http://projectsilverlight.blogspot.com


Please remember to mark the replies as answers if they help answer your question.

codebased
codebased

Participant

Participant

806 points

360 Posts

Re: Warning in SL project

Yeah that is what i could not figured out how it is showing 2.0...

any way to check, where?

"If I've answered your query then please mark it as "Answered".

mchlsync
mchlsync

Star

Star

14606 points

2,730 Posts

Silverlight MVP
Answered Question

Re: Warning in SL project

It's product version. I was talking about the assembly version.  Add this dll to your Silverlight project. then, right-click on dll and view it in Object Explorer... 

(If this has answered your question, please click on "Mark as Answer" on this post. Thank you!)

Regards,
Michael Sync
Silverlight MVP

Blog : http://michaelsync.net


codebased
codebased

Participant

Participant

806 points

360 Posts

Re: Warning in SL project

I'd checked that too previously and its 2.0.5.0.

 

But hang on.... my problem seems gone ... hey what its doing "Hide & sick;-)"

"If I've answered your query then please mark it as "Answered".

mchlsync
mchlsync

Star

Star

14606 points

2,730 Posts

Silverlight MVP

Re: Warning in SL project

codebased:
I'd checked that too previously and its 2.0.5.0.
 

but then, why shows 2.0.0.0 in error message? :-O  

codebased:
But hang on.... my problem seems gone ... hey what its doing "Hide & sick;-)"
 

Good. :) Hope Raz's problem should be solved too..  

 

(If this has answered your question, please click on "Mark as Answer" on this post. Thank you!)

Regards,
Michael Sync
Silverlight MVP

Blog : http://michaelsync.net


SamJazz
SamJazz

Member

Member

10 points

6 Posts

Re: Warning in SL project

I am using the correct version of the mscorlib and I am still getting these 2 warnings, however, only if my silverlight application is in VB  If it is in CS the warnings do not appear.  I cloned my CS silverlight project and changes the code behind module to VB and the warnings started?!!!  Any ideas?

 ---Sam

mchlsync
mchlsync

Star

Star

14606 points

2,730 Posts

Silverlight MVP

Re: Warning in SL project

 Hello Sam, codebased and Reza,

Alex DeJarnatt - MSFT said as below in this post,  So, well, I guess you should probably ignore those warning. :)

You can ignore those warnings, they shouldn't be getting generated at all.  I am working on getting rid of them right now, actually... Wink

 
Yes, there are some known issues in Beta 1 consuming amazon and other internet web services, and sharepoint web services for that matter.  Believe me, we are well aware of the issue. :)  For Beta 1 your best bet to get started is to use a WCF or asmx web service hosted in the same project that is hosting the silverlight control.  This stuff is def. better in Beta 2.

 

(If this has answered your question, please click on "Mark as Answer" on this post. Thank you!)

Regards,
Michael Sync
Silverlight MVP

Blog : http://michaelsync.net


SamJazz
SamJazz

Member

Member

10 points

6 Posts

Re: Warning in SL project

Sorry, I am wrong...This warning is occurring in both CS and VB Silverlight projects.  It occurs when I "Update Service Reference" and after I exit either project and reload it the warning goes away until I "Update Service Reference" again.  It is annoying but seemingly harmless.

---Sam

SamJazz
SamJazz

Member

Member

10 points

6 Posts

Re: Warning in SL project

Micheal,

Thank you for taking the time to answer this!

I would click on "Mark as Answer" if I could figure out how to do so. The topic itself is already marked as answered, so I guess this is ok.

Thanks again,

---Sam

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities