Welcome to MSDN Blogs Sign in | Join | Help

Manifest resource names changed for .resources files

Juergen Bayer notified us of an issue introduced in MSBuild in .NET 3.5 "Orcas". The problem is if you have any items of type EmbeddedResource in your project file that are actually .resources format, rather than the usual .resx. In other words, for some reason you have already converted them from human-readable form. We believe the impact should not be widespread since usually projects use .resx files. Plus, "Orcas" is essentially locked down at this point, so it's too late to fix it for this release.

When we embed a resource in an assembly, we pick a name for the stream. This name is fairly unimportant, as long as it's distinct and consistent. Its only purpose is to specify the stream your resource manager should read. In VS2003, VS2005, through .NET 2.0 SP1, the stream name for .resources itself ended with the .resources extension. In VS2008/.NET 3.5, we inadvertently broke this: it no longer has .resources on the end. The effect will be at runtime your resources will not load properly. The workaround (apart from changing to use .resx instead which we will create .resources from for you) is to add a Logical Name metadata to the affected resources to specify the correct name, something like this:

    <EmbeddedResource Include="Resources\Images.resources" >
       <LogicalName>$(RootNamespace).Resources.Images.resources</LogicalName>
    </EmbeddedResource>

Of course, the names we pick for streams originating in .resx files did not get changed. 

Dan

Published Friday, October 19, 2007 7:34 PM by msbuild

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

Thursday, July 31, 2008 11:00 AM by Danie

# re: Manifest resource names changed for .resources files

We also have this issue, after upgrading from vs2005 to vs2008 SP1.

We have to many .resources files, so changin them to .resx files wil not be an option!

We have upgraded all our solution files already.

Is there a fix for this bug yet? we are very desparate.

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker