I am using the 2015 .Net SDK in a simple Windows Forms application to test integrating with Sage 50.
I have Sage 50 installed on my development machine which is Windows 7 x64. My project is set to compile for x86 and targets .Net 4.0. I am running Visual Studio as Administrator.
At this point this is all the code I have:
Dim Session As PeachtreeSession
Sage.Peachtree.API.Resolver.AssemblyInitializer.Initialize()
Session = New PeachtreeSession
Session.Begin("") <------------- Error on this line
I can get past the error by adding a reference to Sage.Peachtree.Domain.dll from the C:\Program Files (x86)\Sage\Peachtree folder, but that is clearly not the recommended approach per this post: http://sagecity.na.sage.com/support_communities/sage50_accounting_us/f/136/t/51240.aspx
Other users have this issue, but with no clear solution:
http://sagecity.na.sage.com/support_communities/sage50_accounting_us/f/136/t/73219.aspx
What else needs to be done?