Skip to content
This repository has been archived by the owner on May 15, 2023. It is now read-only.

Mixed mode assembly error in interactive mode #41

Open
juliensobrier opened this issue Feb 1, 2015 · 5 comments
Open

Mixed mode assembly error in interactive mode #41

juliensobrier opened this issue Feb 1, 2015 · 5 comments

Comments

@juliensobrier
Copy link
Contributor

This error happens in interactive mode only, not when using he --render option:

TrifleJS.exe
Unhandled Exception: System.IO.FileLoadException: Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.
at TrifleJS.Program.Interactive()
at TrifleJS.Program.Main(String[] args) in c:...\trifleJS\Program.cs:line 88

I'm using Visual Studio 2013, the project was converted automatically. The .Net target for the solution is 4. I couldn't figure out which assembly has been compiled for .Net 2.

@juliensobrier
Copy link
Contributor Author

This was caused by Noesis.Javascript and Newtonsoft.Json

@sdesalas
Copy link
Owner

sdesalas commented Feb 1, 2015

Hi @juliensobrier.

Thanks for the bug report and related info. I'm trying to remove dependency on local installation of VC++ 2008 runtime (see #25), so I bundled dependencies for Noesis.Javascript but in doing so might have ended up causing other issues too.

BTW this could also be related to the platform target. I'm always targetting .NET 3.5 and x86 to make sure that I can have one set of binaries and dependencies working in x64 and x86 with lowest .NET version dependency (.NET 3.5 is bundled in Win7). I had a similar error to yours when combining dependencies from x64 and x86 on the same project I think.

@sdesalas
Copy link
Owner

sdesalas commented Feb 1, 2015

Also, you have a wider selection of downloads for Noesis.Javascript (.Net 3.5 and 4 vs x64 and x86) if you are building TrifleJS against a specific .NET version. You can download the DLLs in this link.

Be warned though, it can get quite confusing trying to sort out your binaries vs different platforms and versions of .NET. The current DLLs and TrilfeJS.csproj config in TrifleJS are the result of much confusion trying to have a single set of files build in both my home (XP x86 .NET 3.5), and work (Win7 x64 with .NET 4.5) computers.

@sdesalas
Copy link
Owner

sdesalas commented Feb 1, 2015

I'll be adding some more info on this topic to the wiki. Its bound to come up again.

@juliensobrier
Copy link
Contributor Author

I'm not very familiar with .Net, but is there a way to get npm to pull the dependencies automatically? This is how I got the right version for the 2 libraries.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants