Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6162063
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:35:22+00:00 2026-05-23T21:35:22+00:00

I am trying to get SWIG to work with Visual Studio and C#. I

  • 0

I am trying to get SWIG to work with Visual Studio and C#.

I downloaded swigwin-2.0.4.zip and converted the project to a VS 2010 project.

I am able to build the ‘class’ example. When I then try to run compiled build I get the error

    The type initializer for 'examplePINVOKE' threw an exception.

I haved googled the error, but have not found any suggestions on how to resolve it.

Hope somebody is able to help!

Thanks,

Christian

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T21:35:22+00:00Added an answer on May 23, 2026 at 9:35 pm

    The solution for me was

    • Move the used dll’s to the Release (or Debug) directory
    • Run CorFlags /32Bit+ file.exe

    where file.exe is the executable produced by building the code.

    For more information on what is going on Í found the following links helpful

    http://www.davesquared.net/2008/12/systembadimageformatexception-on-64-bit.html

    http://blogs.msdn.com/b/joshwil/archive/2005/05/06/415191.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to get this to work, with no luck: [DataMember] public Type ParameterType {
Trying to get a JSON output to work with jqGrid 'userdata' option. The example
I'm trying to build and install M2Crypto on Ubuntu 10.04 LTS. I downloaded and
I am trying get the html within .event_recur. $(.entry).each(function(){ alert($(this).find(.event_recur).html()); }); <div class=entry> <p
Trying to get a value from a object isn't working out. class Asset <
I'm trying to build a C++ extension for python using swig. I've followed the
I'm trying get LocalConnection to work between two swf's placed within two different IFRAMES.
I am trying get Javascript popup calendar control to work which doesnt work. I
I am trying get my first simple project in rails to run. I have
Trying to get past a class cast exception here: FooClass fooClass = (FooClass )

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.