1
Vote

HeightMap Constructor Error, Silverlight 5

description

When I execute the constructor, it gives an error "The type initializer for 'Balder.Objects.Geometries.Geometry' threw an exception" System.TypeInitializationException was unhandled by user code
Message=The type initializer for 'Balder.Objects.Geometries.Geometry' threw an exception.
TypeName=Balder.Objects.Geometries.Geometry
StackTrace:
   at Balder.Objects.Geometries.Geometry..ctor(IGeometryContext geometryContext)
   at Balder.Objects.Geometries.ArbitraryHeightmap..ctor(IGeometryContext geometryContext)
   at Balder.Objects.Geometries.Heightmap..ctor(IGeometryContext geometryContext)
   at Balder.Objects.Geometries.Heightmap..ctor()
   at ESRI.PrototypeLab.Alpha.PhysicsHeightmap..ctor()
   at ESRI.PrototypeLab.Alpha.PhysicsGame.<>c__DisplayClass2b.<TileImageDownloadComplete>b__2a()
InnerException: System.Reflection.TargetInvocationException
   Message=Exception has been thrown by the target of an invocation.
   StackTrace:
        at System.RuntimeFieldHandle.GetValue(RtFieldInfo field, Object instance, RuntimeType fieldType, RuntimeType declaringType, Boolean& domainInitialized)
        at System.Reflection.RtFieldInfo.InternalGetValue(Object obj, Boolean doVisibilityCheck, Boolean doCheckConsistency)
        at System.Reflection.RtFieldInfo.GetValue(Object obj)
        at Balder.Execution.PropertyDescriptor.PopulateChildProperties()
        at Balder.Execution.PropertyDescriptor..ctor(Type ownerType, Type propertyType, Expression expression)
        at Balder.Execution.Property`2..ctor(Expression`1 expression, TP defaultValue, PropertyValueChanged`1 propertyValueChanged)
        at Balder.Execution.Property`2.Register(Expression`1 expression, PropertyValueChanged`1 propertyValueChanged, TP defaultValue)
        at Balder.Execution.Property`2.Register(Expression`1 expression, TP defaultValue)
        at Balder.Execution.Property`2.Register(Expression`1 expression)
        at Balder.Objects.Geometries.Geometry..cctor()
   InnerException: System.TypeInitializationException
        Message=The type initializer for 'Balder.Materials.Material' threw an exception.
        TypeName=Balder.Materials.Material
        InnerException: System.TypeInitializationException
             Message=The type initializer for 'Balder.Rendering.Xna.ShaderManager' threw an exception.
             TypeName=Balder.Rendering.Xna.ShaderManager
             StackTrace:
                  at Balder.Materials.Material.SetShader()
                  at Balder.Materials.Material.MaterialPropertiesChanged()
                  at Balder.Materials.Material.set_Shade(MaterialShade value)
                  at Balder.Materials.Material..ctor()
                  at Balder.Materials.Material..cctor()
             InnerException: System.NotSupportedException
                  Message=Loops in shaders require elevated trust permission and are disallowed in partial trust.
                  StackTrace:
                       at MS.Internal.XcpImportsMXFGS.CheckHResult(UInt32 hr)
                       at Microsoft.Xna.Framework.Graphics.ShaderHelper.CreateNativeResource(GraphicsDevice graphicsDevice, Boolean isVertex, Byte[] shaderByteCode, Int32 shaderByteCodeLength)
                       at Microsoft.Xna.Framework.Graphics.VertexShader..ctor(GraphicsDevice graphicsDevice, Byte[] shaderByteCode, Int32 byteCodeLength)
                       at Microsoft.Xna.Framework.Graphics.VertexShader.FromStream(GraphicsDevice graphicsDevice, Stream shaderByteCodeStream)
                       at Balder.Rendering.Xna.ShaderManager.GetVertexShader(String name)
                       at Balder.Rendering.Xna.ShaderManager..ctor()
                       at Balder.Rendering.Xna.ShaderManager..cctor()
                  InnerException: 

comments