This project is read-only.

Must add <WithCulture> to <EmbeddedResource> in .proj files

May 12, 2008 at 4:39 PM
I'm using VS08.  Since adding the SDC tasks to the build process, I've been receiving an MSB9004 message.  Some information can be found about this issue in:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2978097&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3328903&SiteID=1&mode=1

I found that if I remove the SDC tasks from the build process the issue goes away.  The way I include the SDC in my build process is by putting an <Import> in the %ProgramFiles%\MSBuild\v2.0\Custom.After.Microsoft.Common.targets (and v3.5) file for Microsoft.Sdc.Common.tasks.

The workaround I've found is to add a <WithCulture>false</WithCulture> child element to all <EmbeddedResource> tags in .proj files that have .resx files.  Am I doing something wrong here or has anyone else encountered this issue?
Nov 24, 2008 at 7:20 PM
Thanks for posting. It took me quite a while to narrow my problem down to the SDC Tasks. My SDC import in in the csproj file and the error I was getting was:

Target SplitResourcesByCulture:
  C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1563,9): error MSB4096: The item "xxxx.resx" in item list "_MixedResourceWithNoCulture" does not define a value for metadata "WithCulture".  In order to use this metadata, either qualify it by specifying %(_MixedResourceWithNoCulture.WithCulture), or ensure that all items in this list define a value for this metadata.
Done building target "SplitResourcesByCulture" in project "xxxxx.csproj" -- FAILED.


Adding the same fix as you put in cleared it up for me too.