Skip to main content
Home Forums Silverlight Programming Programming with .NET - General Warning in SL project
14 replies. Latest Post by SamJazz on April 28, 2008.
(1)
codebased
Participant
806 points
360 Posts
04-16-2008 12:58 AM |
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.OpenFileDialogSystem.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.HttpUtilitySystem.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?
mchlsync
Star
14606 points
2,730 Posts
04-16-2008 2:09 AM |
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\.
RezaMohamed
Member
509 points
291 Posts
04-16-2008 2:29 AM |
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
04-16-2008 3:14 AM |
Oh.. haha.. I thought both of you are the one. :)
Anyway, did you check the assembly? how is it?
04-16-2008 6:15 AM |
I am a fan of SSO - Single Sign on
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
04-16-2008 7:14 PM |
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
Wilfred ...
1318 points
258 Posts
04-16-2008 7:22 PM |
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 Pintohttp://projectsilverlight.blogspot.com
04-16-2008 7:30 PM |
Yeah that is what i could not figured out how it is showing 2.0...
any way to check, where?
04-16-2008 8:21 PM |
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...
04-16-2008 8:25 PM |
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;-)"
04-16-2008 11:01 PM |
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..
SamJazz
10 points
6 Posts
04-28-2008 9:59 AM |
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
04-28-2008 10:18 AM |
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... 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.
You can ignore those warnings, they shouldn't be getting generated at all. I am working on getting rid of them right now, actually...
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.
04-28-2008 10:29 AM |
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.
04-28-2008 10:50 AM |
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,