upgrading from silverlight 4 to silverlight 5 creates lot of problems

999
4
03-28-2012 01:15 PM
ForamParikh
Occasional Contributor
Hello everyone,

It may be silverlight problem not arcgis problem but if any one faces same problem please help me,

I am working on silverlight arcgis application and application works gr8 on silverlight4 but i installed silverlight 5

and it started creating lots of problem

1) in silverlight 4 zoom in to location was working but in silverlight 5 if i try to aoom in to location it gives me

some weird error

Error: Unhandled Error in Silverlight Application
Code: 1001   
Category: RuntimeError      
Message: AG_E_UNKNOWN_ERROR    
MethodName:     

2) Safari :- in silverlight 4 it was working perfectly fine in safari but in silverlight 5 i am not even able to view my page.
you can check
http://pipelineforthefuture.org and if you click on pipeline project data base it will work in IE but it will not work on safari.
and also if you
click any point (feature) on the map and click on zoom in to location you will see blank page it was working fine in silverlight 4
but what if client use silverlight 5?
--------------------------------------------------------------------------------------
in visual studio i notice below problems.
I installed silverlight 5 and silverlight dev run time 5 and i am able to debug it but
1) in project properties targetsilverlightversion it still says 4 not 5.
2) i am not able to view design window earlier if i click on design i can see my controls but now i am getting weird error in all pages
System.NullReferenceException
Object reference not set to an instance of an object.
   at Microsoft.Windows.Design.Platform.SilverlightMetadataContext.SilverlightXamlExtensionImplementations.<GetXmlNamespaceCompatibilityMappings>d__8.MoveNext()
   at MS.Internal.Design.Metadata.ReflectionProjectNode.BuildSubsumption()
   at MS.Internal.Design.Metadata.ReflectionProjectNode.SubsumingNamespace(Identifier identifier)
   at MS.Internal.Design.Markup.XmlElement.BuildScope(PrefixScope parentScope, IParseContext context....
3) in my xmal page i am not able to see expand/Collapse widget any more i tried toggle outlining expansion and all but no luck.
Please help,

Thanks
Foram
0 Kudos
4 Replies
wangzhifang
Occasional Contributor
FYI,
ArcGIS API for Silverlight 2.4 only supports Silverlight 4, not 5.
ArcGIS API for Silverlight 3.0 beta 2 supports Silverlight 5.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
I installed silverlight 5 and silverlight dev run time 5 and i am able to debug it but
1) in project properties targetsilverlightversion it still says 4 not 5.


To be able to create Silverlight5 project in Visual Studio you need to install Microsoft® Silverlight® 5 Tools for Visual Studio® 2010 SP1

That being said, my undestanding is that your Silverlight 4 application is not working with the Silverlight 5 runtime. Correct?
That's strange, Silverlight5 runtime is supposed to be backward compatible and support SL4 application.

Could you debug your SL4 application and give us some info about the stack trace when the error occurs? That might give a clue.

Thanks
0 Kudos
ForamParikh
Occasional Contributor
Hello,

I installed service pack and now everything is working fine.

and i found why mymap.zoomtoresolution is not working its because i am using effect 

    ESRI.PrototypeLab.ShyBasemap.TintShaderEffect effect = new ESRI.PrototypeLab.ShyBasemap.TintShaderEffect();
    effect.TintColor = Color.FromArgb(255, 240, 240, 240);
    ArcGISTiledMapServiceLayer l = (ArcGISTiledMapServiceLayer)this.MyMap.Layers["BaseLayer"];
    l.Effect = effect;

so when i comment this code everything works fine in SL5 also

but i want to give effect to basemap can you please help me?how to fix this bug?or any one know latest prototypelab's latest dll?which works on SL5 also?

Please help,
Thanks
Foram
0 Kudos
ForamParikh
Occasional Contributor
to change background color i follow http://www.arcgis.com/home/item.html?id=baad59c4c3d64e0ea635e31d492db076

and i found my solution.;)

Thanks
0 Kudos