On new vm, I found following error, when ever, i try to create a new PR or purchase order.
Following script helped me
$AOSDirectory = ‘c:\AOSService\PackagesLocalDirectory’
$AOSBinDirectory = $AOSDirectory + ‘\bin’
[Reflection.Assembly]::LoadFrom(“$AOSBinDirectory\Microsoft.Diagnostics.Tracing.EventSource.dll”)
$sharedDLL = ‘Microsoft.Dynamics.AX.Xpp.AxShared.dll’
$subledgerDLL = ‘Microsoft.Dynamics.Subledger.Instrumentation.dll’
$taxDLL = ‘Microsoft.Dynamics.Tax.Instrumentation.dll’
$prodCfgDLL = ‘Microsoft.Dynamics.ProductConfiguration.Instrumentation.dll’
$sourceDocDLL = ‘Microsoft.Dynamics.SourceDocumentation.Instrumentation.dll’
Copy-Item $(Join-Path $AOSDirectory -ChildPath “Subledger\bin” | Join-Path -ChildPath $subledgerDLL) -Destination $AOSBinDirectory
[Reflection.Assembly]::LoadFrom($(Join-Path $AOSBinDirectory -ChildPath $subledgerDLL))
[Microsoft.Dynamics.Subledger.Instrumentation.PerformanceCounterCatalog]::Setup()
Copy-Item $(Join-Path $AOSDirectory -ChildPath “Tax\bin” | Join-Path -ChildPath $taxDLL) -Destination $AOSBinDirectory
[Reflection.Assembly]::LoadFrom($(Join-Path $AOSBinDirectory -ChildPath $taxDLL))
[Microsoft.Dynamics.Tax.Instrumentation.PerformanceCounterCatalog]::Setup()
Copy-Item $(Join-Path $AOSDirectory -ChildPath “SourceDocumentation\bin” | Join-Path -ChildPath $sourceDocDLL) -Destination $AOSBinDirectory
[Reflection.Assembly]::LoadFrom($(Join-Path $AOSBinDirectory -ChildPath $sourceDocDLL))
[Microsoft.Dynamics.SourceDocumentation.Instrumentation.PerformanceCounterCatalog]::Setup()
Copy-Item $(Join-Path $AOSDirectory -ChildPath “ApplicationSuite\bin” | Join-Path -ChildPath $prodCfgDLL) -Destination $AOSBinDirectory
[Reflection.Assembly]::LoadFrom($(Join-Path $AOSBinDirectory -ChildPath $prodCfgDLL))
[Microsoft.Dynamics.ProductConfiguration.Instrumentation.PerformanceCounterCatalog]::Setup()
[Reflection.Assembly]::LoadFrom($(Join-Path $AOSBinDirectory -ChildPath $sharedDLL))
[Microsoft.Dynamics.Ax.Xpp.AxShared.AxPerformanceCounters]::InitializePerformanceCounterCategories()










