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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 20.06.2012, 15:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,626 / 848 (80) +++++++
Регистрация: 28.10.2006
emeadaxsupport: AX 2012 Compile error in Web Control after you updated the proxies in Visual Studio
Источник: http://blogs.msdn.com/b/axsupport/ar...al-studio.aspx
==============

You can run into issue when you have the object method (from class, table) which is already used by proxy. During development you decide to add a new method or change the parameters of the existing method.

After you move to Visual Studio, the proxy will be regenerated and new method/ new parameter will be available, so you can use it without any problem when developing your Web Control. Such a Web Control you will be able to compile without any issue in Visual Studio.

The problem happens when you decide to compile it in Dynamics AX Development environment. Usually when you use one of the Source Control method in Version Control > System settings usually you have setup to Reject Compile errors to be sure of integrity of checked in code.

The problem happens when you try to check in Web Control which is using freshly added method (parameter) then you get compilation error like:

Compile error:\CatDisplayProductDetail.ascx.cs(251): error CS0117: 'Microsoft.Dynamics.Portal.Application.Proxy.CatCartLine' does not contain a definition for 'method1'


The issue happens because the proxies which are used to compiled in Dynamics AX are not regenerated to fix the problem you can:
  1. Before compile you need to right click on AOT \ Web \Web Files \ Web controls and select “Generate Proxies for Compilation”


2. What we can also go is in \Classes\SysEPWebControlCompiler\ensureDependencies:



//generate dependencies if the existing version of dependencies is not same as current version

if(System.IO.File::Exists(versionFilePath))

{

dependencyVersion = System.IO.File::ReadAllText(versionFilePath);

}

if(dependencyVersion != currentVersion)

{

this.generateDependencies();

System.IO.File::WriteAllText(versionFilePath, currentVersion);

}

canCompile = true;


we can comment the line if (dependencyVersion != currentVersion) then every time when you compile web control he will update dependencies. The problem here is that it takes some time even those you did not change any proxies, so we can have some performance degradation.










Источник: http://blogs.msdn.com/b/axsupport/ar...al-studio.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
emeadaxsupport: New Content for Microsoft Dynamics AX 2012 : October 2011 Blog bot DAX Blogs 0 27.10.2011 17:11
Dave Froslie: Visual Studio 10 Coded UI / Action Recordings support for Microsoft Dynamics AX 2012 Blog bot DAX Blogs 0 07.10.2011 21:11
mbsturk: Missing AX EP web project in Visual Studio 2008 Blog bot DAX Blogs 0 24.02.2011 15:11
daxdilip: Whats New in Dynamics AX 2012 (A brief extract from the recently held Tech Conf.) Blog bot DAX Blogs 7 31.01.2011 12:35
axStart: Visual studio web development for Dynamics AX 2009 training Blog bot DAX Blogs 0 14.04.2009 21:05

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

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

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 18:31.