我在silverlight项目的资源文件中添加了一个键。在构建此项目并在应用程序中替换其XAP文件clientBin后,它给出了以下错误
"An exception occurred while initializing module 'SubmissionRequerimentsVM'.
- The exception message was: An exception has occurred while trying to add a view to region 'WorkAreaRegion'.
- The most likely causing exception was was: 'System.Windows.Markup.XamlParseException: No matching constructor found on type 'CAN.AMI.Contracts.RenewalsSubmissionRequeriments.My.Resources.Resources'. [Line: 22 Position: 40] ---> System.MissingMethodException: No parameterless constructor defined for this object.
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache)
请帮助我解决这个问题,因为我被困在其中而没有找到任何解决方案。
答案 0 :(得分:2)
我遇到了这个问题。每当我在resource.resx.vb文件中的资源文件中添加新密钥时,默认构造函数将更改为Friend而不是Public。所以它导致了一个问题。 我刚把它改成公开,一切都很顺利。