Author Topic: Compiler Error. System.Action  (Read 1298 times)

0 Members and 1 Guest are viewing this topic.

BillZndl

  • Guest
Compiler Error. System.Action
« on: August 27, 2014, 02:29:10 PM »
VS 2010 Express, Acad r2012 .net 4.0

Quote
The type 'System.Action' exists in both 'C:\Program Files\Autodesk\AutoCAD 2012 - English\System.Core.dll' and 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\mscorlib.dll'

Won't compile.
I'm trying to use a progress bar from another thread.

I see lots of questions on line similar to this but can't find an answer.
Happens when I try to use System.Action.
One suggestion was to use LinqBridge but that says it's for net 2.0.

Any way to overcome this one?

Code - C#: [Select]
  1. progressBar1.BeginInvoke(
  2.                      new System.Action(() =>
  3.                      {                        
  4.                          progressBar1.Visible = true;
  5.                      }
  6.                           ));



BillZndl

  • Guest
Re: Compiler Error. System.Action
« Reply #1 on: August 27, 2014, 02:45:14 PM »
Removed the reference path "'C:\Program Files\Autodesk\AutoCAD 2012 - English\" from the Project Properties and it went away.  :?
That may have been left over from copying up some old COM projects. :blank: