Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Forums / Finance forum / Can not build models
Finance forum

Can not build models

(1) ShareShare
ReportReport
Posted on by

Hi everyone,

When I do a build or a full build I get a lot of errors. I think I know what's the problem but I don't know how to solve it.

At the beginnign (when all works) I had a project in FleetManager model. I made a table (VSSAutomataDocuments) and a dataEntity. Every thing was OK.

Then I realized the model wasn't the correct so I deleted de project and made another with mi correct model (CONModel). Now it's when the problems started.

I made a full build but i got errors. On event viewer i saw the next error:

  • Duplicate metadata element has been detected in multiple modules. Please verify that application is deployed correctly and installed modules are compatible. Following elements are defined in more than one module: Element AxDataEntityView/VSSAutomataDataEntity is defined in the following modules: CONModel, FleetManagement

I went to PackagesLocalDirectory folder, searched FleetManagement model and deleted the element (VSSAutomataDataEntity).

FULL BUILD--> ERRORS

The same, "elements are defined in more than one module"

I deleted on Visual Studio all the objects (tables, dataEntites... about VSSAutomataDocuments), including the project. I went to models folders, searched the elements and deleted it.

FULL BUILD--> ERRORS

I searched on web and I found a community.dynamics question similar to my problem:

https://community.dynamics.com/365/financeandoperations/f/dynamics-365-for-finance-and-operations-forum/276567/duplicate-metadata-elements/788858

I did the build of FeetManagement model only --> Error

I did the build of CONModel model only --> Error

I don't know what more can I do. It seems like something isn't updating. Since I delete the first project I couldn't do a full build so -if I'm correct- for the system the element still existing. 

Of course, because of this the client doesn't work.

In event viewer i have the next errors-->

  • Metadata service communication retry attempts failed to resolve issues with the following settings AX7CertificateUserName: FRServiceUser@dynamics.com; AX7CertificateThumbprint: 1E3C9A2051440DAF5CBA11807B8D71E20705C876; AX7FederationRealm: spn:00000015-0000-0000-c000-000000000000; AX7ProviderName: mintedtoken.dynamics.com; AX7TokenIssuer: fakeacs.accesscontrol.windows.net/
    Component: Microsoft.Dynamics.Integration.Common.TraceLog
    User: NT AUTHORITY\NETWORK SERVICE
    Machine: conDev2-1
  • Failed to create a metadata service client in 5 attempts.
    Machine: conDev2-1
  • {"Class":14,"Number":2601,"State":1,"Message":"Cannot insert duplicate key row in object 'dbo.FINANCIALREPORTS' with unique index 'I_11477FOLDERREPORTNAME'. The duplicate key value is (5637144576, CON, Default Report Definitions, 12 Month Rolling Single Column Income Statement - Default).\u000d\u000aThe statement has been terminated.","ErrorCode":-2146232060,"Procedure":"","LineNumber":1,"Errors":[{"Class":14,"Number":2601,"State":1,"Message":"Cannot insert duplicate key row in object 'dbo.FINANCIALREPORTS' with unique index 'I_11477FOLDERREPORTNAME'. The duplicate key value is (5637144576, CON, Default Report Definitions, 12 Month Rolling Single Column Income Statement - Default).","Procedure":"","LineNumber":1,"Source":".Net SqlClient Data Provider"},{"Class":0,"Number":3621,"State":0,"Message":"The statement has been terminated.","Procedure":"","LineNumber":1,"Source":".Net SqlClient Data Provider"}],"ConnectionId":"2fa6c68a-68d7-42fd-a2e0-6d625b1249d8","Source":".Net SqlClient Data Provider"}
    Machine: conDev2-1

  • AX is shutting down due to an error.
    Duplicate metadata element has been detected in multiple modules. Please verify that application is deployed correctly and installed modules are compatible. Following elements are defined in more than one module:
    Element AxTable/VSSAutomataDocuments is defined in the following modules: CONModel, FleetManagement

    Exception details:
    Microsoft.Dynamics.AX.Metadata.Storage.MetadataReadCrossAssemblyDuplicateException: Runtime metadata is invalid because the same metadata artifact has been defined in multiple assemblies. \nFirst 10 conflicting names: VSSAutomataDocuments. \nSee metadata events for complete list.
    at Microsoft.Dynamics.AX.Metadata.Storage.ErrorReportingHelper.ThrowMetadataReadCrossAssemblyDuplicateException[T](IList`1 artifactNames, IDictionary`2 modulesToArchives)
    at Microsoft.Dynamics.AX.Metadata.Storage.Runtime.SingleKeyedRuntimeProvider`1.GetPrimaryKeysNoCache()
    at Microsoft.Dynamics.AX.Metadata.Storage.Runtime.SingleKeyedRuntimeProvider`1..ctor(RuntimeProviderConfiguration configuration, RuntimeModelManifestProvider modelManifestProvider, IDictionary`2 archives)
    at Microsoft.Dynamics.AX.Metadata.Storage.Runtime.SingleKeyedRuntimeExtensionProvider`2..ctor(RuntimeProviderConfiguration config, RuntimeModelManifestProvider modelManifestProvider, ExtensionLoader`1 loader, IDictionary`2 archives)
    at Microsoft.Dynamics.AX.Metadata.Storage.Runtime.RuntimeMetadataProvider..ctor(RuntimeProviderConfiguration configuration, Boolean extensions, ExtensionLoader`1 formExtensionLoader, ExtensionLoader`1 tableExtensionLoader, ExtensionLoader`1 enumExtensionLoader, ExtensionLoader`1 menuExtensionLoader, ExtensionLoader`1 securityRoleExtensionLoader, ExtensionLoader`1 securityDutyExtensionLoader, ExtensionLoader`1 dataEntityViewExtensionLoader, ExtensionLoader`1 edtExtensionLoader, ExtensionLoader`1 viewExtensionLoader, ExtensionLoader`1 querySimpleExtensionLoader, ExtensionLoader`1 menuItemDisplayExtensionLoader, ExtensionLoader`1 menuItemActionExtensionLoader, ExtensionLoader`1 menuItemOutputExtensionLoader)
    at Microsoft.Dynamics.AX.Metadata.Storage.MetadataProviderFactory.CreateRuntimeProviderWithExtensions(RuntimeProviderConfiguration configuration, TableExtensionLoader tableExtensionLoader, MenuExtensionLoader menuExtensionLoader, FormExtensionLoader formExtensionLoader, EnumExtensionLoader enumExtensionLoader, SecurityRoleExtensionLoader securityRoleExtensionLoader, SecurityDutyExtensionLoader securityDutyExtensionLoader, DataEntityViewExtensionLoader dataEntityViewExtensionLoader, EdtExtensionLoader edtExtensionLoader, ViewExtensionLoader viewExtensionLoader, QuerySimpleExtensionLoader querySimpleExtensionLoader, MenuItemDisplayExtensionLoader menuItemDisplayExtensionLoader, MenuItemActionExtensionLoader menuItemActionExtensionLoader, MenuItemOutputExtensionLoader menuItemOutputExtensionLoader)
    at Microsoft.Dynamics.AX.Metadata.Kernel.Accessor.Initialize(String binPath, String businessSqlConnectionString, IMetadataFlushContext flushContext)
    at MetadataBridge.CMetadataProviderFactory.Initialize(Char* metadataPath, Char* binDirectory, Char* businessSqlConnectionString)
    at InitializeMetadata(SqlLogin* )
    at Microsoft.Dynamics.AX.AOS.StartupInternal(String[] Arguments)

As extra information:

  1. I can't start Microsoft Dynamics 365 Unified Operations: Batch Management Service (but I think it is due to the errors of the build)
  2. Before I delete the firs project the build worked fine.
  3. In IIS manager I realized the application pool "AOSService" is stopping continuously (I don't know if this is important)

If anyone know what to do now I will be very gratefull.

Thanks.

  • Community Member Profile Picture
    on at
    RE: Can not build models

    Finally, the build throw no errors.

    There were a menu item action and a class still existing in FleetManager model.

    I deleted it and now the build works.

    Thanks Nikolaos.

  • Suggested answer
    nmaenpaa Profile Picture
    101,158 Moderator on at
    RE: Can not build models

    Just build the model itself. No need to build referenced packages.

  • Community Member Profile Picture
    on at
    RE: Can not build models

    Hi Nikolaos, thanks for you answer.

    I did the build of FleetManager before and errors appears. There is no table to delete but i found a class. I will delete it and rebuild. By the way i have a question, I'm not sure if a have to do the build only of the Model or I should select "Build reference packages" option.

    Thanks

  • Verified answer
    nmaenpaa Profile Picture
    101,158 Moderator on at
    RE: Can not build models

    CONModel doen't see the source code (xml files) of FleetManager model. It sees the compiled DLL. So, you need to compile FleetManager model succesfully without the VSSAutomataDocuments table. After that you will not anymore get the error when compiling CONModel.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,261 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,013 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans