 |
Castle Project Support forum
|
| View previous topic :: View next topic |
| Author |
Message |
SteveG
Joined: 16 Jun 2006 Posts: 146
|
Posted: Mon Aug 13, 2007 3:19 pm Post subject: Error - any ideas? |
|
|
I get the following exception:
TestCase 'M:FSMonoRailTests.PilotStatsControllerTestCase.Init'
failed: Could not load type 'Castle.MonoRail.TestSupport.BaseControllerTest' from assembly 'Castle.MonoRail.TestSupport, Version=1.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc'.
System.TypeLoadException: Could not load type 'Castle.MonoRail.TestSupport.BaseControllerTest' from assembly 'Castle.MonoRail.TestSupport, Version=1.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc'.
at System.Reflection.Assembly._GetType(String name, Boolean throwOnError, Boolean ignoreCase)
at System.Reflection.Assembly.GetType(String name)
at MutantDesign.Xml.Documentation.MemberInfoUtilities.FindType(Assembly assembly, String typeName)
at MutantDesign.Xml.Documentation.MemberInfoUtilities.FindMemberInfo(Assembly assembly, String xmlName)
at TestDriven.TestRunner.AdaptorTestRunner.Run(ITestListener testListener, ITraceListener traceListener, String assemblyPath, String testPath)
at TestDriven.TestRunner.ThreadTestRunner.Runner.Run()
This is the source code:
| Code: |
[TestFixture]
public class PilotStatsControllerTestCase : BaseControllerTest
{
private PilotStatsController pilotStatsController;
[SetUp]
public void Init()
{
pilotStatsController = new PilotStatsController();
}
}
|
(this controller does work in the monorail site.) |
|
| Back to top |
|
 |
pvenable
Joined: 15 Aug 2007 Posts: 1
|
Posted: Wed Aug 15, 2007 1:42 am Post subject: |
|
|
I was getting an error like this until I removed an old version of Castle.MonoRail.TestSupport from the Global Assembly Cache. I keep these assemblies with my individual projects rather than using the GAC, so I guess it was trying to use the outdated version in my GAC first.
Hope this helps,
Paul |
|
| Back to top |
|
 |
henry.conceicao Site Admin
Joined: 04 Aug 2006 Posts: 769 Location: São Paulo, Brazil
|
Posted: Fri Aug 17, 2007 9:42 pm Post subject: |
|
|
Paul is right. This error is the conflict of the trunk TestSupport's assembly with the one in the GAC. _________________ Cheers,
Henry Conceição
http://www.castlestronghold.com
Consultancy | Support | Training |
|
| Back to top |
|
 |
pfm102
Joined: 11 Oct 2007 Posts: 7 Location: London, UK
|
Posted: Fri Jun 06, 2008 10:34 pm Post subject: |
|
|
I am having a similar error {1}. I am unit-testing a controller {2}. I do not (to my knowledge!) have MonoRail.Framework.TestSupport.dll in my GAC. I have looked in c:\windows\assembly to see; no Castle assemblies are present (am I looking in the correct place? I run Win2008 Server Enterprise x64). I am using assemblies from a castle build-server drop, whose assembly version reads 1.0.3.5102. I am running the test with Gallio alpha3, update 2.
I am compiling my own code to target .NET 3.5.
What else can I do to diagnose the problem?
{1}
| Code: |
Set Up
System.TypeLoadException: Could not load type 'Castle.MonoRail.Framework.Test.StubMonoRailServices' from assembly 'Castle.MonoRail.Framework, Version=1.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc'. at Castle.MonoRail.TestSupport.BaseControllerTest.PrepareController(Controller controller, String areaName, String controllerName, String actionName, ContextInitializer contextInitializer) at Castle.MonoRail.TestSupport.BaseControllerTest.PrepareController(Controller controller, String areaName, String controllerName, String actionName) at Yoti.Tests.Controllers.HomeControllerTests.Index() in C:\_source\Yoti.svn2\code\tests\Yoti.Tests\Controllers\HomeControllerTests.cs:line 15 at Gallio.Utilities.ExceptionUtils.RethrowWithNoStackTraceLoss(Exception ex) in c:\RelEng\Projects\MbUnit v3\Work\src\Gallio\Gallio\Utilities\ExceptionUtils.cs:line 97 at Gallio.Utilities.ExceptionUtils.InvokeMethodWithoutTargetInvocationException(MethodBase method, Object obj, Object[] args) in c:\RelEng\Projects\MbUnit v3\Work\src\Gallio\Gallio\Utilities\ExceptionUtils.cs:line 121 at MbUnit.Framework.SetUpAttribute.<>c__DisplayClass2.<>c__DisplayClass4.b__1(PatternTestInstanceState ) in c:\RelEng\Projects\MbUnit v3\Work\src\MbUnit\MbUnit\Framework\SetUpAttribute.cs:line 51 at System.Action`1.Invoke(T obj) at Gallio.Framework.Pattern.PatternTestInstanceActions.SetUpTestInstance(PatternTestInstanceState testInstanceState) in c:\RelEng\Projects\MbUnit v3\Work\src\Gallio\Gallio\Framework\Pattern\PatternTestInstanceActions.cs:line 176 at Gallio.Framework.Pattern.PatternTestInstanceActions.SetUpTestInstance(PatternTestInstanceState testInstanceState) in c:\RelEng\Projects\MbUnit v3\Work\src\Gallio\Gallio\Framework\Pattern\PatternTestInstanceActions.cs:line 176 at Gallio.Framework.Pattern.PatternTestExecutor.<>c__DisplayClass22.b__20() in c:\RelEng\Projects\MbUnit v3\Work\src\Gallio\Gallio\Framework\Pattern\PatternTestExecutor.cs:line 429 at Gallio.Concurrency.ThreadAbortScope.RunWithThreadAbort(Action action) in c:\RelEng\Projects\MbUnit v3\Work\src\Gallio\Gallio\Concurrency\ThreadAbortScope.cs:line 156 at Gallio.Concurrency.ThreadAbortScope.Run(Action action) in c:\RelEng\Projects\MbUnit v3\Work\src\Gallio\Gallio\Concurrency\ThreadAbortScope.cs:line 76 at Gallio.Framework.Sandbox.RunWithScope(ThreadAbortScope scope, Action action, String description) in c:\RelEng\Projects\MbUnit v3\Work\src\Gallio\Gallio\Framework\Sandbox.cs:line 276
|
{2}
| Code: |
[Layout("Default")]
[Rescue("GeneralError")]
public class HomeController : SmartDispatcherController
{
public void Index()
{
PropertyBag["Title"] = "Home";
}
}
public class HomeControllerTests : BaseControllerTest
{
private HomeController hc;
[SetUp]
public void Index()
{
hc = new HomeController();
PrepareController(hc);
}
[Test]
public void HasTitleInPropertyBag ()
{
hc.Index();
Assert.AreEqual(1, hc.PropertyBag.Count);
}
}
|
|
|
| Back to top |
|
 |
pfm102
Joined: 11 Oct 2007 Posts: 7 Location: London, UK
|
Posted: Fri Jun 06, 2008 10:52 pm Post subject: |
|
|
Actually, I've just noticed that when I try to compile the latest trunk using I get a build-failure on the gac-install step of compiling Castle.MonoRail.TestSupport {1}. I imagine this is related, but I don't know how
{1}
| Code: |
common.set-assembly-attribute-values:
common.generate-assemblyinfo:
[attrib] Setting file attributes for 1 files to Norma
l.
[asminfo] Generated file 'c:\_source\castle\MonoRail\Castle.MonoRail.TestSupport\AssemblyInfo.cs'.
generate-assemblyinfo:
common.compile-dll:
[csc] Compiling 7 files to 'c:\_source\castle\build\net-3.5\debug\Castle.MonoRail.TestSupport.dll'.
gac-install:
[exec] Starting 'C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin/gacutil.exe (/f /i Castle.MonoRail.TestSupport.dll)' in 'c:\_source\castle\build\net-3.5\debug'
[exec] Microsoft (R) .NET Global Assembly Cache Utility. Version 3.5.21022.8
[exec] Copyright (c) Microsoft Corporation. All rights reserved.
[exec]
[exec] Failure adding assembly to the cache: Cannot create a file when that file already exists.
[exec]
BUILD FAILED
c:\_source\castle\MonoRail\Castle.MonoRail.TestSupport\Castle.MonoRail.TestSupport.build(41,5):
External Program Failed: C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin/gacutil.exe (return code was 1)
|
|
|
| Back to top |
|
 |
whowearsshortshorts
Joined: 09 Mar 2010 Posts: 1
|
Posted: Wed Mar 24, 2010 5:32 am Post subject: |
|
|
| pfm102 wrote: | Actually, I've just noticed that when I try to compile the latest trunk using I get a build-failure on the gac-install step of compiling Castle.MonoRail.TestSupport {1}. I imagine this is related, but I don't know how indianapolis web design
{1}
| Code: |
common.set-assembly-attribute-values:
common.generate-assemblyinfo:
[attrib] Setting file attributes for 1 files to Norma
l.
[asminfo] Generated file 'c:\_source\castle\MonoRail\Castle.MonoRail.TestSupport\AssemblyInfo.cs'.
generate-assemblyinfo:
common.compile-dll:
[csc] Compiling 7 files to 'c:\_source\castle\build\net-3.5\debug\Castle.MonoRail.TestSupport.dll'.
gac-install:
[exec] Starting 'C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin/gacutil.exe (/f /i Castle.MonoRail.TestSupport.dll)' in 'c:\_source\castle\build\net-3.5\debug'
[exec] Microsoft (R) .NET Global Assembly Cache Utility. Version 3.5.21022.8
[exec] Copyright (c) Microsoft Corporation. All rights reserved.
[exec]
[exec] Failure adding assembly to the cache: Cannot create a file when that file already exists.
[exec]
BUILD FAILED
c:\_source\castle\MonoRail\Castle.MonoRail.TestSupport\Castle.MonoRail.TestSupport.build(41,5):
External Program Failed: C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin/gacutil.exe (return code was 1)
|
|
any updates? im having similar probs! |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|