A few months back I was partway through an article about XNA. I was going to cover how to implement efficient “Thread Local Storage” on the Xbox 360. Back in Game Studio v3.1 I found that the [ThreadStatic] attribute was not supported on the Xbox, and the only workable methods out of the box were the Thread.GetData(), Thread.SetData() methods. Those methods aren’t good performance-wise, so I proceeded to look at more efficient alternatives.
That article was going to detail the solution I came up with, and currently used in my engine. However upon revisiting the work recently and upgrading to the new v4.0 XNA, I found that I had some compile errors. Specifically ‘System.Threading.LocalDataStoreSlot’ was now missing, it’s that slow method of TLS I was using to benchmark against. So I commented that code out. I then figured why not for the hell of it try to enable the [ThreadStatic] code, that I had #ifdef’d to the WINDOWS build. Lo and behold, it now compiled on Xbox 360!
No idea if it’s any better performing than the old ‘LocalDataStoreSlot’ though, or better than the alternate method I came up with. That’s an exercise for another day.
My Googling Escapades
The only article I could find back when I was working on 3.1 about [ThreadStatic] on Xbox was this one. Doing a search now, I couldn’t find anything else new. I also tried searching for information about “LocalDataStoreSlot”, the class which was removed in the 4.0 upgrade. Again, I found nothing about the removal.
I also had noticed in some other code I have that the ‘System.Diagnostics.Trace’ class, and static functions therein were also removed. Now I start to scratch my head a little and wonder what else has disappeared, and what other cool things may have been added. My searches weren’t very fruitful, I just found a handful of forum posts which mentioned briefly some sort of changes to the Compact Framework (I’ve included them in my references at the bottom of this page). Nothing complete and comprehensive which listed all the differences.
The MSDN documentation does denote on the page for each class, type, function… which platforms it is available on. There’s also a dropdown to switch the framework version. I confess I found it a bit unwieldy to check up on. For example ‘ThreadStaticAttribute’ shows a ‘Silverlight’ entry in the dropdown box. On that page it denotes that it works on the Xbox 360. Where ‘LocalDataStoreSlot’ (the one which was removed), does not have Silverlight in it’s list, but does show XNA support for the 360 on the 3.5 Framework. Which tells me that it used to work, but now is deprecated in the Silverlight-compliant Framework.
Anyhow, checking these things one-by-one isn’t exactly viable.
Taking a dump
Knowing that there was a number of changes, but not knowing exactly what those changes were; I was still a little curious. What I did was to use the ‘ildasm’ tool to dump the types which existed in the .NET Framework DLL files.
For those equally curious, they reside here:
C:\Program Files\Microsoft XNA\XNA Game Studio\v3.1\References\Xbox360
and here:
C:\Program Files\Microsoft XNA\XNA Game Studio\v4.0\References\Xbox360
Or wherever your “\Program Files” directory lies.
With a little tinkering I could collate that output and determine the changes which occurred between the two versions of the Framework. I omitted the “Microsoft.Xna.Framework.Input.Touch” library from the output though, since new Xbox 360 projects do not include it as a reference. I’m unsure though as to why there is a DLL sitting in the “Xbox 360” directory. Possibly early Natal/Kinect support code? Heh, I doubt it. I’m guessing it’s just stub functionality for parity with the Windows 7 phones.
So anyhow, here’s the data I collected. Hopefully others may find this useful… Or possibly just point me to a website that had this information already. 🙂
System types removed from the Xbox 360 Compact Framework
These are types which used to exist in the Compact Framework for the Xbox 360, in the “XNA Game Studio” v3.1 release. But these are now missing from the new v4.0 release:
Microsoft.Xna.Framework.BatteryChargeStatus Microsoft.Xna.Framework.Graphics.BasicDirectionalLight Microsoft.Xna.Framework.Graphics.ClipPlane Microsoft.Xna.Framework.Graphics.ClipPlaneCollection Microsoft.Xna.Framework.Graphics.Color Microsoft.Xna.Framework.Graphics.CompilerOptions Microsoft.Xna.Framework.Graphics.DepthStencilBuffer Microsoft.Xna.Framework.Graphics.DeviceNotSupportedException Microsoft.Xna.Framework.Graphics.DeviceStillDrawingException Microsoft.Xna.Framework.Graphics.DeviceType Microsoft.Xna.Framework.Graphics.DriverInternalErrorException Microsoft.Xna.Framework.Graphics.EffectFunction Microsoft.Xna.Framework.Graphics.EffectFunctionCollection Microsoft.Xna.Framework.Graphics.EffectParameterBlock Microsoft.Xna.Framework.Graphics.EffectPool Microsoft.Xna.Framework.Graphics.GammaRamp Microsoft.Xna.Framework.Graphics.GraphicsDeviceCapabilities Microsoft.Xna.Framework.Graphics.GraphicsDeviceCapabilities/AddressCaps Microsoft.Xna.Framework.Graphics.GraphicsDeviceCapabilities/BlendCaps Microsoft.Xna.Framework.Graphics.GraphicsDeviceCapabilities/CompareCaps Microsoft.Xna.Framework.Graphics.GraphicsDeviceCapabilities/CursorCaps Microsoft.Xna.Framework.Graphics.GraphicsDeviceCapabilities/DeclarationTypeCaps Microsoft.Xna.Framework.Graphics.GraphicsDeviceCapabilities/DeviceCaps Microsoft.Xna.Framework.Graphics.GraphicsDeviceCapabilities/DriverCaps Microsoft.Xna.Framework.Graphics.GraphicsDeviceCapabilities/FilterCaps Microsoft.Xna.Framework.Graphics.GraphicsDeviceCapabilities/LineCaps Microsoft.Xna.Framework.Graphics.GraphicsDeviceCapabilities/PixelShaderCaps Microsoft.Xna.Framework.Graphics.GraphicsDeviceCapabilities/PrimitiveCaps Microsoft.Xna.Framework.Graphics.GraphicsDeviceCapabilities/RasterCaps Microsoft.Xna.Framework.Graphics.GraphicsDeviceCapabilities/ShadingCaps Microsoft.Xna.Framework.Graphics.GraphicsDeviceCapabilities/StencilCaps Microsoft.Xna.Framework.Graphics.GraphicsDeviceCapabilities/TextureCaps Microsoft.Xna.Framework.Graphics.GraphicsDeviceCapabilities/VertexFormatCaps Microsoft.Xna.Framework.Graphics.GraphicsDeviceCapabilities/VertexProcessingCaps Microsoft.Xna.Framework.Graphics.GraphicsDeviceCapabilities/VertexShaderCaps Microsoft.Xna.Framework.Graphics.GraphicsDeviceCreationParameters Microsoft.Xna.Framework.Graphics.MultiSampleType Microsoft.Xna.Framework.Graphics.OutOfVideoMemoryException Microsoft.Xna.Framework.Graphics.PackedVector.Normalized101010 Microsoft.Xna.Framework.Graphics.PackedVector.Rgba32 Microsoft.Xna.Framework.Graphics.PackedVector.UInt101010 Microsoft.Xna.Framework.Graphics.PixelShader Microsoft.Xna.Framework.Graphics.PresentOptions Microsoft.Xna.Framework.Graphics.QueryUsages Microsoft.Xna.Framework.Graphics.RasterStatus Microsoft.Xna.Framework.Graphics.RenderState Microsoft.Xna.Framework.Graphics.RenderTarget Microsoft.Xna.Framework.Graphics.ResolveTexture2D Microsoft.Xna.Framework.Graphics.ResourceType Microsoft.Xna.Framework.Graphics.SaveStateMode Microsoft.Xna.Framework.Graphics.ShaderConstant Microsoft.Xna.Framework.Graphics.ShaderConstantCollection Microsoft.Xna.Framework.Graphics.ShaderConstantTable Microsoft.Xna.Framework.Graphics.ShaderProfile Microsoft.Xna.Framework.Graphics.ShaderRegisterSet Microsoft.Xna.Framework.Graphics.SpriteBlendMode Microsoft.Xna.Framework.Graphics.StateBlock Microsoft.Xna.Framework.Graphics.SwapEffect Microsoft.Xna.Framework.Graphics.TextureUsage Microsoft.Xna.Framework.Graphics.TextureWrapCoordinates Microsoft.Xna.Framework.Graphics.VertexElementMethod Microsoft.Xna.Framework.Graphics.VertexShader Microsoft.Xna.Framework.Graphics.VertexStream Microsoft.Xna.Framework.Graphics.VertexStreamCollection Microsoft.Xna.Framework.Net.InviteAcceptedEventArgs Microsoft.Xna.Framework.Net.NetworkException Microsoft.Xna.Framework.Net.NetworkNotAvailableException Microsoft.Xna.Framework.NoSuitableGraphicsDeviceException Microsoft.Xna.Framework.PowerLineStatus Microsoft.Xna.Framework.PowerStatus System.ApplicationException System.CharEnumerator System.Collections.ArrayList System.Collections.CaseInsensitiveComparer System.Collections.CaseInsensitiveHashCodeProvider System.Collections.CollectionBase System.Collections.Comparer System.Collections.Generic.SortedList`2 System.Collections.Hashtable System.Collections.IHashCodeProvider System.Collections.Queue System.Collections.SortedList System.Collections.Specialized.BitVector32 System.Collections.Specialized.BitVector32/Section System.Collections.Specialized.HybridDictionary System.Collections.Specialized.ListDictionary System.Collections.Specialized.NameObjectCollectionBase System.Collections.Specialized.NameObjectCollectionBase/KeysCollection System.Collections.Specialized.NameValueCollection System.Collections.Specialized.StringDictionary System.Collections.Stack System.ComponentModel.AddingNewEventArgs System.ComponentModel.AddingNewEventHandler System.ComponentModel.AttributeCollection System.ComponentModel.BindingList`1 System.ComponentModel.CancelEventHandler System.ComponentModel.CollectionChangeAction System.ComponentModel.CollectionChangeEventArgs System.ComponentModel.CollectionChangeEventHandler System.ComponentModel.Component System.ComponentModel.ComponentResourceManager System.ComponentModel.Container System.ComponentModel.DataObjectAttribute System.ComponentModel.DataObjectMethodAttribute System.ComponentModel.DataObjectMethodType System.ComponentModel.DesignerCategoryAttribute System.ComponentModel.DesignTimeVisibleAttribute System.ComponentModel.EventDescriptor System.ComponentModel.EventDescriptorCollection System.ComponentModel.EventHandlerList System.ComponentModel.IBindingList System.ComponentModel.IBindingListView System.ComponentModel.ICancelAddNew System.ComponentModel.ICustomTypeDescriptor System.ComponentModel.IDataErrorInfo System.ComponentModel.IListSource System.ComponentModel.IRaiseItemChangedEvents System.ComponentModel.ISupportInitialize System.ComponentModel.ISupportInitializeNotification System.ComponentModel.ITypedList System.ComponentModel.ListChangedEventArgs System.ComponentModel.ListChangedEventHandler System.ComponentModel.ListChangedType System.ComponentModel.ListSortDescription System.ComponentModel.ListSortDescriptionCollection System.ComponentModel.MarshalByValueComponent System.ComponentModel.MemberDescriptor System.ComponentModel.PropertyDescriptorCollection System.ComponentModel.TypeDescriptor System.ComponentModel.Win32Exception System.Diagnostics.DefaultTraceListener System.Diagnostics.TextWriterTraceListener System.Diagnostics.Trace System.Diagnostics.TraceListener System.Diagnostics.TraceListenerCollection System.Globalization.CultureTypes System.Globalization.DaylightTime System.IO.Compression.CompressionMode System.IO.Compression.DeflateStream System.IO.Compression.GZipStream System.IO.InvalidDataException System.MarshalByRefObject System.Resources.ResourceReader System.Security.Policy.Evidence System.SerializableAttribute System.Text.ASCIIEncoding System.Text.RegularExpressions.RegexRunner System.Text.RegularExpressions.RegexRunnerFactory System.Text.UTF7Encoding System.Threading.EventResetMode System.Threading.Mutex System.Threading.ThreadPriority System.TimeZone System.TypedReference System.UriHostNameType System.UriPartial System.Xml.EntityHandling System.Xml.Formatting System.Xml.IHasXmlNode System.Xml.Schema.IXmlSchemaInfo System.Xml.Schema.ValidationEventArgs System.Xml.Schema.ValidationEventHandler System.Xml.Schema.XmlAtomicValue System.Xml.Schema.XmlSchemaAll System.Xml.Schema.XmlSchemaAnnotated System.Xml.Schema.XmlSchemaAnnotation System.Xml.Schema.XmlSchemaAny System.Xml.Schema.XmlSchemaAnyAttribute System.Xml.Schema.XmlSchemaAppInfo System.Xml.Schema.XmlSchemaAttribute System.Xml.Schema.XmlSchemaAttributeGroup System.Xml.Schema.XmlSchemaAttributeGroupRef System.Xml.Schema.XmlSchemaChoice System.Xml.Schema.XmlSchemaCompilationSettings System.Xml.Schema.XmlSchemaComplexContent System.Xml.Schema.XmlSchemaComplexContentExtension System.Xml.Schema.XmlSchemaComplexContentRestriction System.Xml.Schema.XmlSchemaComplexType System.Xml.Schema.XmlSchemaContent System.Xml.Schema.XmlSchemaContentModel System.Xml.Schema.XmlSchemaContentProcessing System.Xml.Schema.XmlSchemaContentType System.Xml.Schema.XmlSchemaDatatype System.Xml.Schema.XmlSchemaDatatypeVariety System.Xml.Schema.XmlSchemaDerivationMethod System.Xml.Schema.XmlSchemaDocumentation System.Xml.Schema.XmlSchemaElement System.Xml.Schema.XmlSchemaEnumerationFacet System.Xml.Schema.XmlSchemaException System.Xml.Schema.XmlSchemaExternal System.Xml.Schema.XmlSchemaFacet System.Xml.Schema.XmlSchemaFractionDigitsFacet System.Xml.Schema.XmlSchemaGroup System.Xml.Schema.XmlSchemaGroupBase System.Xml.Schema.XmlSchemaGroupRef System.Xml.Schema.XmlSchemaIdentityConstraint System.Xml.Schema.XmlSchemaImport System.Xml.Schema.XmlSchemaInclude System.Xml.Schema.XmlSchemaInference System.Xml.Schema.XmlSchemaInference/InferenceOption System.Xml.Schema.XmlSchemaInferenceException System.Xml.Schema.XmlSchemaInfo System.Xml.Schema.XmlSchemaKey System.Xml.Schema.XmlSchemaKeyref System.Xml.Schema.XmlSchemaLengthFacet System.Xml.Schema.XmlSchemaMaxExclusiveFacet System.Xml.Schema.XmlSchemaMaxInclusiveFacet System.Xml.Schema.XmlSchemaMaxLengthFacet System.Xml.Schema.XmlSchemaMinExclusiveFacet System.Xml.Schema.XmlSchemaMinInclusiveFacet System.Xml.Schema.XmlSchemaMinLengthFacet System.Xml.Schema.XmlSchemaNotation System.Xml.Schema.XmlSchemaNumericFacet System.Xml.Schema.XmlSchemaObjectCollection System.Xml.Schema.XmlSchemaObjectEnumerator System.Xml.Schema.XmlSchemaObjectTable System.Xml.Schema.XmlSchemaParticle System.Xml.Schema.XmlSchemaPatternFacet System.Xml.Schema.XmlSchemaRedefine System.Xml.Schema.XmlSchemaSequence System.Xml.Schema.XmlSchemaSimpleContent System.Xml.Schema.XmlSchemaSimpleContentExtension System.Xml.Schema.XmlSchemaSimpleContentRestriction System.Xml.Schema.XmlSchemaSimpleType System.Xml.Schema.XmlSchemaSimpleTypeContent System.Xml.Schema.XmlSchemaSimpleTypeList System.Xml.Schema.XmlSchemaSimpleTypeRestriction System.Xml.Schema.XmlSchemaSimpleTypeUnion System.Xml.Schema.XmlSchemaTotalDigitsFacet System.Xml.Schema.XmlSchemaType System.Xml.Schema.XmlSchemaUnique System.Xml.Schema.XmlSchemaUse System.Xml.Schema.XmlSchemaValidationException System.Xml.Schema.XmlSchemaValidationFlags System.Xml.Schema.XmlSchemaValidator System.Xml.Schema.XmlSchemaValidity System.Xml.Schema.XmlSchemaWhiteSpaceFacet System.Xml.Schema.XmlSchemaXPath System.Xml.Schema.XmlValueGetter System.Xml.Serialization.IXmlTextParser System.Xml.Serialization.SoapAttributeAttribute System.Xml.Serialization.SoapAttributeOverrides System.Xml.Serialization.SoapAttributes System.Xml.Serialization.SoapElementAttribute System.Xml.Serialization.SoapEnumAttribute System.Xml.Serialization.SoapIgnoreAttribute System.Xml.Serialization.SoapIncludeAttribute System.Xml.Serialization.SoapReflectionImporter System.Xml.Serialization.SoapTypeAttribute System.Xml.Serialization.UnreferencedObjectEventArgs System.Xml.Serialization.UnreferencedObjectEventHandler System.Xml.Serialization.XmlAnyAttributeAttribute System.Xml.Serialization.XmlAttributeEventArgs System.Xml.Serialization.XmlAttributeEventHandler System.Xml.Serialization.XmlElementEventArgs System.Xml.Serialization.XmlElementEventHandler System.Xml.Serialization.XmlNodeEventArgs System.Xml.Serialization.XmlNodeEventHandler System.Xml.ValidationType System.Xml.WhitespaceHandling System.Xml.XmlAttribute System.Xml.XmlAttributeCollection System.Xml.XmlCDataSection System.Xml.XmlCharacterData System.Xml.XmlComment System.Xml.XmlDeclaration System.Xml.XmlDocument System.Xml.XmlDocumentFragment System.Xml.XmlElement System.Xml.XmlEntityReference System.Xml.XmlImplementation System.Xml.XmlLinkedNode System.Xml.XmlNamedNodeMap System.Xml.XmlNode System.Xml.XmlNodeChangedAction System.Xml.XmlNodeChangedEventArgs System.Xml.XmlNodeChangedEventHandler System.Xml.XmlNodeList System.Xml.XmlNodeOrder System.Xml.XmlNodeReader System.Xml.XmlOutputMethod System.Xml.XmlProcessingInstruction System.Xml.XmlSignificantWhitespace System.Xml.XmlText System.Xml.XmlTextReader System.Xml.XmlTextWriter System.Xml.XmlUrlResolver System.Xml.XmlWhitespace System.Xml.XPath.XPathException System.Xml.XPath.XPathItem System.Xml.Xsl.XsltException
System types added to the Xbox 360 Compact Framework
These are types which did not exist in the Compact Framework for the Xbox 360, in the “XNA Game Studio” v3.1 release. But these are now present in the new v4.0 release:
Microsoft.Win32.SafeHandles.SafeHandleMinusOneIsInvalid Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid Microsoft.Win32.SafeHandles.SafeWaitHandle Microsoft.Xna.Framework.Audio.AudioChannels Microsoft.Xna.Framework.Audio.DynamicSoundEffectInstance Microsoft.Xna.Framework.Audio.Microphone Microsoft.Xna.Framework.Audio.MicrophoneState Microsoft.Xna.Framework.Audio.NoMicrophoneConnectedException Microsoft.Xna.Framework.Color Microsoft.Xna.Framework.DisplayOrientation Microsoft.Xna.Framework.GamerServices.Achievement Microsoft.Xna.Framework.GamerServices.AchievementCollection Microsoft.Xna.Framework.GamerServices.AvatarRendererState Microsoft.Xna.Framework.GamerServices.GameUpdateRequiredException Microsoft.Xna.Framework.GamerServices.IAvatarAnimation Microsoft.Xna.Framework.GamerServices.InviteAcceptedEventArgs Microsoft.Xna.Framework.GamerServices.LeaderboardEntry Microsoft.Xna.Framework.GamerServices.LeaderboardIdentity Microsoft.Xna.Framework.GamerServices.LeaderboardKey Microsoft.Xna.Framework.GamerServices.LeaderboardOutcome Microsoft.Xna.Framework.GamerServices.LeaderboardReader Microsoft.Xna.Framework.GamerServices.LeaderboardWriter Microsoft.Xna.Framework.GamerServices.NetworkException Microsoft.Xna.Framework.GamerServices.NetworkNotAvailableException Microsoft.Xna.Framework.GamerServices.PropertyDictionary Microsoft.Xna.Framework.Graphics.AlphaTestEffect Microsoft.Xna.Framework.Graphics.BlendState Microsoft.Xna.Framework.Graphics.DepthStencilState Microsoft.Xna.Framework.Graphics.DirectionalLight Microsoft.Xna.Framework.Graphics.DualTextureEffect Microsoft.Xna.Framework.Graphics.EffectMaterial Microsoft.Xna.Framework.Graphics.EnvironmentMapEffect Microsoft.Xna.Framework.Graphics.GraphicsProfile Microsoft.Xna.Framework.Graphics.IEffectFog Microsoft.Xna.Framework.Graphics.IEffectLights Microsoft.Xna.Framework.Graphics.IEffectMatrices Microsoft.Xna.Framework.Graphics.IVertexType Microsoft.Xna.Framework.Graphics.NoSuitableGraphicsDeviceException Microsoft.Xna.Framework.Graphics.PackedVector.Bgra4444 Microsoft.Xna.Framework.Graphics.RasterizerState Microsoft.Xna.Framework.Graphics.RenderTargetBinding Microsoft.Xna.Framework.Graphics.SkinnedEffect Microsoft.Xna.Framework.Graphics.VertexBufferBinding Microsoft.Xna.Framework.LaunchParameters Microsoft.Xna.Framework.Net.WriteLeaderboardsEventArgs Microsoft.Xna.Framework.TitleContainer System.AccessViolationException System.AppDomainManager System.AppDomainSetup System.ComponentModel.AsyncOperation System.ComponentModel.AsyncOperationManager System.ComponentModel.BackgroundWorker System.ComponentModel.CategoryAttribute System.ComponentModel.ComponentCollection System.ComponentModel.DescriptionAttribute System.ComponentModel.DoWorkEventArgs System.ComponentModel.DoWorkEventHandler System.ComponentModel.ITypeDescriptorContext System.ComponentModel.ProgressChangedEventArgs System.ComponentModel.ProgressChangedEventHandler System.ComponentModel.ReadOnlyAttribute System.ComponentModel.RunWorkerCompletedEventArgs System.ComponentModel.RunWorkerCompletedEventHandler System.ComponentModel.TypeConverterAttribute System.ContextStaticAttribute System.DataMisalignedException System.DateTimeOffset System.Diagnostics.DebuggerBrowsableAttribute System.Diagnostics.DebuggerBrowsableState System.Diagnostics.DebuggerDisplayAttribute System.Diagnostics.DebuggerTypeProxyAttribute System.Diagnostics.StackFrame System.Diagnostics.StackTrace System.DllNotFoundException System.Environment/SpecialFolder System.ExecutionEngineException System.FieldAccessException System.FileStyleUriParser System.FtpStyleUriParser System.GenericUriParser System.GenericUriParserOptions System.Globalization.HebrewCalendar System.Globalization.HijriCalendar System.Globalization.UmAlQuraCalendar System.HttpStyleUriParser System.InvalidTimeZoneException System.IO.FileLoadException System.IO.IsolatedStorage.IsolatedStorageException System.IO.IsolatedStorage.IsolatedStorageFile System.IO.IsolatedStorage.IsolatedStorageFileStream System.IO.UnmanagedMemoryStream System.LoaderOptimization System.MissingFieldException System.NotFiniteNumberException System.Reflection.AssemblyFileVersionAttribute System.Reflection.GenericParameterAttributes System.Reflection.InterfaceMapping System.Reflection.IReflect System.Reflection.LocalVariableInfo System.Reflection.MemberFilter System.Reflection.ReflectionTypeLoadException System.Reflection.ResourceAttributes System.Reflection.TargetException System.Reflection.TypeDelegator System.ResolveEventArgs System.ResolveEventHandler System.Resources.UltimateResourceFallbackLocation System.Runtime.CompilerServices.CompilationRelaxations System.Runtime.CompilerServices.CompilationRelaxationsAttribute System.Runtime.CompilerServices.RuntimeCompatibilityAttribute System.Runtime.InteropServices.AllowReversePInvokeCallsAttribute System.Runtime.InteropServices.ClassInterfaceAttribute System.Runtime.InteropServices.ClassInterfaceType System.Runtime.InteropServices.CoClassAttribute System.Runtime.InteropServices.ComDefaultInterfaceAttribute System.Runtime.InteropServices.COMException System.Runtime.InteropServices.ComImportAttribute System.Runtime.InteropServices.ComInterfaceType System.Runtime.InteropServices.DispIdAttribute System.Runtime.InteropServices.InterfaceTypeAttribute System.Runtime.InteropServices.SafeHandle System.Runtime.Serialization.OnDeserializedAttribute System.Runtime.Serialization.OnDeserializingAttribute System.Runtime.Serialization.OnSerializedAttribute System.Runtime.Serialization.OnSerializingAttribute System.Runtime.Serialization.StreamingContext System.Runtime.Serialization.StreamingContextStates System.Runtime.Versioning.TargetFrameworkAttribute System.RuntimeArgumentHandle System.Security.Permissions.CodeAccessSecurityAttribute System.Security.Permissions.SecurityAttribute System.Security.Permissions.SecurityPermissionAttribute System.Security.Permissions.SecurityPermissionFlag System.Security.Principal.IIdentity System.Security.Principal.IPrincipal System.Security.SecurityCriticalAttribute System.Security.SecuritySafeCriticalAttribute System.Security.SecurityState System.Security.SecurityTransparentAttribute System.Security.UnverifiableCodeAttribute System.ServiceModel.XmlSerializerFormatAttribute System.StringSplitOptions System.Text.DecoderFallbackException System.Text.EncoderFallbackException System.Threading.IOCompletionCallback System.Threading.NativeOverlapped System.Threading.Overlapped System.Threading.ParameterizedThreadStart System.Threading.RegisteredWaitHandle System.Threading.SendOrPostCallback System.Threading.SynchronizationContext System.Threading.SynchronizationLockException System.Threading.ThreadStartException System.Threading.ThreadState System.Threading.WaitOrTimerCallback System.ThreadStaticAttribute System.TimeZoneInfo System.TypeInitializationException System.UriBuilder System.UriIdnScope System.UriParser System.UriTypeConverter System.Xml.DtdProcessing System.Xml.Linq.ReaderOptions System.Xml.NamespaceHandling System.Xml.Serialization.XmlMappingAccess
Notables?
A number of deprecated collections are no longer available, the classic “ArrayList” from C# 1.0 among several others. Most of these would cause big performance problems with the Xbox garbage collector, so makes total sense that they have been trimmed out.
Additions which piqued my interest included “DebuggerDisplayAttribute”, and “StackTrace”/ “StackFrame”. The former I have a vague recollection trying to use before, it helps nicely format how a type is viewed in the Debugger. You can achieve the same functionality with ToString(), but if you need to use ToString() for runtime purposes and want something different shown in the debugger, it’s useful. “StackTrace” I was interested in because I believe the crash handler I’d written had a slightly different pathway between 360 and Windows. For 360 I had to throw an exception, and handle it. In the exception handling code I could pull out the callstack. With the StackTrace class you can just grab the callstack right off in the crash handler.
“System.Threading.ThreadState” too, I think I’d had to do a different workaround for the Xbox in the past. Nice to see that it’s now available.
Strangely I noticed “System.LocalDataStoreSlot” is not included in my removal list. Not sure why this is the case. Maybe I missed some key parameter in ‘ildasm’?
The Zune, or Windows 7 Phone?
Sorry, but I haven’t been developing for those platforms. Given some comments about the v4.0 release wanting to ‘standardize’ the Compact Framework to some kind of “Silverlight” API-set, I’d imagine the ones I’ve mentioned were added will probably exist for these platforms too. No idea though whether all the removed types I list apply to the Zune, many may not have even existed in the first place.
Er… So yeah, this is just covering the Xbox. Your mileage may vary with the other platforms.
Edit: Ah, Zune isn’t even supported by XNA 4.0!
References
- MSDN: Differences Between the .NET Compact Framework and the .NET Framework
- MSDN: Namespaces, Types, and Members in the .NET Compact Framework for Xbox 360
- Forums: XNA 4.0 RTM – Xbox Project – Serializable doesnt work
- Forums: XNA 4.0 .Net reference version for XBox
- Forums: Thread.Priority property deprecated on 360/XNA 4.0?
- Shawn’s Blog: Breaking changes in XNA Game Studio 4.0
Leave a Reply