I'm playing with a Silverlight app in Visual Studio so that I can learn programming with the API for Silverlight. I created a feature layer that points to a fire stations map service on our ArcGIS Server. I'm following the example in the getting started pages for creating a symbol in the Grid.Resources tag and using it as a static resource for the FeatureSymbol property of the FeatureLayer. When I comment out the SimpleMarkerSymbol tag in Grid.Resources, it builds fine, but won't run because it can't find the reference to MyMarkerSymbol. When I include the SimpleMarkerSymbol tag in Grid.Resources, I get a build error. Below are the error and my code. Any help would be appreciated.
Thanks, Doug
Error:
Error 1 The "ValidateXaml" task failed unexpectedly. System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies. The system cannot find the file specified. File name: 'System.Runtime.Serialization, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' 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.GetCustomAttributes(Module decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes) at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit) at System.RuntimeType.GetCustomAttributes(Type attributeType, Boolean inherit) at MS.Internal.Xaml.Schema.ClrType.GetCustomAttribute(Type attrType) at MS.Internal.Xaml.Schema.ClrType.LookupRuntimeNameProperty() at MS.Internal.Xaml.Schema.ClrType.LookupPropertyValue(NonBoolTypeValidBits typeBit) at MS.Internal.Xaml.Schema.ClrType.get_RuntimeNamePropertyCore() at MS.Internal.Xaml.Parser.XamlAttribute.Initialize(XamlParserContext context, XamlType ownerType, XamlNamespace ownerNamespace) at MS.Internal.Xaml.Parser.XamlScanner.PostprocessAttributes(XamlScannerNode node) at MS.Internal.Xaml.Parser.XamlScanner.ReadObjectElement(XamlName name, Boolean isEmptyTag) at MS.Internal.Xaml.Parser.XamlScanner.ReadElement() at MS.Internal.Xaml.Parser.XamlScanner.DoXmlRead() at MS.Internal.Xaml.Parser.XamlScanner.Read() at MS.Internal.Xaml.Parser.XamlPullParser.<P_PropertyElement>d__31.MoveNext() at MS.Internal.Xaml.Parser.XamlPullParser.<P_ElementBody>d__23.MoveNext() at MS.Internal.Xaml.Parser.XamlPullParser.<P_Element>d__7.MoveNext() at MS.Internal.Xaml.Parser.XamlPullParser.<P_ElementContent>d__39.MoveNext() at MS.Internal.Xaml.Parser.XamlPullParser.<P_ElementBody>d__23.MoveNext() at MS.Internal.Xaml.Parser.XamlPullParser.<P_Element>d__7.MoveNext() at MS.Internal.Xaml.Parser.XamlPullParser.<Parse>d__0.MoveNext() at MS.Internal.Xaml.TextReaderEnumerator.MoveNext() at MS.Internal.Xaml.XamlTextReader.Read() at MS.MarkupCompiler.ValidationPass.ValidateXaml(String fileName, Assembly[] assemblies, Assembly callingAssembly, TaskLoggingHelper log, Boolean shouldThrow) at Microsoft.Silverlight.Build.Tasks.ValidateXaml.XamlValidator.Execute() at Microsoft.Silverlight.Build.Tasks.ValidateXaml.XamlValidator.Execute() at Microsoft.Silverlight.Build.Tasks.ValidateXaml.Execute() at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult)
WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. ArcGISSilverlight