Re: [Ikvm-developers] Running my .dll with older .NET versions
Brought to you by:
jfrijters
From: Jeroen F. <je...@su...> - 2010-07-22 15:13:07
|
Hi Martin, To target .NET 3.0 (or 2.0) you either need to use Visual Studio 2008 or add a "dummy" System.Core.dll to your project references. The dummy dll can be found here: http://www.frijters.net/System.Core.zip Regards, Jeroen > -----Original Message----- > From: Martin Grigorov [mailto:mcg...@e-...] > Sent: Thursday, July 22, 2010 4:27 PM > To: ikv...@li... > Subject: [Ikvm-developers] Running my .dll with older .NET versions > > Hi, > > I'm a Java guy with no .NET experience. > > Here is my case: > I have a Java library (.jar) which I want to convert to .dll. IKVM does > very good work here ! > I use version 0.42.0.6: > /usr/bin/mono /tmp/ikvm/ikvm-0.42.0.6/bin/ikvmc.exe /path/to/library.jar > -out:/path/to/library.dll -keyfile:/path/to/private-key.snk > > Now to test the produced .dll I use MS Visual Studio 2010 Express. I > create a simple console application to which I add the following > references: > - IKVM.OpenJDK.Core.dll > - IKVM.Runtime.dll > - IKVM.Runtime.JNI.dll > - library.dll > > The application successfully runs with .NET target framework 4 and 3.5, > but with 3.0 it shows the error and warnings [1]. > > It looks like the .dll is linked to .NET 3.5 (I could be wrong) > > Ideas how to make my library working with older .NET versions? > The library itself is about string manipulations so there is nothing > fancy that could not work in older .NET apps. > > Thanks > Martin > > 1. > Error 1 The type or namespace name 'com' could not be found (are you > missing a using directive or an assembly reference?) C:\Users\fas > \documents\visual studio 2010\Projects\QueryLang2\QueryLang2\Program.cs > 4 7 QueryLang2 > Warning 2 The primary reference "System.Core", which is a framework > assembly, could not be resolved in the currently targeted framework. > ".NETFramework,Version=v3.0". To resolve this problem, either remove the > reference "System.Core" or retarget your application to a framework > version which contains "System.Core". QueryLang2 Warning 3 The primary > reference "System.Xml.Linq" could not be resolved because it has an > indirect dependency on the framework assembly "System.Core, > Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which > could not be resolved in the currently targeted framework. > ".NETFramework,Version=v3.0". To resolve this problem, either remove the > reference "System.Xml.Linq" or retarget your application to a framework > version which contains "System.Core, Version=3.5.0.0, Culture=neutral, > PublicKeyToken=b77a5c561934e089". > QueryLang2 > Warning 4 The primary reference "IKVM.Runtime.JNI" could not be resolved > because it has an indirect dependency on the framework assembly > "System.Core, Version=3.5.0.0, Culture=neutral, > PublicKeyToken=b77a5c561934e089" which could not be resolved in the > currently targeted framework. ".NETFramework,Version=v3.0". To resolve > this problem, either remove the reference "IKVM.Runtime.JNI" or retarget > your application to a framework version which contains "System.Core, > Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". > QueryLang2 > Warning 5 The primary reference "IKVM.Runtime" could not be resolved > because it has an indirect dependency on the framework assembly > "System.Core, Version=3.5.0.0, Culture=neutral, > PublicKeyToken=b77a5c561934e089" which could not be resolved in the > currently targeted framework. ".NETFramework,Version=v3.0". To resolve > this problem, either remove the reference "IKVM.Runtime" or retarget > your application to a framework version which contains "System.Core, > Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". > QueryLang2 > Warning 6 The primary reference "IKVM.OpenJDK.Core" could not be > resolved because it has an indirect dependency on the framework assembly > "System.Core, Version=3.5.0.0, Culture=neutral, > PublicKeyToken=b77a5c561934e089" which could not be resolved in the > currently targeted framework. ".NETFramework,Version=v3.0". To resolve > this problem, either remove the reference "IKVM.OpenJDK.Core" or > retarget your application to a framework version which contains > "System.Core, Version=3.5.0.0, Culture=neutral, > PublicKeyToken=b77a5c561934e089". QueryLang2 Warning 7 The primary > reference "System.Data.DataSetExtensions" could not be resolved because > it has an indirect dependency on the framework assembly "System.Core, > Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which > could not be resolved in the currently targeted framework. > ".NETFramework,Version=v3.0". To resolve this problem, either remove the > reference "System.Data.DataSetExtensions" or retarget your application > to a framework version which contains "System.Core, Version=3.5.0.0, > Culture=neutral, PublicKeyToken=b77a5c561934e089". QueryLang2 Warning 8 > The primary reference "fredhopper-query-lang-2.7-SNAPSHOT" > could not be resolved because it has an indirect dependency on the > framework assembly "System.Core, Version=3.5.0.0, Culture=neutral, > PublicKeyToken=b77a5c561934e089" which could not be resolved in the > currently targeted framework. ".NETFramework,Version=v3.0". To resolve > this problem, either remove the reference "fredhopper-query-lang-2.7- > SNAPSHOT" or retarget your application to a framework version which > contains "System.Core, Version=3.5.0.0, Culture=neutral, > PublicKeyToken=b77a5c561934e089". QueryLang2 Warning 9 The primary > reference "System.Xml.Linq", which is a framework assembly, could not be > resolved in the currently targeted framework. > ".NETFramework,Version=v3.0". To resolve this problem, either remove the > reference "System.Xml.Linq" or retarget your application to a framework > version which contains "System.Xml.Linq". QueryLang2 Warning 10 The > primary reference "System.Data.DataSetExtensions", which is a framework > assembly, could not be resolved in the currently targeted framework. > ".NETFramework,Version=v3.0". To resolve this problem, either remove the > reference "System.Data.DataSetExtensions" or retarget your application > to a framework version which contains "System.Data.DataSetExtensions". > QueryLang2 Warning 11 The primary reference "Microsoft.CSharp", which is > a framework assembly, could not be resolved in the currently targeted > framework. ".NETFramework,Version=v3.0". To resolve this problem, either > remove the reference "Microsoft.CSharp" or retarget your application to > a framework version which contains "Microsoft.CSharp". QueryLang2 > Warning 12 The referenced component 'System.Core' could not be found. > Warning 13 The referenced component 'System.Xml.Linq' could not be > found. > Warning 14 The referenced component 'System.Data.DataSetExtensions' > could not be found. > Warning 15 The referenced component 'Microsoft.CSharp' could not be > found. > > > > > > ------------------------------------------------------------------------ > ------ > This SF.net email is sponsored by Sprint What will you do first with > EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Ikvm-developers mailing list > Ikv...@li... > https://lists.sourceforge.net/lists/listinfo/ikvm-developers |