This project is read-only.

How to compress the Project

Topics: Core, Writing modules, 中文(Chinese)
Aug 6, 2013 at 8:53 AM
Now we have so many Modules, and they use the same dll, such as Orchard.Core, so how to compress dll, and do not copy the dll everywhere?
Aug 6, 2013 at 9:14 AM
Aug 6, 2013 at 10:19 AM
I know how to deploy, but for Orchard there are so many Modules, and these can't add into a web project, so we should deploy one by one. But these will add the core and fromwork dll repeatedly. How did we can not add the dll repeatedly?
Aug 6, 2013 at 7:56 PM
I understand that. The link I provided indicates how to build a version where you have only what you need to run. The duplicated dlls are a side-effect of building from Visual Studio, as it doesn't really understand what they are for. Building as indicated in the link is the way to get a version that has dlls in one copy instead. The size is dramatically reduced this way.
Aug 7, 2013 at 10:06 AM
Isn't this essentially the same as using the and simply adding your modules without \bin and \obj directories included?

Or does the precompiled version also remove the need for *.cshtml files and such? The orchard docs link above seems to describe that you only need a directory with all dll's in the root and a subdirectory for App_Data and Media. Is this correct?
Aug 7, 2013 at 10:00 PM
Yes, that's essentially the same thing. The cshtml files are still needed. I'm not sure what in the topic can have given you the impression that you'd get only dlls, media, and app_data.
Aug 8, 2013 at 2:10 PM
Ok good to know. My misunderstanding of the topic lies in the following:
  • Deploy the contents of the \build\Precompiled directory into a clean IIS web site's root directory.
  • If you are running on a 64 bit system, go into the advanced setting of the application pool for the application and make sure 32 bit applications are enabled (create a new app pool if you have to).
  • Create an App_Data folder under the IIS application's root and make sure the user that IIS is running under has write access to that directory. If you're not sure what that user is, go to IIS Authentication for the application. If anonymous access is enabled, the user is the local IIS_USRS. Make sure the directory is empty.
  • Create a Media folder under the IIS application's root and give write access.
  • Browse to the application. You should see the setup screen at this point.
Above only states to create a new site, add the dll's to the root (?? -> shouldn't this be bin?), and create an App_Data and Media Folder.
I was under the impression that you had implemented some mechanism to package the site or something...
Aug 8, 2013 at 3:09 PM
Edited Aug 8, 2013 at 3:11 PM
Essentially what you get when you run build Precompiled command is a built deployment package (\build\Precompiled) with source code files stripped out.
Updating a running site means uploading new contents of all folders besides App_Data and Media (which contain data created at runtime).

  • zip up the contents of build\Precompiled,
  • send to the server,
  • unzip,
  • remove the old folders (besides App_Data and Media)
  • copy the unzipped contents
Aug 8, 2013 at 7:31 PM
Where is it talking about dlls? The whole contents of build/precompiled goes into the application root.
Aug 8, 2013 at 7:50 PM
Yes, my bad, I was under the impression that it builds a set of dlls to be placed inside the bin folder.
It's all cristal clear now, thanks :)
Aug 8, 2013 at 7:53 PM
Cool :)