AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 26.04.2019, 20:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
stoneridgesoftware: Dynamics AX 2012 Error When Importing Modelstore
Источник: https://stoneridgesoftware.com/dynam...ng-modelstore/
==============

When importing model files from an ISV or another vendor you may trigger an error within Dynamics AX.

We recently faced this error in Dynamics AX 2012 when importing modelstore  while working on a client account:

ERROR: Could not load file or assembly ‘C:\TEMP\demo1.axmodel’ or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

This is a common error and the solution can vary depending on your current environment. In this blog, we have compiled links to a variety of sources that we have found helpful to resolve this issue.

Microsoft employee Anup Shah wrote a blog on how to import model files using Export-AXModel. Using Powershell Version 2 as the blog recommends works in some cases, but not all. This is due to newer .Net being used when building the axmodel file instead of .NET 2.0 as explained here.

Here is a possible way of changing the RunTime version of the model file to 2.0, so you can import the model.

If the two above solutions do not work, you can follow the steps below to resolve the issue:

1.Download the iLSpy application.

Use iLSpy to see the .Net version used when the Axmodel file was built. This is optional and only if you are curious! This link will give you the ILSpy executable file.

Once downloaded, unzip it to a folder.  In the folder you extracted the files to, you will them see the ILspy.exe file.  This is the only file you need to launch the ILSpy application. Double click on ilSpy.exe to launch the application. In the ILSpy application, browse to your Axmodel file. You will then see the Runtime version is something other than 2.0 – like shown here – https://daxmusings.codecrib.com/2012...ith-net-4.html

2. Download the ILMerge msi file using this link.

Then follow these steps (per the blog) to fix the issue –

Once downloaded and installed (it installs to C:\Program files (x86)\Microsoft\ILMerge) you can change the target version from the command prompt, like this:

ILMerge mymodel.axmodel /targetplatform:2.0 /out:mynewmodel.axmodel

You should now be able to import the new model into Dynamics AX.

If you need assistance or have any other questions, please reach out to the AX team at Stoneridge Software.



Источник: https://stoneridgesoftware.com/dynam...ng-modelstore/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
stoneridgesoftware: PrecisionForms for Document Management in Dynamics AX Blog bot DAX Blogs 0 14.09.2017 19:11
stoneridgesoftware: Dynamics AX 2012 Scheduling Options & Sorting Orders Blog bot DAX Blogs 0 04.05.2017 21:11
stoneridgesoftware: Part II: Publishing a Dynamics AX 2012 R3 Default Entity Blog bot DAX Blogs 0 27.04.2017 12:11
Sample Design Patterns: Book Give-away: 'Microsoft Dynamics AX 2012 Security How-To' Blog bot DAX Blogs 0 13.12.2012 01:13
rumicrosofterp: Dynamics AX на Convergence 2012 Blog bot Microsoft и системы Microsoft Dynamics 0 13.01.2012 11:11

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 03:38.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.