Categories
Knowledge Support Support exacqVision Server Categories Products

How to: Executing and debugging C# applications with evAPI and Visual Studio 2005 or newer

C# or other managed applications created with Visual Studio 2005 or newer cause a System.AccessViolationException in the EVAPI_CreateWindow function on Windows Vista and Windows 7. To avoid this while debugging within Visual Studio and during application execution, complete the following steps.

  1. After the project has loaded, select the project properties under the Project item on the toolbar (or press Alt+F7).
  2. Select the Build Events tab.
  3. Enter the following command in the Post-build Event Command Line:
    • call “$(DevEnvDir)..\tools\vsvars32.bat”
    • editbin.exe /NXCOMPAT:NO $(TargetPath)
  4. Select the Debug tab.
  5. Uncheck the Enable the Visual Studio hosting process. This must be done for all configurations that will be executed from Visual Studio.
  6. Save and close the project properties page.
  7. Clean and rebuild the project.

<br>

How-to-Executing-and-debugging-C-applications-with-evAPI-and-Visual-Studio-2005-or-newer.pdf