Skip to main content

Microsoft Silverlight

Answered Question Exception!!! I can't create new silverlight applicationRSS Feed

(0)

ZhangTeng
ZhangTeng

Member

Member

4 points

18 Posts

Exception!!! I can't create new silverlight application

The exception occured when I create new silverlight application,I setup all the software from GetStarted of silverlight.net 

Exception has been thrown by the target of an invocation.
   at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at MS.Internal.Package.MetadataLoader.InitializeProfileMetadata(RegistryKey registryRoot, String profile, LogCallback logger)
   at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedDesignerFactory.CreateDesigner(DesignerContext context)
   at MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.CreateDesigner(IsolatedDesignerFactory factory, IDesignerContextProtocol contextProtocol)
   at MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.CreateDesigner(IsolatedDesignerFactory factory, IDesignerContextProtocol contextProtocol)
   at MS.Internal.Host.Isolation.IsolatedDesigner.Load()
   at MS.Internal.Designer.DesignerPane.LoadDesignerView()


Could not load type 'System.Windows.Controls.WebBrowser' from assembly 'PresentationFramework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
   at Microsoft.Windows.Design.Metadata.DeveloperMetadata.DeveloperMetadataBuilder.AddWebBrowserAttributes()
   at Microsoft.Windows.Design.Metadata.DeveloperMetadata.DeveloperMetadataBuilder..ctor()
   at Microsoft.Windows.Design.Metadata.DeveloperMetadata.get_CustomAttributes()
   at Microsoft.Windows.Design.Metadata.DeveloperMetadata.Initialize()

SilverlightCoderCom
Silverli...

Member

Member

124 points

23 Posts

Re: Exception!!! I can't create new silverlight application

  Normal 0 false false false MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;}

It is a kind of installation issue.  It can be resolved by reinstall them.   If your problem persists there, please feel free to let me know.

 I have also same problem. While investigation i found the some dll’s related with silverlight 2 -2beta which causing the problem.

Steps to resolve

1. un-install the silverlight 2 RTM.

2. Delete folder "2.0.30523.8" from C:\Program Files\Microsoft Silverlight.

3. Install the silverlight_tool.exe

Try to test your silverlight application.

Please click on 'Mark as answer' near my comment if you feel I answered your question.


Silverlightcoder Team
http://silverlightcoder.com

ZhangTeng
ZhangTeng

Member

Member

4 points

18 Posts

Re: Exception!!! I can't create new silverlight application

thank you !,I wana tell you ,I've not install any silverlight RTM and beta,this problem occurs when I install silverlight at first time.

I have tried one more time,but it doesn't work!! By the way ,my operation system is vista,but not vista sp1,is this problem? and I intalled the blend,it worked well,but it doesn't work when I install blend sp1

Amanda Wang - MSFT
Amanda W...

All-Star

All-Star

17241 points

1,466 Posts

Answered Question

Re: Exception!!! I can't create new silverlight application

 Hi,

From the error we can see:

ZhangTeng:
Could not load type 'System.Windows.Controls.WebBrowser' from assembly 'PresentationFramework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
   at Microsoft.Windows.Design.Metadata.DeveloperMetadata.DeveloperMetadataBuilder.AddWebBrowserAttributes()
   at Microsoft.Windows.Design.Metadata.DeveloperMetadata.DeveloperMetadataBuilder..ctor()
   at Microsoft.Windows.Design.Metadata.DeveloperMetadata.get_CustomAttributes()
   at Microsoft.Windows.Design.Metadata.DeveloperMetadata.Initialize()
 

Did you refer the .dll file of System.Windows.Controls.WebBrowser? Or did you refer the namespace System.Windows.Controls.WebBrowser?

But there is not  System.Windows.Controls.WebBrowser in Silverlight. It seems is a control in WinForm.

You can try to use change  System.Windows.Controls.WebBrowser into System.Windows.Browser;

Amanda Wang
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities