Philippsen's Blog

Everyday findings in my world of .net and related stuff

Posts Tagged ‘dll’

Assembly containing type xxx.xxx is not referenced

Posted by Torben M. Philippsen on April 29, 2016

When developing VS studio components in AX2012 You might experience the following error trying to run the code:

dll_could_not_be_referenced

When You build your vs project You will have to decide whether to publish to either client or server or maybe even both. This is where You need to keep in mind, that the server is quite certain to run as a 64 bit application where the client runs in 32 bit mode. So when building your dll for either server or client, You need specifically target the right cpu architecture. If You are deploying to both client and server You need to build using the “AnyCPU” option.

Using the AnyCPU option will cause a warning when compilling – just ignore it…

If You need to test your component on both server and client an easy way could be to:

  1. create a class with a new method and instantiate your dll in that method.
  2. Set the class to run on client
  3. Create a job and run the method.
  4. Switch the class properties to run on server and perform the same test again.
  5. If no errors occur You are good to go…
Advertisements

Posted in Microsoft Dynamics AX | Tagged: , , , , , | Comments Off on Assembly containing type xxx.xxx is not referenced

 
%d bloggers like this: