Hello,
I believe, this is a bug report for Web Application Projects MS Build integration.
I am using Web Application Projects and MS Build. My Website project references another assembly, which has a bunch of culture specific satellite assemblies.
When I build a website using Visual Studio or its "Publish website" feature, the website's bin directory contains all the satellite assemblies in their respective subfolders:
bin\[de]\ReferencedAssembly.resources.dll
bin\[lt]\ReferencedAssembly.resources.dll
bin\[sv]\ReferencedAssembly.resources.dll
... etc.
However, then I build a website using MSBuild, the bin directory of the website (in _PublishedWebsites folder) does not have these satellite assemblies anymore.
While examining Web Application Projects "Microsoft.WebApplication.targets" file, I came to conclusion, that the problem lies in one of "_CopyWebApplication" target's copy tasks:
<!-- copy any referenced assemblies to _PublishedWebsites\app\bin folder -->
<Copy SourceFiles="@(ReferenceCopyLocalPaths)" DestinationFolder="$(WebProjectOutputDir)\bin" SkipUnchangedFiles="true" />
This copy task copies all the satellite assemblies from their language specific subfolders to one single file (!) in the bin folder of website. Which results in loss of all the culture specific assemblies, except for the last one in copy task. I can clearly see that in build log:
<..skipped copying other referenced assemblies..>
Copying file from "XXX\de\ReferencedAssembly.resources.dll" to "XXX\_PublishedWebsites\Website\bin\ReferencedAssembly.resources.dll".
Copying file from "XXX\lt\ReferencedAssembly.resources.dll" to "XXX\_PublishedWebsites\Website\bin\ReferencedAssembly.resources.dll".
Copying file from "XXX\sv\ReferencedAssembly.resources.dll" to "XXX\_PublishedWebsites\Website\bin\ReferencedAssembly.resources.dll".
<..skipped..>
Is there any way to fix the "_CopyWebApplication" target in "Microsoft.WebApplication.targets" file, so that culture specific assemblies would be copied correctly?
Any other solutions possible?
Thank You,
G.V.