Wiki

Ticket #239 (new defect)

Opened 18 months ago

-out: does not affect -test

Reported by: Kurper Owned by:
Priority: medium Milestone:
Component: Cobra Compiler Version: 0.8.0
Keywords: Cc:

Description

Steps to reproduce:
1. Create directory, add this file to it:

# Specific DLLs shouldn't matter, just use something defined in em
@ref "bin/Lidgren.Network.dll"
use Lidgren.Network

class Program
	def main
		test
			pass
		body
			# Do something that needs the DLL.
			NetPeerConfiguration("MyExampleName")

2. Create bin/ directory in it, copy Lidgren.Network.dll into it (should work with any DLL, with test case changed appropriately)
3. "cobra test.cobra -out:bin/" works as expected
4. "cobra test.cobra -out:bin/ -test" fails with

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or ass
embly 'Lidgren.Network, Version=2010.7.15.0, Culture=neutral, PublicKeyToken=nul
l' or one of its dependencies. The system cannot find the file specified.
File name: 'Lidgren.Network, Version=2010.7.15.0, Culture=neutral, PublicKeyToke
n=null'
   at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase,
Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boo
lean throwOnFileNotFound, Boolean forIntrospection)
   at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, E
vidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Bool
ean throwOnFileNotFound, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence
 assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.Load(AssemblyName assemblyRef)
   at Cobra.Lang.Test.TestRunner._collectTestsFor(Assembly ass, Boolean willFoll
owReferences, Set`1 found)
   at Cobra.Lang.Test.TestRunner.CollectTestsFor(Assembly ass, Boolean willFollo
wReferences)
   at Cobra.Lang.Test.TestRunner.RunTestsFor(Assembly ass, Boolean willFollowRef
erences)
   at Cobra.Lang.Test.TestRunner.RunAllTests()
   at Cobra.Lang.CobraCore.RunAllTests()
   at _GeneratedTestRunner.Main()

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\M
icrosoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure lo
gging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fus
ion!EnableLog].
Note: See TracTickets for help on using tickets.