Skip to main content
Dynamics 365 Community / Forums / Finance forum / NullReferenceException...
Answered

NullReferenceException in ILGeneratorAgent

editSubscribe (0) ShareShare
ReportReport
Posted on by 13
Hi to all,
 
In Visual Studio, Every time I save a modification to an AOT object or code I get the following error in the Error List:
 
Error - System.NullReferenceException: Object reference not set to an instance of an object.
- at Microsoft.Dynamics.Framework.Tools.ILGeneratorAgent.CompilationService.ParseTypeResolve(String module, String metadataPath, String compilerMetadataPath, IEnumerable`1 referencedAssembliesFolders, IEnumerable`1 elements)
 
Due to this, any warning or error related to the modified object are not evaluated/shown. It seems that on save VS is unable to evaluate the object or X++ syntax properly.
IntelliSense (or how is it called X++ code-completion aid) does not seem to work either properly.
 
Model build or Solution rebuild temporarily removes the problem and shows correct errors and warning in Error List, but any minor modification and save, will raise this error again. I also tried opening and closing VS.
As if something behind crashes (like a service) which is then not restarted until Dev Box restart.
 
My dev has had this issue since it was created so I doubt is a local configuration I made (which are just default for solution and project properties)
 
I have no Idea where else to look at or what else I could try try.
 
Other things I tried:
- Clean and rebuild
- Shut down IIS express and VS and restarted
- Unloaded and reloaded the project in the solution
- All the above together as /clean, unload, shut down IIS express and VS, restart VS (and IIS express), load and build/