2

I've got a DLL in C# that targets the 4.0 framework. I have a managed C++ dll that also targets the 4.0 framework, but when I try to add my C# dll as a reference, I get 'Could not add a reference to file MyFile.dll because it is neither a .NET assembly nor a registered ActiveX control'.

This works fine if both DLL's target 4.5. I am using VS2012. I want to be able to target 4.0 though, not 4.5.

DYoung
  • 114
  • 4
  • It's difficult to says what why you get the error without the code – Tinwor Aug 07 '14 at 22:15
  • 1
    @Tinwor I do not believe this has anything to do with the code. According to http://social.msdn.microsoft.com/Forums/vstudio/en-US/d8700d07-5249-4a44-9862-8dc928884f4d/it-is-neither-a-net-assembly-or-registered-activex-control it may be a dependency issue with the C# dll? – clcto Aug 07 '14 at 22:18
  • The following post was helpful to me: http://stackoverflow.com/questions/21015809/how-to-identify-that-an-assembly-has-been-compiled-with-for-net-4-5-as-opposed – rgb Aug 05 '15 at 16:00

0 Answers0