With dynamic compilation, it is sometimes necessary to restart the AppDomain.
In the command line scenario, instead of restarting the appdomain, we throw
an exception with an descriptive error message.
--HG--
branch : dev
GetReferencedAssemblies forces all assemblies to be loaded, which has an impact
on startup time. Since we know the name of the assemblies we need to load for
extensions/modules, do a assembly name check instead.
Also refactor code paths to always use the IBuildManager abstraction.
--HG--
branch : dev
Suppose Module A is loaded through its pre-compiled version
Suppose Module B is loaded through its pre-compiled version
Suppose Module A depends on Module B
If the csproj of Module B is updated, Module B will be dynamically compiled.
We have to ensure Module A is also dynamically compiled, because Module A can't
reference the pre-compiled version of B anymore.
The way we enforce this is by asking every loader if they are compatible
with all module references of a module before picking it as the actual loader.
If a loader decides it's not compatible with the module references, the next
loader in order of priority will be considered.
--HG--
branch : dev
* Removed unused "ServiceLocator" class
* Added "OrchardHostContainerRegistry" class to enable Shim/HostContainer
registration for DI
* Refactored the BuildProvider for .csproj file to use the new
OrchardHostContainerRegistry class and enable proper DI for implementations.
--HG--
branch : dev
From the comment:
/// <summary>
/// We should be able to support reloading multiple version of a compiled module from
/// a ".csproj" file in the same AppDomain. However, we are currently running into a
/// limitation with NHibernate getting confused when a type name is present in
/// multiple assemblies loaded in an AppDomain. So, until a solution is found, any change
/// to a ".csproj" file of an active module requires an AppDomain restart.
/// The purpose of this class is to keep track of all .csproj files monitored until
/// an AppDomain restart.
/// </summary>
--HG--
branch : dev
When a WebForm view file is served through the WebFormVirtualPathProvider,
we override GetFileHash to include the virtual path of all the dependencies
used to compile the form. For example, if we had a "Assembly Name=..."
directive, we want to include the file hash of the assembly file, so that if the
assembly file is updated with a newer version, the file hash of the WebForm view
file will be different, which will tell ASP.NET the view file needs to be
recompiled.
--HG--
branch : dev
When a view is served from the "~/Themes" directory, we need to add
the assembly directives of all the modules dynamically compiled.
--HG--
branch : dev
We don't need this. Azure supports writing tp ~/App_Data. There is no
guarantee that the content will persist, but that's exactly the assumption
of the IAppDataFolder abstraction: it's a local cache, which persists
for _some_ time accross app restarts.
--HG--
branch : dev
OrchardHost calls into all extension loaders to all extensions descriptor,
allowing each loader to add the set of resource to monitor for change.
OrchardHost resets its list of shells at the beginning of a request if
any monitored resources has changed.
--HG--
branch : dev
First pass is "probing": any loader who thinks it can load a
given extension returns a descriptor for it. The descriptor contains
information about how old the extension is.
The extension manager sorts the descriptor list return by probing all
loaders, and picks the most recent entry.
During the 2nd pass, each loader is called again, with the candidate extension
entry as argument. This allows each loader to be notified that, if they don't
load an extension, they might still need to cleanup some state related to
previous loading.
In essence, this is implementing a complete state machine of loaders and
extension "active/inactive" states/transitions.
--HG--
branch : dev
Refactor IAppDataFolder so that it can be used for implementing
DefaultDependenciesFolder.
--HG--
branch : dev
rename : src/Orchard/Environment/Extensions/Loaders/WebFormsExtensionsVirtualFile.cs => src/Orchard/FileSystems/Dependencies/WebFormsExtensionsVirtualFile.cs
rename : src/Orchard/Environment/Extensions/Loaders/WebFormsExtensionsVirtualPathProvider.cs => src/Orchard/FileSystems/Dependencies/WebFormsExtensionsVirtualPathProvider.cs
rename : src/Orchard/Environment/IVirtualPathProvider.cs => src/Orchard/FileSystems/VirtualPath/DefaultVirtualPathProvider.cs
rename : src/Orchard/Environment/ICustomVirtualPathProvider.cs => src/Orchard/FileSystems/VirtualPath/ICustomVirtualPathProvider.cs
Perf: Use the cache manager to keep the list of dependency descriptors in
memory, with invalidation when "dependencies.xml" changes on disk
When loading an assembly from the list of references assemblies, notify
the dependencies folder component, so it removes the entry.
--HG--
branch : dev
* Add "Assembly Src" directive to WebForms files loaded from vpp
* Notify the OrchardHost when the .csproj file a a dynamic module is changed.
* Make the registration of custom virtual path provider a bit more extensible,
so that the custom VPP can be instantiated using DI.
--HG--
branch : dev
This is so that we dynamically add the relevant <%@ Assembly Name="" %>
directive to WebForms files served from modules which have been dynamically
compiled and stored in the "~/App_Data/Dependencies" folder.
--HG--
branch : dev
We need to overwrite files when copying to App_Data/Dependencies folder.
We need to compare modification date, not creation date when deciding
to copy a file to the App_Data/Dependencies folder.
--HG--
branch : dev