简体   繁体   中英

Including bin subfolders in ASP.NET Deployment

I have an ASP.NET MVC 3 web-application with post-build build events that copies some interop dll's into subfolders of bin as follows

bin\x86\Sqlite.interop.dll 
bin\x64\Sqlite.interpo.dll

When I deploy this project onto the web-server, it does not copy the x86 or x64 subfolders.

How can I make the deployment copy those two sub-folders?

I've tried including the files in the project with "copy to output folder" setting, but this does not copy to a subfolder, only to bin. I need to publish both subfolders all the time.

In case you have common DAL assembly you can perform a such trick:

  1. Embedd native dll's to your assembly as resources
  2. Create static constructor to your 'entry point' class (Session, SessionFactory, etc.) and save to FS native dll's if necessary from this constructor

Update:

Also you can add to your project all native dll's. Mark them as Content and Copy Always. In this case they will be deployed with your service

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM