1. install any tool that can compile and debug the. NET project. We recommend two free tools.
A. sharpdevelop2,
Http://www.icsharpcode.net/OpenSource/SD/Download/
B. Visual Studio express editions,
Http://msdn.microsoft.com/vstudio/express/support/install/
2. Ensure that the runtime of. net1.1 and. net2.0 is installed.
A. net1.1 Runtime
Http://www.microsoft.com/downloads/details.aspx? Familyid = 262d25e3-f589-4842-8157-034d1e7cf3a3 & displaylang = en
B. net2.0 Runtime
Http://www.microsoft.com/downloads/details.aspx? Familyid = 0856eacb-4362-4b0d-8edd-aab15c5e04f5 & displaylang = en
3. download and install the vbtocstool from http://www.vbconversions.net/download.html
4. Conversion with vbtocs: Before converting any VB.net project, ensure that the project has been compiled on the local machine, which will improve the accuracy of conversion.
5. Open the converted C # project compilation, troubleshooting
6. The following are troubleshooting steps for converting the VB.net project in AutoCAD ObjectARX 2007/samples/DOTNET to C --
A. Modify the path of two CAD assemblies (acdbmgd. dll and acmgd. dll) in the project file.
B. Cancel all class comments on audesk namespace using
C. manually add the Assembly: extensionapplication and assembly: commandclass attributes as needed.
D. replace all system. clscompliantattribute. Autodesk. AutoCAD. runtime or system. type. Autodesk. AutoCAD. runtime with Autodesk. AutoCAD. runtime.
E. replace all openmodes with Autodesk. AutoCAD. databaseservices. openmode.
F. Compile and follow the prompts to modify the error, mainly including --
. Force Type replacement
. For the byref of VB, you must add the ref in the place of the call.
. For reference of collection elements in the form of Bt. Item (blocktablerecord. modelspace), change to BT [blocktablerecord. modelspace].
. Replace the break converted from exit try with return.
. C # Is case sensitive.
. Replace the system. eventhandler type with the correct event type. Here, you can use the corresponding function to implement some parameters. For example, the promptselectionresulteventargs obtained by promptselectionresulteventhandler
Howwan
2006-7-27