COM Projects doesn't work
I want to convert AutoCAD COM projects to BricsCAD COM projects.
I make the C# console application project, and reference BrxMgd.DLL, TD_Mgd.DLL, axbricscadapp1.dll and axbricscaddb1.dll.
.NET API projects works well, but COM projects does not works.
I debug with the following code,
But SystemBadImageFormatException error(Could not load file or assembly 'BrxMgd, Version=19.2.0.13632, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.) occurs.
What is the reason for this error?
Development environment is Windows7(64bit), Visual Studio 2013.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CsBrxMgd;
using Bricscad.ApplicationServices;
using BricscadApp;
using System.Runtime.InteropServices;
namespace ConsoleBricsCAD_TEST
{
static void Main(string[] args)
{
OpenDrawing(@C:\temp\test.dwg);
}
public static void OpenDrawing(string fileName) { AcadApplication acAppComObj = null; const string strProgId = "BricscadApp.AcadApplication"; AcadApplication app = Application.AcadApplication as AcadApplication; }
}
Comments
-
referencing BrxMgd.DLL, TD_Mgd.DLL wont work in a console app, these only work with class library projects
0