刚下载完rc3
这个也许大家有用。
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), and sdk tools between the stated builds.
if you have any questions regarding this change list, send e-mail to [email protected]
classlib changes
• switched to new w3c xsd schema 2001 types for remoting soap and wsdl engines.
to be compatible with other soap and wsdl engines that are moving to the new xsd schema (asmx, atl, soap toolkit, etc.), remoting will replace the existing soap* types in system.runtime.remoting.metadata (the soap*attributes will remain) with types in system.runtime.remoting.metadata.w3cxsd2001 that map between common language runtime types and xsd types.
the following types in system.runtime.remoting.metadata will 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 will 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 will 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 that takes a contextboundobject will 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 pattern regarding the usage if idisposable, the finalizer from stream was removed and placed on filestream. to further reflect the design pattern, we also removed the implementation of dispose from stream that accepted a bool.
• changed the system.reflection.emit.methodbuilder.initlocals property so that the default 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 be false, but now the default is true.
this change was needed so that methodbuilder will generate verifiable code by default (the jit now requires this bit to be set to be verifiable).
this change should not affect anything, since presumably all variables were set before use in code that did not set the initlocals so the zero initialization will not be visible.
the jit compiler will remove the redundant stores, so there should be no impact on the performance from this change.
• removed dataset.getnestedchanges.
getnestedchanges was added in a recent, post-b2 build as a way to return the parents of rows with changes. however, this functionality already appears in dataset.getchanges to support foreign key constraints that 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 method 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? will no longer be required for overloading within a type, but will still be allowed.
2.if one overloaded method in a class specifies ?overloads?, then they all must.
3.?shadows? and ?overloads? cannot be 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 will 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 not allowed on an instance constructor (since they are not inherited).
common language runtime
the following opcodes have been changed so that they take signed numbers:
newarr
newobj (when creating arrays).
this only affects their behavior when given a negative number. previously, these opcodes treated the negative number as an unsigned number (which would look very big), and thus threw an outofmemoryexception. now they will throw an overflowexception.
the c# compiler already performed this test implicitly, so c# code will not notice this change (they already did the new semantics).
only code that catches outofmemoryexception may need to change.
no changes need to be 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, you need to catch overflowexception instead.
• some .net framework common language runtime perf counters are no longer valid and have been converted into reserved counters. also, some counters were not formatted correctly, and have been changed to make them look the same.
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 current logical threads
# of current physical threads # of current physical threads
# of current recognized threads # of 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 deterministic finilalization of crypto transforms.
in keeping with design guidelines, the dispose member was named clear, which fits better for crypto.
• verifiable code must now set the initlocal's bit on the method.
every msil method has a bit that indicates whether local variables will
automatically be initialized to 0 by the jit compiler. this bit must
now be set for code that has local variables, if it is to be verifiable.
this change generally only affects msil compilers that want to emit
verifiable code. c# and visual basic already conform to this change. 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 be updated, if verifiability is a concern.
there should be very little performance change because of this. the
jit compiler already eliminates most dead stores, and thus will not 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 done to eliminate a security vulnerability in which demandimmediate could be circumvented by passing a delegate containing one to more trusted code so that the immediate caller would have a higher permission grant. this does 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 be avoided in favor of 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 useful, can still be done by having the caller 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 from 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 is 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 list in listcontrol.
listcontrol contains the following abstract method:
protected abstract void setitemscore(object[] items);
this method is used to populate the listbox or combobox from a datasource. because datasource is an ilist and setitemscore takes an array, the contents of the datasource have to be unnecessarily copied into an array.
miscellaneous
• changed some apis in system.enterpriseservices.resourcepool to internal.
system.enterpriseservices.resourcepool interface change:
changed the following methods from public to internal:
class:
system.enterpriseservices.resourcepool
methods:
gettoken(),
releasetoken().
these methods should only be used internally by system.enterpriseservices components.
interop
changes in the interop assembly
change #1
the fundamental change is in how the coclasses are imported from the type libraries. before, the coclasses were imported as managed classes. the class could be activated with the new operator and methods could be invoked directly.
in the new design, the coclass is imported as an 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 is parameter substitution in the method signatures. all parameters with, for example, the ifoo type are changed to be of the foo type unless:
• there is another coclass that implements interface ifoo (as default or non-default interface).
• there is another coclass that implements interface derived from ifoo.
note: another coclass can be defined in the same type library or any other type library that is imported from the original type library.
with these changes, managed clients can always register as event sinks for unmanaged event sources and not 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 will fail if wrapped with _comobject
f.click += new _foosource_clickeventhandler(...);
}
barmethod( ifoo ip )
{
foo f = (foo)ip; // ok now since foo is 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 is an interface
ibar b = (ibar)f; // explicit cast needed, this will qi for ibar
b.barmeth();
}
• fixes required in calls that call methods with the changed signatures. this also includes get & set property methods if property value was 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 that is not written in c# or visual basic .net (for example, in existing mc++ code).
all object creation code like:
foo f = new foo();
needs to be changed to:
foo f = new fooclass();
• source changes and recompiling needed when inheritance from com coclass is used.
all code like:
class cderived : foo {…}
needs to be changed to:
class cderived : fooclass {…}
static members no longer appear to be supported by managed objects
under some circumstances, the clr idispatch.getidsofnames implementation provided a dispid for a static member of a managed type. calling invoke with that dispid will 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 an unusable dispid.
struct** in the type library is imported as intptr
pointer to pointer to structure as parameter in the type library method is imported as intptr type. this type was 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 this type of parameter in methods should be recompiled.