A list of differences from Beta2 to RTM

Source: Internet
Author: User
Tags abstract bool emit hmac soap reserved sha1 wsdl
Just finished downloading RC3
This may be useful to everyone.
To visit:
http://go.microsoft.com/fwlink/?LinkId=4374
http://go.microsoft.com/fwlink/?LinkId=4372

Good luck!

Change List:beta 2 to build RTM

The following document contains a list of the changes to the. NET Framework class libraries, compilers (and languages), d SDK Tools between the stated builds.

If you are have any questions regarding the This change list, send e-mail to netfwsdk@microsoft.com.




Classlib Changes

switched to new The XSD Schema 2001 types for Remoting SOAP and WSDL engines.

To is compatible with other SOAP and WSDL engines that are moving to the new XSD Schema (ASMX, ATL, SOAP Toolkit, etc.), R Emoting'll replace the existing soap* types in System.Runtime.Remoting.Metadata (the soap*attributes would remain) with T Ypes in System.Runtime.Remoting.Metadata.W3cXsd2001 that map between common language Runtime types and XSD types.

The following types in System.Runtime.Remoting.Metadata would be removed:

Soapcdata
Soapcentury
Soapdate
Soapinteger
Soapmonth
Soapnegativeinteger
Soapnonnegativeinteger
Soapnonpositiveinteger
Soappositiveinteger
Soaprecurringdate
Soaprecurringday
Soaptime
Soaptimeduration
Soaptimeinstant
Soapyear

The following types in System.Runtime.Remoting.Metadata.W3cXsd2001 would be added:

Soaptime
Soapdate
Soapyearmonth
Soapyear
Soapmonthday
Soapday
Soapmonth
Soaphexbinary
Soapbase64binary
Soapinteger
Soappositiveinteger
Soapnonpositiveinteger
Soapnonnegativeinteger
Soapnegativeinterger
Soapanyuri
Soapqname
Soapnotation
Soapnormalizedstr

ServicedComponent Proxy and Remoting Related Cleanup

The following classes/methods would be removed:
1. public class system.runtime.remoting.contexts.threadaffinityattribute-currently marked as Obsolete.

2.context.unregisterdynamicproperty-currently marked as Obsolete (the Unregisterdynamicproperty overloaded method Takes a ContextBoundObject would remain).

public class System.Runtime.Remoting.Contexts.Context
{
...-currently marked as Obsolete
public static bool Unregisterdynamicproperty (String name, MarshalByRefObject obj, context ctx)

//. . .

}

3.soapservices.preload-currently marked as Obsolete.

public class System.Runtime.Remoting.SoapServices
{
//. . .

public static void preload (Assembly Assembly, bool bserver)

//. . .

}

removed the finalizer and removed Dispose (bool) from Stream, and added the finalizer to FileStream.

To better comply with the "design regarding" usage if IDisposable, the finalizer from Stream is removed and PLA CED on FileStream. To further reflect, we are also removed the implementation of Dispose from Stream that accepted a bool.


changed the System.Reflection.Emit.MethodBuilder.InitLocals property so this is true.

The Initlocals property on MethodBuilder indicates to the runtime whether the method should initialize local variables to 0 on entry to the method. The default for this property used to being false, but now is true.

This is needed so MethodBuilder would generate verifiable code by default (the JIT now requires this bit to be Set to is verifiable).

This is should not affect anything, since presumably all variables were set before with code that is did not set the Itlocals so the zero initialization won't be visible.

The JIT compiler would remove the redundant stores, so there should is no impact on the performance from this change.


removed dataset.getnestedchanges.

Getnestedchanges is added in a recent, POST-B2 builds as a way to return the parents of rows with changes. However, this functionality already appears in DataSet.GetChanges to support foreign key constraints so can exist on the Changed rows.
Previous Code:

Code prior to recent change
DataSet mydataset.getchanges ();
Get Changes with Parents

DataSet mydataset.getnestedchanges ();

Code prior to recent change
DataSet mydataset.getchanges ();
Get Changes with Parents

DataSet mydataset.getchanges ();

' Code prior to recent change
' DataSet mydataset.getchanges ()
' Get Changes with Parents

DataSet Mydataset.getchanges ()

This is appeared in a POST-B2 build. It has been removed for RTM.


Visual Basic. NET

changed name hiding semantics in Visual Basic. NET:

The changes include:

1.? Overloads? Would no longer is required for overloading within a type, but'll still be allowed.

2.If one overloaded method in a class specifies? Overloads, then they all must.

3.? Shadows? and? Overloads? Cannot is specified together on a declaration.

4.If A method specifies neither? Overloads? Nor? Shadows, then? Shadows? is assumed.

5.If a method conflicts with a name in a base class, then either? Shadows? Or? Overloads? Must be specified, or a warning would be issued.

6.? Overloads? means that "a method" shadows by name and signature; and? Shadows? means that ' a method ' shadows by name.

7.? Overloads? Is isn't allowed on a instance constructor (since they are not inherited).


Common Language Runtime

The following opcodes have been changed so they take signed:
NEWARR
NEWOBJ (when creating arrays).

This is affects their behavior when given a negative number. Previously, these opcodes treated the negative number as a unsigned number (which would look very big), and thus threw  OutOfMemoryException. Now they would throw an OverflowException.

The C # compiler already performed this test implicitly, so C # code would not notice this change (they already did the new S Emantics).

Only the code that catches OutOfMemoryException could need to the change.

No changes need to is made for C # because the compiler emitted extra MSIL that already implemented the new semantics.

If you catch OutOfMemoryException to catch the case where negative numbers are passed to array creation operators D to catch OverflowException instead.


some. NET Framework common Language runtime perf counters are no longer valid and have been converted into Reserved C Ounters. Also, some counters were not formatted correctly, and have been to make changed look the them.


Old Form New form
Gen 0 Heap Size Gen 0 Heap Size
Gen 1 Heap Size Gen 1 Heap Size
Gen 2 Heap Size Gen 2 heap Size
# Total Committed Bytes # Total committed Bytes
# total reserved Bytes # total reserved Bytes
# of Sink Blocks in use # of Sync Blocks in use
Assembly Search Length Reserved
Total AppDomains unloaded total AppDomains unloaded
Rate of AppDomains unloaded Rate of AppDomains unloaded
Current AppDomains Current AppDomains
Total AppDomains Total AppDomains
Rate of AppDomains Rate of AppDomains
Standard JIT failures JIT failures
# of marshalling # of marshalling Calls
# of TLB imports/sec Reserved #1
# of TLB exports/sec Reserved #2
# of current logical Threads # of the current logical Threads
# of current Physical Threads # of the current physical Threads
# of current recognized threads # of the current recognized threads
# of total recognized threads # of total recognized threads
Rate of recognized threads/sec rate of recognized threads


Security

changed System.Security.Cryptography.

ICryptoTransform now has the IDisposable interface. The new property, SymmetricAlgorithm, and Assymetricalgorithm also implement IDisposable now, which allows for determinist IC Finilalization of Crypto transforms.

In keeping with design guidelines, the Dispose member is named clear, which fits better for crypto.

verifiable code must now sets the initlocal ' s bit on the method.

Every MSIL method has a bit so indicates whether local variables would
Automatically is initialized to 0 by the JIT compiler. This bit must
Now was set for code that has the local variables, if it was to be verifiable.

This change is generally only affects MSIL compilers which want to emit
Verifiable code. C # and Visual Basic already conform to the. ReflectionEmit
has been changed, so it also sets this bit by default. Thus scripting
is also covered. Third party compilers that generate PE files directly
Or use ILASM need to being updated, if verifiability is a concern.

There should is very little performance change because the this. The
JIT compiler already eliminates most dead stores, and thus won't double
Initialize variables.

For ILASM Replace

. locals

With

. Locals init.


removed demandimmediate.

Demandimmediate has been removed everywhere that it is defined. This includes the following:

Codeaccesspermission.demandimmediate
Ipermission.demandimmediate
Istackwalk.demandimmediate
Permissionset.demandimmediate
Principalpermission.demandimmediate.

Any class that extends Codeaccesspermisison has also been removed.
This is being do to eliminate a security vulnerability in which demandimmediate could being circumvented by passing a Deleg Ate containing one to further trusted code so the immediate caller would have a higher permission grant. This does is not affect regular demands or declarative linkdemands.

LinkDemand can be used to perform caller-only security checks. The absence of demandimmediate, though, prevents runtime caller-only checks using dynamic information (for example, a file Name not known until runtime). In general, caller-only checks should is avoided in favor to those that perform a complete stack walk, because the former Does not protect against luring attacks, while the latter does. Caller-only identity permission demands, where demand immediate seemed most, can useful Assert their identity permission if they are safe from misuse by their callers.

removed Webpagemembershipcondition and skipverificationmembershipcondition.

The classes Webpagemembershipcondition and skipverificationmembershipcondition have been removed from the product and are No longer available for use in policy to the tools Caspol.exe and Mscorcfg.msc.

enabled HMAC-SHA1 XML Digital signatures.

API changes in System.Security.dll (SYSTEM.SECURITY.CRYPTOGRAPHY.XML namespace) to enable HMAC-SHA1 based XMLDSIG digital Signatures.

enabled HMAC-SHA1 XML Digital signatures.

API changes in System.Security.dll (SYSTEM.SECURITY.CRYPTOGRAPHY.XML namespace) to enable HMAC-SHA1 based XMLDSIG digital Signatures.

Array Creation opcodes now take signed (previously unsigned) numbers and can throw OverflowException.


asp.net Changes

changed keyedhashalgorithm.

The secret key in Keyedhashalgorithms are zeroed on Dispose. Instances of CryptoStream, SHA1, and TripleDES used internally in the KeyedHashAlgorithm classes HMACSHA1 and MACTripleDES are also cleaned up.

changed System.ComponentModel.Component.Dispose to Non-virtual.

Inheriting types should override protected void Dispose (BOOL).

changed Setitemscore (object[] items) and Setitemscore (IList items) to reduce the overhead of populating a databound l ist in ListControl.

ListControl contains the following abstract method:

protected abstract void Setitemscore (object[] items);

This are used to populate the Listbox or ComboBox from a DataSource. Because DataSource is a IList and Setitemscore takes an array, the contents of the DataSource have to be unnecessarily co Pied into an array.


Miscellaneous

changed some APIs in System.EnterpriseServices.ResourcePool to internal.

System.EnterpriseServices.ResourcePool interface Change:

Changed the following methods to internal:

Class
System.EnterpriseServices.ResourcePool

Methods
GetToken (),
Releasetoken ().

These methods should are used internally by System.EnterpriseServices components.

Interop

Changes in the interop assembly

Change #1
The fundamental change are in the coclasses are imported from the type libraries. Before, the coclasses were imported as managed classes. The class could is activated with the new operator and methods could is invoked.

In the new design, the coclass is imported as a interface in addition to the class. The interface has the same name as the original coclass. It has an attribute identifying the CLSID of the original class. It also has the same IID as the coclass ' s default interface. The imported class has the same name as the coclass with "class" appended.
Change #2
The second change are parameter substitution in the method signatures. All parameters with, for example, the IFoo type are changed to is of the Foo type unless:
There is another coclass that implements interface IFoo (as default or Non-default interface).
There is another coclass this implements interface derived from IFoo.
Note:another coclass can be defined in the same type library or no other type library this is imported from the original Type library.

With this changes, managed clients can always register as event sinks for unmanaged event sources and do depend on what Kind of the runtime callable Wrapper (RCW) is created, typed or generic.

For example, consider the following scenario:

Barmethod (IFoo IP)
{
Foo f = (foo) IP; Cast would fail if wrapped with _comobject
F.click + = new _foosource_clickeventhandler (...);
}

Barmethod (IFoo IP)

{
Foo f = (foo) IP; OK now since Foo was an interface
F.click + = new _foosource_clickeventhandler (...);
}

Possible changes needed in BETA2 code

explicit casting required for the Non-default interfaces.

Barmethod (IFoo IP)
{
Foo f = (foo) IP;
F.barmeth (); Can ' t compile this any more since Foo was an interface
IBar B = (IBar) F; Explicit cast needed, this'll QI for IBar
B.barmeth ();
}

fixes required in calls, call methods with the changed signatures. This also includes get & Set property Methods If property value is of type IFoo.

SomeMethod (IFoo IP)
{
Imported method DoSomething is declared as
dosomething (Foo IP) now

Can ' t be compiled since the derived interface Foo is expected
DoSomething (IP);
Fix in the call required
DoSomething ((Foo) IP);
}

source changes and recompiling needed in all code this is not written in C # or Visual Basic. NET (for example, in Exi Sting mc++ code).

All object creation code like:
Foo f = new Foo ();
Needs to is changed to:
Foo f = new Fooclass ();

source changes and recompiling needed when inheritance to COM coclass is used.

All code like:
Class Cderived:foo {...}
Needs to is changed to:
Class Cderived:fooclass {...}


Static members no longer appear to is supported by managed objects

Under some circumstances, the CLR Idispatch.getidsofnames implementation provided a DISPID for a static member of a manage D type. Calling Invoke with that DispID would ultimately fail because static members are not callable from COM.

This change causes GetIDsOfNames to fail when requesting the DispId of a static member rather than returning a unusable D Ispid.



struct** in the type of library is imported as IntPtr

Pointer to pointer to structure as parameter into the type library method is imported as INTPTR type. This type is imported as a ByRef value class with the Native_type_lpstruct attribute applied previously but wasn ' t fully Functional. BETA2 code that used any interface with the this type of the parameter in methods should to be recompiled.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.