OrchardCMS / Orchard

Orchard is a free, open source, community-focused Content Management System built on the ASP.NET MVC platform.
https://orchardproject.net
BSD 3-Clause "New" or "Revised" License
2.37k stars 1.12k forks source link

Orchard.Layouts assembly compilation declaration breaks deployment #5459

Closed dcinzona closed 9 years ago

dcinzona commented 9 years ago

I just updated my local 1.9 to 1.9.1 and tried to deploy locally and am unable to do so due to line 36 in web.config under the Dynamic Forms module. https://github.com/OrchardCMS/Orchard/blob/1.9.x/src/Orchard.Web/Modules/Orchard.DynamicForms/Web.config

<add assembly="Orchard.Layouts"/>
</assemblies>

Any reason this is being declared? Can this safely be removed? Or is it an issue with build order in Visual Studio?

This same issue occurs with the ImageEditor module, where <add assembly="Orchard.MediaLibrary"/> is declared on line 34: https://github.com/OrchardCMS/Orchard/blob/1.9.x/src/Orchard.Web/Modules/Orchard.ImageEditor/Web.config

If it's a question of just changing the build dependency order, that's fine, I can do that...or if we can safely remove it, that would be great too.

dcinzona commented 9 years ago

FWIW, this is the error: [Directory]\AspnetCompileMerge\Source\modules\orchard.dynamicforms\web.config(36,0): Error ASPCONFIG: Could not load file or assembly 'Orchard.Layouts' or one of its dependencies. The system cannot find the file specified.

dcinzona commented 9 years ago

Also, for what it's worth, this only happens when you check the option "Precompile during publishing" If that option is not checked, publishing works fine. Precompiling works when those assemblies are commented out of the web.config.

sebastienros commented 9 years ago

ASP.NET precompilation is not supported. I have managed to do it at some point with a customer but it was a manual step, and required all the assemblies to be pre-compiled, using the Build Precompiled command.

dcinzona commented 9 years ago

Understood and makes sense. Interesting that I was able to successfully do this until those changes were included in the web.config. Closing this out.