Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Use NI Vision (IMAQdx) with VS2010

Hi,

 

When using IMAQdx in Visual Studio 2010 (C#), I received an error message which requires me to refer to an older verison of NI Common (8.7.35.131), which I don't have (I have 9.1.40.159). Is there anyway to walkaround, or where can I find the older version?

 

My sole purpose is to operate cameras via GiGE vision.

 

Thanks!

 

Best,

Yi

0 Kudos
Message 1 of 6
(4,664 Views)

Hi Yi,

 

I was able to find someone with a similar problem in this forum post.  Let me know if this looks like a similar error to yours, and if any of the steps listed help at all.  Additionally, I've seen similar issues in the past solved by updating to a more recent version of the drivers.  Let me know if this helps, or if you have any updates on the issue. 

0 Kudos
Message 2 of 6
(4,646 Views)

Hi Kyle,

 

Thanks for your reply! My problem is a little different... I actually have problem compiling my code:

 

         Error 1 The type 'NationalInstruments.ISupportSynchronizationContext' is defined in an assembly that is not referenced. You must add a reference to assembly

         'NationalInstruments.Common, Version=8.7.35.131, Culture=neutral, PublicKeyToken=18cbae0f9955702a'. 

 

I checked GAC, the config file (NationalInstruments.Common.config) looks like this:

<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="NationalInstruments.Common" publicKeyToken="dc6ad606294fc298"
                          culture="neutral" />
        <bindingRedirect oldVersion="7.0.0.275-7.1.40.999"
                         newVersion="9.1.40.159" />
        <bindingRedirect oldVersion="8.0.40.100-8.0.40.999"
                         newVersion="9.1.40.159" />
        <bindingRedirect oldVersion="8.1.40.100-8.1.40.999"
                         newVersion="9.1.40.159" />
        <bindingRedirect oldVersion="8.5.40.100-8.5.40.999"
                         newVersion="9.1.40.159" />
        <bindingRedirect oldVersion="8.6.40.100-8.6.40.999"
                         newVersion="9.1.40.159" />
        <bindingRedirect oldVersion="8.7.40.100-8.7.40.999"
                         newVersion="9.1.40.159" />
        <bindingRedirect oldVersion="8.9.40.100-8.9.40.999"
                         newVersion="9.1.40.159" />
        <bindingRedirect oldVersion="9.0.40.100-9.0.40.999"
                         newVersion="9.1.40.159" />
        <bindingRedirect oldVersion="9.1.40.100-9.1.40.158"
                         newVersion="9.1.40.159" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>

 

It didn't try to redirect 8.7.35.131. But even if I manually edit the file to do it, compiler still reports error... (I'm using MS VS .Net 2010)

 

I already installed the newest driver (August, 2011). I read from the release note that its development enviroment includes VS .Net 2005/2008, but doesn't mention VS2010...

 

P.S. In my code, if I reference NI Common 9.0.40.610 (for vs 2008), it compiles without a problem...haven't had a chance to test the code with camera yet. Will update later.

 

Best,

Yi

0 Kudos
Message 3 of 6
(4,634 Views)

Sorry about a typo in my previous post. NI Common for 2008 should be 9.1.35.139

0 Kudos
Message 4 of 6
(4,631 Views)

Another possibility here is that it could be a .NET version issue.  Can you try changing your project settings to target .NET 3.5 and see if that makes any difference?

0 Kudos
Message 5 of 6
(4,625 Views)

Update:

 

NI Common 9.0.40.610 (for vs 2008) works just fine with VS2010 and .net 4... Good enough for me.

0 Kudos
Message 6 of 6
(4,592 Views)