So I decided to see what would happen if I tried .NET on my project. Here's what I got:
C:\Users\Tom\Documents\Workspace\fan-math>fan -version --Dfan.runtime=dotnet
Fan Launcher
Copyright (c) 2006-2008, Brian Frank and Andy Frank
Licensed under the Academic Free License version 3.0
.NET Runtime:
clr.version: 2.0.50727.1434
fan.home: C:\Users\Tom\Applications\fan
sys.version: 1.0.44
C:\Users\Tom\Documents\Workspace\fan-math>fan --Dfan.runtime=dotnet build.fan
System.IO.FileLoadException: Could not load file or assembly 'QUT.SymbolWriter, Version=0.0.0.0, Culture=neutral, PublicKeyToken=8b16d9e060688056' or one of its dependencies. The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more detail. (Exception from HRESULT: 0x800736B1)
at PERWAPI.PDBWriter.WritePDBFile (Unknown Source)
at PERWAPI.PEWriter.MakeFile (PERWAPI.cs:13620)
at PERWAPI.PEFile.WritePEFile (PERWAPI.cs:17446)
at Fanx.Emit.Emitter.commit (Emitter.cs:93)
at Fanx.Emit.FTypeEmit.emitPod (FTypeEmit.cs:111)
at Fanx.Emit.FTypeEmit.emitAndLoad (FTypeEmit.cs:32)
sys::ClassType.emit (ClassType.cs:503)
Could not load file or assembly 'QUT.SymbolWriter, Version=0.0.0.0, Culture=neutral, PublicKeyToken=8b16d9e060688056' or one of its dependencies. The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more detail. (Exception from HRESULT: 0x800736B1)
sys::Err: Cannot emit: compiler::Main
sys::ClassType.emit (ClassType.cs:511)
sys::ClassType.finish (ClassType.cs:537)
ERROR: cannot compile script sys::Err: Method not mapped to System.Reflection correctly compiler::Main.compileScript
sys::Method.MethodFunc._isStatic (Method.cs:448)
sys::Method.MethodFunc.call (Method.cs:274)
sys::Method.call (Method.cs:153)
at Fanx.Util.ScriptUtil.compile (ScriptUtil.cs:89)
at Fanx.Util.ScriptUtil.compile (ScriptUtil.cs:47)
sys::Sys.compile (Sys.cs:571)
at Fanx.Tools.Fan.executeFile (Fan.cs:52)
C:\Users\Tom\Documents\Workspace\fan-math>fan --Dfan.runtime=dotnet build.fan
ERROR: cannot compile script
sys::Err: Method 'flags' in type 'Fan.Compiler.TypeDef' from assembly 'compiler, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
compiler::UsingAndTypeScanner.parseType (Unknown Source)
compiler::UsingAndTypeScanner.parse (Unknown Source)
compiler::ScanForUsingsAndTypes.run (Unknown Source)
sys::List.each (List.cs:505)
compiler::ScanForUsingsAndTypes.run (Unknown Source)
compiler::Compiler.frontend (Unknown Source)
compiler::Compiler.compile (Unknown Source)
compiler::Main.compileScript (Unknown Source)
Is it possible I'm just doing something wrong?
brianSat 18 Jul 2009
That is the same version on .NET I am running.
What happens if you run this:
fant --Dfan.runtime=dotnet testSys
tompalmerSat 18 Jul 2009
I was wise enough to try Google now. Got some clue maybe. I am on 64-bit Vista, and that seems like it might be related.
tompalmerSat 18 Jul 2009
What happens if you run this: fant --Dfan.runtime=dotnet testSys
C:\Users\Tom\Documents\Workspace\fan-math>fant --Dfan.runtime=dotnet testSys
-- Run: testSys::ActorTest.testMake...
System.IO.FileLoadException: Could not load file or assembly 'QUT.SymbolWriter, Version=0.0.0.0, Culture=neutral, PublicKeyToken=8b16d9e060688056' or one of its dependencies. The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more detail. (Exception from HRESULT: 0x800736B1)
at PERWAPI.PDBWriter.WritePDBFile (Unknown Source)
at PERWAPI.PEWriter.MakeFile (PERWAPI.cs:13620)
at PERWAPI.PEFile.WritePEFile (PERWAPI.cs:17446)
at Fanx.Emit.Emitter.commit (Emitter.cs:93)
at Fanx.Emit.FTypeEmit.emitPod (FTypeEmit.cs:111)
at Fanx.Emit.FTypeEmit.emitAndLoad (FTypeEmit.cs:32)
sys::ClassType.emit (ClassType.cs:503)
Could not load file or assembly 'QUT.SymbolWriter, Version=0.0.0.0, Culture=neutral, PublicKeyToken=8b16d9e060688056' or one of its dependencies. The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more detail. (Exception from HRESULT: 0x800736B1)
sys::Err: Cannot emit: testSys::ActorTest
sys::ClassType.emit (ClassType.cs:511)
sys::ClassType.finish (ClassType.cs:537)
ERROR: Cannot make test testSys::ActorTest
sys::Err: Method not mapped to System.Reflection correctly testSys::ActorTest.make
sys::Method.MethodFunc._isStatic (Method.cs:448)
sys::Method.MethodFunc.callList (Method.cs:184)
sys::Type.make (Type.cs:253)
sys::ClassType.make (ClassType.cs:111)
sys::Type.make (Type.cs:243)
at Fanx.Tools.Fant.runTest (Fant.cs:136)
-- Run: testSys::ActorTest.testBasics...
Pass: testSys::ActorTest.testBasics [505]
-- Run: testSys::ActorTest.testOrdering...
Pass: testSys::ActorTest.testOrdering [99800]
-- Run: testSys::ActorTest.testMessaging...
Pass: testSys::ActorTest.testMessaging [12]
-- Run: testSys::ActorTest.testTimeoutCancel...
Pass: testSys::ActorTest.testTimeoutCancel [6]
-- Run: testSys::ActorTest.testStop...
Pass: testSys::ActorTest.testStop [329]
-- Run: testSys::ActorTest.testKill...
System.Threading.ThreadInterruptedException: Thread was interrupted from a waiting state.
at System.Threading.Monitor.Enter (Unknown Source)
at Fanx.Util.ThreadPool.ready (ThreadPool.cs:180)
at Fanx.Util.ThreadPool.Worker.run (ThreadPool.cs:281)
System.Threading.ThreadInterruptedException: Thread was interrupted from a waiting state.
at System.Threading.Monitor.Enter (Unknown Source)
at Fanx.Util.ThreadPool.ready (ThreadPool.cs:180)
at Fanx.Util.ThreadPool.Worker.run (ThreadPool.cs:281)
System.Threading.ThreadInterruptedException: Thread was interrupted from a waiting state.
at System.Threading.Monitor.Enter (Unknown Source)
at Fanx.Util.ThreadPool.ready (ThreadPool.cs:180)
at Fanx.Util.ThreadPool.Worker.run (ThreadPool.cs:281)
System.Threading.ThreadInterruptedException: Thread was interrupted from a waiting state.
at System.Threading.Monitor.Enter (Unknown Source)
at Fanx.Util.ThreadPool.ready (ThreadPool.cs:180)
at Fanx.Util.ThreadPool.Worker.run (ThreadPool.cs:281)
System.Threading.ThreadInterruptedException: Thread was interrupted from a waiting state.
at System.Threading.Monitor.Enter (Unknown Source)
at Fanx.Util.ThreadPool.ready (ThreadPool.cs:180)
at Fanx.Util.ThreadPool.Worker.run (ThreadPool.cs:281)
System.Threading.ThreadInterruptedException: Thread was interrupted from a waiting state.
at System.Threading.Monitor.Enter (Unknown Source)
at Fanx.Util.ThreadPool.ready (ThreadPool.cs:180)
at Fanx.Util.ThreadPool.Worker.run (ThreadPool.cs:281)
TEST FAILED
sys::TestErr: Test failed: 235ms
sys::Test.fail (Test.cs:178)
sys::Test.verify (Test.cs:64)
testSys::ActorTest.testKill (Unknown Source)
-- Run: testSys::ActorTest.testLater...
Pass: testSys::ActorTest.testLater [11]
.
.
... many lines clipped ...
.
.
-- Run: testSys::ZipTest.testCreate...
Pass: testSys::ZipTest.testCreate [66]
Time: 62135ms
-- failed: testSys::ActorTest.testMake
-- failed: testSys::ActorTest.testKill
-- failed: testSys::DateTimeTest.testNow
-- failed: testSys::ErrTest.testTrace
-- failed: testSys::FileTest.testMmap
-- failed: testSys::FileTest.testSync
-- failed: testSys::FuncTest.testCurryDefParams
-- failed: testSys::MapTest.testOrdered
-- failed: testSys::MapTest.testReadonly
-- failed: testSys::MixinTest.testNet
-- failed: testSys::RegexTest.testGroups
-- failed: testSys::RegexTest.testSpecialChars
-- failed: testSys::RegexTest.testClasses
-- failed: testSys::RegexTest.testPosixClasses
-- failed: testSys::RegexTest.testJavaCharacterClasses
-- failed: testSys::RegexTest.testBoundaryMatchers
-- failed: testSys::RegexTest.testPosessiveQuantifiers
-- failed: testSys::RegexTest.testBackReferences
-- failed: testSys::RegexTest.testQuotation
-- failed: testSys::StreamTest.testISO_8859
***
*** 20 FAILURES [53 tests, 564 methods, 299341 verifies]
***
So some of it works, I guess.
KevinKelleySat 18 Jul 2009
On 32-bit XP I get the same -- sys::Err: cannot emit with reference to QUT.SymbolWriter but only on first invocation after a build. If I try again, it works. Weird.
tompalmerSat 18 Jul 2009
Maybe my quick skim wasn't good enough, then. Meanwhile, mine (as shown above) wouldn't build even after multiple tries. Not sure what's up.
brianSat 18 Jul 2009
I think Andy will have to take a look when he gets back from vacation
andyThu 23 Jul 2009
Looks like .NET is not finding that DLL - which doesn't make sense cause it finds the Zip library we use (which is in the same directory). You're lib/dotnet/ directory should look like this:
In skimming around some discussions on "side-by-side configuration" errors, it seems like several causes are possible. Some hints that it might depend on which system libraries are installed. Do y'all have things like Visual Studio installed by chance?
KevinKelleyFri 24 Jul 2009
My /dotnet/ dir looks the same, and I also have Visual Studio (2008, haven't loaded the 2010 beta yet).
andyFri 24 Jul 2009
I've had to install a number of things in order to get various pieces of .NET working, so that may be the case. I have an Express version installed, but not the full Visual Studio.
tompalmerFri 24 Jul 2009
I don't think I have any Express (and definitely no full) Studio installed. I'll have to double-check later.
andyWed 10 Feb 2010
I'm seeing this issue now. I had to reinstall from scratch a few weeks ago, and never installed Visual Studio (thankfully). Looking at the QUT.SymbolWriter.dll (which we use for generating debug info for .NET assemblies) it has a dependency on the Microsoft.VisualC namespace.
From the bit a read this appears to be a component of Visual Studio - which would explain why it worked for people with VS installed.
For now, I'm just going to disable debug support for .NET. I think long-term this runtime needs be rewritten using the System.Reflection.Emit APIs. But this will at least make sure we keep the .NET-runtime up-to-date with the JVM so we enable that when we're ready to bite it off.
tompalmer Sat 18 Jul 2009
So I decided to see what would happen if I tried .NET on my project. Here's what I got:
Is it possible I'm just doing something wrong?
brian Sat 18 Jul 2009
That is the same version on .NET I am running.
What happens if you run this:
tompalmer Sat 18 Jul 2009
I was wise enough to try Google now. Got some clue maybe. I am on 64-bit Vista, and that seems like it might be related.
tompalmer Sat 18 Jul 2009
So some of it works, I guess.
KevinKelley Sat 18 Jul 2009
On 32-bit XP I get the same --
sys::Err: cannot emit
with reference toQUT.SymbolWriter
but only on first invocation after a build. If I try again, it works. Weird.tompalmer Sat 18 Jul 2009
Maybe my quick skim wasn't good enough, then. Meanwhile, mine (as shown above) wouldn't build even after multiple tries. Not sure what's up.
brian Sat 18 Jul 2009
I think Andy will have to take a look when he gets back from vacation
andy Thu 23 Jul 2009
Looks like .NET is not finding that DLL - which doesn't make sense cause it finds the Zip library we use (which is in the same directory). You're
lib/dotnet/
directory should look like this:tompalmer Fri 24 Jul 2009
Here's what it says:
In skimming around some discussions on "side-by-side configuration" errors, it seems like several causes are possible. Some hints that it might depend on which system libraries are installed. Do y'all have things like Visual Studio installed by chance?
KevinKelley Fri 24 Jul 2009
My /dotnet/ dir looks the same, and I also have Visual Studio (2008, haven't loaded the 2010 beta yet).
andy Fri 24 Jul 2009
I've had to install a number of things in order to get various pieces of .NET working, so that may be the case. I have an Express version installed, but not the full Visual Studio.
tompalmer Fri 24 Jul 2009
I don't think I have any Express (and definitely no full) Studio installed. I'll have to double-check later.
andy Wed 10 Feb 2010
I'm seeing this issue now. I had to reinstall from scratch a few weeks ago, and never installed Visual Studio (thankfully). Looking at the
QUT.SymbolWriter.dll
(which we use for generating debug info for .NET assemblies) it has a dependency on theMicrosoft.VisualC
namespace.From the bit a read this appears to be a component of Visual Studio - which would explain why it worked for people with VS installed.
For now, I'm just going to disable debug support for .NET. I think long-term this runtime needs be rewritten using the
System.Reflection.Emit
APIs. But this will at least make sure we keep the .NET-runtime up-to-date with the JVM so we enable that when we're ready to bite it off.