Microsoft .NET Framework 4.5 Beta Readme

Date Published: February 29, 2012

For the latest version of the Readme click here.

1. .NET Framework Known Issues

1.1 .NET Framework Installation

1.1.1 .NET Framework 4.5 Beta Setup displays error messages if a service it uses isn't available on your computer

During installation, the .NET Framework 4.5 Beta Setup program displays the following error messages if one of the services it uses isn't available on your computer. If you encounter these messages, see the Microsoft Knowledge Base articles listed for symptoms, cause, and resolution.

To resolve this issue:

See the Knowledge Base articles listed for each error message.


1.1.2 The .NET Framework 4.5 Beta language packs are not available on Windows 8 Consumer Preview

The .NET Framework 4.5 Beta language packs cannot be installed on the Windows 8 Consumer Preview operating system, because the .NET Framework 4.5 Beta is a component of the operating system. The .NET Framework 4.5 Beta language packs can be installed on earlier supported versions of Windows.

To resolve this issue:

Download the language packs for the Windows 8 Consumer Preview operating system, or install a localized version of Windows 8 Consumer Preview to get the localized resources for the .NET Framework 4.5 Beta.

 

1.1.3 Canceling or rolling back an upgrade from the .NET Framework 4 to 4.5 Beta causes a rollback to ASP.NET 2.0 instead of ASP.NET 4

If you try to upgrade from the .NET Framework 4 to the .NET Framework 4.5 Beta, and the installation is canceled or rolls back to the .NET Framework 4 for any reason, the ASP.NET installation on your computer rolls back to version 2.0. This is because the Setup program unregisters ASP.NET 4 and reregisters ASP.NET 2.0.

To resolve this issue:

1.       Fix the incorrect registration:

-or-

 2.       If you had any custom app pools that targeted ASP.NET 4 before the failed upgrade, use IIS Manager (inetmgr.exe) to reset them to target ASP.NET 4 again.


1.2 .NET Framework Uninstallation

There are no known issues.

1.3 .Net Framework Product Issues


1.3.1 General Issues

1.3.1.1 MSIL Assembler (ILasm.exe) doesn't support signing assemblies using SHA-2 and larger keys

Starting with the .NET Framework 4.5 Beta, the .NET Framework supports the SHA-2 algorithm for enhanced strong-name signing. For more information about this feature, see Enhanced Strong Naming in the MSDN Library. You can migrate to using the new SHA-2 algorithms and larger keys while maintaining compatibility with assemblies that reference older identities. However, in the .NET Framework 4.5 Beta, you cannot use the MSIL Assembler (ILasm.exe) to sign your assemblies using the SHA-2 algorithm and larger keys due to a known issue.

To resolve this issue:

There is no workaround.


1.3.1.2 The ClickOnce Trust Manager indicates an unknown publisher in security warning

If the ClickOnce Trust Manager does not recognize the publisher of a signed ClickOnce manifest, it displays a security warning indicating that the publisher cannot be verified, and lists "Unknown Publisher" as the publisher name. If a certificate is added to the trusted publisher store, the Trust Manager will still display this message due to a failed certificate validation. This affects applications that are signed with the SHA-1 and SHA-2 hash algorithms. Applications that target the .NET Framework 4 will work properly.

To resolve this issue:

There is no workaround.


1.3.1.3 ClickOnce apps launched from the Internet zone may fail to run

ClickOnce applications that are launched from the Internet zone will appear to download and install correctly but may not run. This is caused by the Application Reputation service returning an error when the ClickOnce app checks for updates.

To resolve this issue:

1. Open the shortcut menu for the application tile and choose Open File Location. Note the location and the file name.
2. Open the Command Prompt window.
3. Open the file identified in step 1 in Notepad. The file will have an ".application" extension. In this example, "MyApp.application" is the file name:

http://www.contoso.com/apps/MyApp.application#MyApp.application, Culture=neutral, PublicKeyToken=1234567890123456, processorArchitecture=x86

4. At the command prompt, enter the following:

    cd/d %userprofile%\appdata\local\apps\2.0
5. At the command prompt, enter the following, using the same name as in step 3 but with a ".manifest" extension:

    dir/s "MyApp.manifest"

6. In Notepad, open the file found in step 5.
7. Find the <file> element, and note the value of the name attribute. This is the name of the executable file.
8. Find this executable in the same directory as the file in step 6.
9. Remove the Mark of the Web (MOTW).

   -or-

       Double-click the executable file in Windows Explorer. The Application Reputation dialog box is displayed. In this dialog box, choose Unblock, and then choose OK.

After you complete these steps, the app can be launched successfully from the Start button.


1.3.1.4 Automatic native image generation for Windows Metro style app binaries doesn't work on ARM

If you have a Metro style app that was written in C# or Visual Basic and that contains lots of code, it may perform poorly during startup on the ARM platform. In the Windows 8 Consumer Preview on ARM, the automatic NGen service is prevented from generating native image binaries for Metro style apps. This issue does not affect the x86 or AMD64 platforms.

To resolve this issue:

No workaround is available for the .NET Framework 4.5 Beta.


1.3.1.5 Regasm.exe (KOR) stops responding when displaying Korean UI strings

If you run the Assembly Registration tool (Regasm.exe) on a Korean version of the Windows operating system, the tool will stop responding because of a corrupt string in the satellite assembly for Korean language resources.

To resolve this issue:

When you run Regasm.exe on the Korean version of Windows, use the /nologo option to suppress the retrieval of the corrupt resource string.

You can also disable the tool's retrieval of all Korean language UI strings by following these steps:

1.       Log in as an administrator. (Or you can run the commands in the following steps in an elevated command prompt.)

2.       Run the takeown command on the regasm.resources.dll file:

3.       Run the icacls command on the regasm.resources.dll file:

4.       Rename the satellite assembly for Korean resources from Regasm.resources.dll to Regasm.resources.dll_ (add an underscore to the end) in the directory in steps 2 and 3:

5.       Rename the global assembly cache copy of Regasm.resources.dll to regasm.resources.dll_ (add an underscore to the end) in the following directory:

After you change the file extension, UI strings will be displayed in the ultimate fallback language of English, and Regasm will function correctly.

1.3.1.6 Managed code will not run on hardware that doesn't support SSE2

Managed code compiled against the .NET Framework 4.5 Beta will not run on 32-bit hardware that doesn't support the Streaming SIMD Extensions 2 (SSE2) instruction set.  This includes Intel systems before Pentium 4 and AMD systems before Opteron or Athlon 64. This issue affects only Windows 7 and earlier versions of the Windows operating system that are supported by the .NET Framework 4.5 Beta.

To resolve this issue:

There is no workaround.


1.3.1.7 Multi-language apps that use managed Windows Runtime Components may experience memory leaks

Windows Runtime objects that are implemented in .NET Framework languages (such as C# and Visual Basic) and instantiated from unmanaged code (for example, from JavaScript or C++) are not always reclaimed properly.   This can cause memory leaks for Windows Metro style apps that are implemented using both managed and unmanaged code.     

This issue affects managed objects that are created by using the new keyword with constructors that have parameters. For example, the following code will cause memory leaks:

C#:

public class MyClass

{

   public MyClass(type1 param1, type2 param2, ...)

   {

      ...

   }

}

JavaScript:

... = new MyClass(arg1, arg2, ...);

 

Parameterless constructors do not have this problem. Also, Windows Runtime objects that are implemented in .NET Framework languages and instantiated from managed code do not go through interop and do not leak memory in this way.

To resolve this issue:

To work around this issue, make the constructors that have parameters internal and invoke them from static factory methods.  For example:

C#:

public class MyClass

{

   public static MyClass Create(type1 param1, type2 param2, ...)

   {

      return new MyClass(param1, param2, ...)

   }

   internal MyClass(type1 param1, type2 param2, ...)

   {

      ...

   }

}

JavaScript:

... = MyClass.Create(arg1, arg2, ...);


1.3.1.8 The .NET Framework 4.5 Beta binary files cannot be redistributed

Per the Microsoft Software License Terms for the .NET Framework 4.5 Beta, you may not redistribute the .NET Framework 4.5 Beta binary files with your application.

To resolve this issue:

Your customers can download the .NET Framework 4.5 Beta on supported operating systems from the .NET Framework Download Center. The .NET Framework 4.5 Beta is included with the Windows 8 Consumer Preview and Windows Server 8 Beta, so it does not have to be installed separately on those operating systems.


1.3.1.9 In Windows Metro style apps, using OpenStreamForWriteAsync may result in incorrect file contents

When you use the .NET Framework extension method OpenStreamForWriteAsync(Windows.Storage.IStorageFolder,System.String,Windows.Storage.CreationCollisionOption) on an IStorageFolder instance, and you pass a value that is not equal to OpenIfExists for the CreationCollisionOption parameter, the file may contain incorrect bytes. The same issue can occur when you use this extension method on an IStorageFile instance: OpenStreamForWriteAsync(Windows.Storage.IStorageFile). The reason is that the extension method passes the value FileAccessMode.ReadWriteNoCopyOnWrite to the Windows Runtime. This flag instructs Windows Runtime storage APIs to reset the stream when calling the Flush() method on the underlying IOutputStream.

The following code illustrates the problem:

using (Stream s = await KnownFolders.PicturesLibrary.OpenStreamForWriteAsync("test.txt", CreationCollisionOption.ReplaceExisting))
{
  byte[] buff = new byte[2];
  buff[0] = 0x31;
  buff[1] = 0x32;
  s.Write(buff, 0, 2);
  s.Flush();
  s.Write(buff, 0, 1);
}

The file is expected to contain the bytes {0x31, 0x32, 0x31}, but it contains {0x00, 0x00, 0x31} instead.

To resolve this issue:

1. Copy and paste the following type to your Metro style app:

using System;
using System.Diagnostics;
using System.IO;
using System.Threading.Tasks;
using Windows.Storage;
namespace System.IO
{
public static class StreamWorkaroundExtensions
{
    public static Task<Stream> OpenStreamForWriteWorkaroundAsync(this IStorageFolder rootDirectory, string relativePath, CreationCollisionOption creationCollisionOption)
    {
        // Check for valid arguments
        StorageFile windowsRuntimeFile = await rootDirectory.CreateFileAsync(relativePath, creationCollisionOption);
        IRandomAccessStream windowsRuntimeStream = await windowsRuntimeFile.OpenAsync(FileAccessMode.ReadWrite);
        return windowsRuntimeStream.AsStreamForWrite(); 
    }

    public static Task<Stream> OpenStreamForWriteWorkaroundAsync(this IStorageFile windowsRuntimeFile)
    {
        // Check for valid arguments
        IRandomAccessStream windowsRuntimeStream = await windowsRuntimeFile.OpenAsync(FileAccessMode.ReadWrite);
        return windowsRuntimeStream.AsStreamForWrite(); 
    }

}
}

2. In your code, use the OpenStreamForWriteWorkaroundAsync method instead of OpenStreamForWriteAsync.

1.3.3 ASP.NET

There are no known issues.

1.3.4 Winforms

There are no known issues.

1.3.5 Parallel Programming

There are no known issues.

1.3.6 Managed Extensibility Framework

There are no known issues.

1.3.7 Entity Framework

There are no known issues.

1.3.8 LINQ to SQL

There are no known issues.

1.3.9 Windows Communication Foundation (WCF)

There are no known issues.

1.3.10 Windows Presentation Foundation (WPF)

1.3.10.1 HwndHost feature has been removed from WPF in the .NET Framework 4.5 Beta

The .NET Framework 4.5 Developer Preview included a WPF HwndHost redirection feature. However, this feature had several known issues and has been removed from the .NET Framework 4.5 Beta. It will not be included in any future releases.

To resolve this issue:

No workaround is available.

1.3.11 Windows Workflow Foundation (WF)

1.3.11.1 Some of the new features in the Workflow Designer may cause issues with existing solutions

In the .NET Framework 4.5 Beta, the Workflow Designer includes the following changes:

To resolve this issue:

Use the workaround for each issue discussed in the preceding list.


1.3.11.2 Host fails to start if you use workflows with the Workflow Identity parameter

The .NET Framework 4.5 Beta includes a new workflow parameter, Workflow Identity, that is persisted to the SQL Workflow Instance Store. If you use workflows that include this parameter and its value is not null, you must update the Instance Store so it can store the value. Otherwise, the host will fail to start.

To resolve this issue:

Update the SQL Workflow Instance Store by running the script at the following location:

%windir%\Microsoft.NET\Framework\<version>\SQL\<language>\SqlWorkflowInstanceStoreSchemaUpgrade.sql


2. .Net Framework Maintenance

2.1 Upgrading to Windows 8 Consumer Preview does not update .NET Framework 4 language packs

If you upgrade from the Windows 7 operating system to Windows 8 Consumer Preview, the .NET Framework 4 language packs that you previously installed on your computer are not removed or updated. This issue affects language packs that do not match the language of the upgraded Windows 8 Consumer Preview, not including English. For example, if you have an English edition of Windows 7 Ultimate and the .NET Framework 4 German language pack, and you upgrade your system to the English edition of Windows 8 Consumer Preview, the language pack will remain on your system but will not be updated to the .NET Framework 4.5 Beta.

To resolve this issue:

Either uninstall the .NET Framework 4 language pack before you upgrade to Windows 8 Consumer Preview, or install the appropriate Windows 8 Consumer Preview language pack after you upgrade.


3. Related Links

© 2012 Microsoft Corporation. All rights reserved.

Terms of Use | Trademarks | Privacy Statement