Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all articles
Browse latest Browse all 3509

VS, Web site project, pre-build action causes resource dll copy fail

$
0
0

Hi...

I've been tinkering with adding more pre-build events on various projects to cut down the number of manual steps it takes a developer to get set up, but I'm running into something weird and can't find any threads directly on topic.

So, we have a web site project in VS 2010.  I can't put pre-build events on that, but I can put them on the code libraries that the application ultimately ends up using.  One of these assemblies is a big resource dll.

With no pre-build action, VS 

1) creates the /Bin directory under the web site project

2) copies the various localized resource dlls to lang-specific subdirectories under /Bin - e.g. /Bin/da/MyResources.resources.dll

But when I add a pre-build action on some other project that will create the /bin directory under the web site project and seeds it with a referenced assembly (Brettle.Web.NeatUpload), suddenly the resource copies fail with

Cannot copy assembly 'MyResources.resources.dll' to file 'C:\source\p4_ws\MyApp\main\src\application\bin\da\MyResources.resources.dll'. Unable to add 'C:\source\p4_ws\MyApp\main\src\MyResources\bin\Debug\da\MyResources.resources.dll' to the Web site. Unable to add file 'bin\da\MyResources.resources.dll'. The system cannot find the path specified.

I'm inferring that VS has some binary logic that says "If there's no bin directory, set it up + set up the resources dir tree : otherwise take it as given"  So if I create the bin directory, VS won't go ahead and set up the subdirs for localization.

But I can't find any docs on that.  I've found lots of threads about copies failing because assemblies already in use, but nothing at all about how the localized resources get copied over to a website during build.

Can anyone shed some light on this?

Thanks

Mark


Viewing all articles
Browse latest Browse all 3509

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>