0

I have a Dynamics365 DevVM and updated it from 10PU26 to 10PU28 so that i develop on the same platform version as the systems i am developing for. After applying 10pu28 i started my VisualStudio, changed something and tried to save and compile but noticed that BP is broken and so i can't develop further. Visual Studio logs the following but i am not sure what i can do to fix this.

Build started 07/25/2019 06:27.
Build step: Metadata validation started.
  Exception occured while performing operation Validate Metadata. Exception details: Path: []:System.ArgumentNullException: Value cannot be null.
Parameter name: source
   at System.Linq.Enumerable.Contains[TSource](IEnumerable`1 source, TSource value, IEqualityComparer`1 comparer)
   at Microsoft.Dynamics.Framework.Tools.ILGeneratorAgent.CompilationService.ValidateMetadata(String module, String metadataPath, String compilerMetadataPath, IEnumerable`1 referencedAssembliesFolders, IEnumerable`1 elements)
Build step: Metadata validation completed (10 ms).
Build step: X++ compilation, label generation and resource deployment started.
Build step: X++ compilation, label generation and resource deployment completed (670 ms).
Build step: Best practice check started.
  Exception occured while performing operation Best practice checks. Exception details: BP Rule: [Exception occured while performing operation Best practice checks. Exception details]:System.ArgumentNullException: Value cannot be null.
Parameter name: referencedAssembliesFolders
   at Microsoft.Dynamics.Framework.Tools.ILGeneratorAgent.MetadataProviderExtensions.AddReferenceProvider(IMetadataProvider provider, IEnumerable`1 referencedAssembliesFolders, IDiagnosticSink diagnostics, String modelModule, MetadataProviderFactory factory)
   at Microsoft.Dynamics.Framework.Tools.ILGeneratorAgent.CompilationService.RunBestPracticeChecks(String module, String metadataPath, String compilerMetadataPath, IEnumerable`1 referencedAssembliesFolders, IEnumerable`1 elements, String modelName, Boolean isNormalizedCollectionNeeded)
Build step: Best practice check completed (9 ms).
Build completed (716 ms).

I attempted to disable running BP when building as a temporary workaround but that didn't work either. When BP is disabled i still can't compile. Here are the logs:

Build started 07/25/2019 06:40.
Build step: Metadata validation started.
  Exception occured while performing operation Validate Metadata. Exception details: Path: []:System.ArgumentNullException: Value cannot be null.
Parameter name: source
   at System.Linq.Enumerable.Contains[TSource](IEnumerable`1 source, TSource value, IEqualityComparer`1 comparer)
   at Microsoft.Dynamics.Framework.Tools.ILGeneratorAgent.CompilationService.ValidateMetadata(String module, String metadataPath, String compilerMetadataPath, IEnumerable`1 referencedAssembliesFolders, IEnumerable`1 elements)
Build step: Metadata validation completed (8 ms).
Build step: X++ compilation, label generation and resource deployment started.
Build step: X++ compilation, label generation and resource deployment completed (381 ms).
Build completed (409 ms).
D.J.
  • 3,644
  • 2
  • 15
  • 22
  • @FH-Inway i did not modify the topolgy file. i tried compiling my model (with references) via 'Dynamics365 > Build Models' and this works so far with and without BestPractiseChecks. It seems i can't build a project from a solution but only model-based – D.J. Jul 25 '19 at 14:41
  • oof... thanks for opening an issue on that documentation. i'll rollback my vm and try again tomorow with modifying the topology file this time. thanks – D.J. Jul 25 '19 at 16:07
  • @FH-Inway that looks usefull, i gotta check this out and report back if this helps. i am not really happy with the current update experience... – D.J. Jul 26 '19 at 07:37
  • @FH-Inway updating with the ps-module is very convenient :) unfurtonately pu28 failed this time because "An exception of type System.Net.WebException occurredn when making an http-request to http://127.0.01/ReportServer" but thats propably an issue of its own... – D.J. Jul 26 '19 at 11:04
  • 1
    Indeed it is. We encountered this issue, too. Starting the windows service "SQL Server Reporting Services (MSSQLSERVER)" resolves it. – FH-Inway Jul 26 '19 at 17:52
  • @FH-Inway can you pls post your advice to checkout d365fo.tools as answer so that i can mark it as "accepted answer" ? using this module solved my issues with updating the VM – D.J. Jul 26 '19 at 20:20

1 Answers1

1

This issue can be caused if the update did not successfully update all components. This in turn can be caused if the default topology file is used for the update. The documentation by Microsoft is a bit confusing on this part of the update process (see issue 1137). Make sure to change the topology file according to section Collect topology configuration data in the documentation.

I also recommend to take a look at the d365fo.tools, which include the function Invoke-D365SDPInstall that does a lot of the work in the updgrade process for you (including the update of the topology file).

FH-Inway
  • 4,432
  • 1
  • 20
  • 37