Open GoogleCodeExporter opened 9 years ago
assigning this issue to release 1.3.1
Original comment by jason.wh...@gmail.com
on 17 Aug 2008 at 5:20
After long investigation, I see no easy way to _properly_ remove the GAC
dependency.
So, for the time being, I am putting this ticket on hold.
As a interim solution checkout:
http://jason.whitehorn.ws/2008/08/24/aspNETserve+Without+GAC+Install.aspx
Original comment by jason.wh...@gmail.com
on 24 Sep 2008 at 2:47
To get around the GAC, see the hack used by the latest Cassini drop:
http://blogs.msdn.com/dmitryr/archive/2008/10/03/cassini-for-framework-3-5.aspx
In particular, check out CreateWorkerAppDomainWithHost in Server.cs. Here's the
bit
which may help you as well:
/*
********************************************************************************
**
*
* Copyright (c) Microsoft Corporation. All rights reserved.
*
* This source code is subject to terms and conditions of the Microsoft Public
* License (Ms-PL). A copy of the license can be found in the license.htm file
* included in this distribution.
*
* You must not remove this notice, or any other, from this software.
*
*
********************************************************************************
**/
static object CreateWorkerAppDomainWithHost(string virtualPath, string
physicalPath,
Type hostType) {
// this creates worker app domain in a way that host doesn't need to be in GAC
or bin
// using BuildManagerHost via private reflection
var uniqueAppString = string.Concat(virtualPath, physicalPath).ToLowerInvariant
();
var appId = (uniqueAppString.GetHashCode()).ToString("x",
CultureInfo.InvariantCulture);
// create BuildManagerHost in the worker app domain
var appManager = ApplicationManager.GetApplicationManager();
var buildManagerHostType = typeof(HttpRuntime).Assembly.GetType
("System.Web.Compilation.BuildManagerHost");
var buildManagerHost = appManager.CreateObject(appId, buildManagerHostType,
virtualPath, physicalPath, false);
// call BuildManagerHost.RegisterAssembly to make Host type loadable in the
worker app domain
buildManagerHostType.InvokeMember(
"RegisterAssembly",
BindingFlags.Instance | BindingFlags.InvokeMethod | BindingFlags.NonPublic,
null,
buildManagerHost,
new object[] { hostType.Assembly.FullName, hostType.Assembly.Location });
// create Host in the worker app domain
return appManager.CreateObject(appId, hostType, virtualPath, physicalPath,
false);
}
Original comment by azizatif
on 21 Nov 2008 at 12:44
Original issue reported on code.google.com by
jason.wh...@gmail.com
on 16 Jul 2008 at 2:20