"FileLoadException was unhandled by user code" (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)
as the matter above.i got exception when try to execute
Axapta axapta;
AxaptaRecord axaptaRecord;
List<Vendor> vendors = new List<Vendor>();
public void Submit(Vendor vendor)
{
axapta = new Axapta();
axapta.Logon(null,null, null, null);
using (axaptaRecord = axapta.CreateAxaptaRecord("IDS_Pelajar"))
{
axaptaRecord.Clear();
axaptaRecord.InitValue();
axaptaRecord.set_Field("TenteraPolisNo", vendor.VendorAccount);
axaptaRecord.set_Field("Poskod", vendor.InvoiceAccount);
axaptaRecord.set_Field("Keturunan", vendor.Name);
axaptaRecord.Insert();
}
axapta.Logoff();
vendors.Add(vendor);
i already try to add this line of code in app.config
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
</startup>
but still it doesn't work.
i have no problem to execute that block of code in console..the exception only pop up when i'm try to execute that block of code in WCF services library
sorry for trouble but i really loss now..Tq 4 help