Monthly Archives: February 2016

AX 2012 R3: The “GenerateRdlTask” task failed unexpectedly

Error 1: Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401) C:\Program Files (x86)\MSBuild\Microsoft\DynamicsTools\Microsoft.Dynamics.Framework.Design.Reporting.Modeling.targets 103

Error 2 The “GenerateRdlTask” task failed unexpectedly.
System.IO.FileLoadException: Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401)
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(String assemblyString, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(String assemblyName, String typeName)
at System.AppDomain.CreateInstance(String assemblyName, String typeName)
at System.AppDomain.CreateInstanceAndUnwrap(String assemblyName, String typeName)
at System.AppDomain.CreateInstanceAndUnwrap(String assemblyName, String typeName)
at Microsoft.Dynamics.Framework.Deployment.Reports.DomainBound.PrepareTask(AppDomain tempAppDomain)
at Microsoft.Dynamics.Framework.Deployment.Reports.GenerateRdlTask.GetBusinessLogicAssemblyReferences(String assemblyPath)
at Microsoft.Dynamics.Framework.Deployment.Reports.GenerateRdlTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext() C:\Program Files (x86)\MSBuild\Microsoft\DynamicsTools\Microsoft.Dynamics.Framework.Design.Reporting.Modeling.targets 103 6 PurchRFQSend

 

Solution:

This issue is related to Dynamics AX 2012 R3 CU8 and Visual Studio 2013.

This has been addressed and solved by applying the below settings.
Set COMPLUS_LoaderOptimization Environment Variable to 1 in O/S
1. Open the Start Menu and right click on Computer. Select Properties.

2. Select Advanced system settings.

3. In the Advanced tab, select Environment Variables.

4. Select New.

5. Set Variable Name: COMPLUS_LoaderOptimization

6. Set Variable Value: 1

For more information visit the link below:

https://fix.lcs.dynamics.com/Issue/Solution/1103883?bugId=3383717&qc=0da3617dd976ac65f16064d0450e7a6d203fa0bd82a8ffafb97711d7cb479ac9

 

 

Advertisements