Personalized Community is here!
Quickly customize your community to find the content you seek.
Latest TechTalk Videos
Have questions on moving to the cloud? Visit the Dynamics 365 Migration Community today! Microsoft’s extensive network of Dynamics AX and Dynamics CRM experts can help.
2021 Release Wave 2Discover the latest updates and new features releasing from October 2021 through March 2022.
2021 release wave 2 plan
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
I get an error and hard VS crash when I type in a specific class of mine: "The supplied SnapshotPoint is on an incorrect snapshot". It does not happen sometimes - it happens always.
Here is the VS community post on it: https://developercommunity.visualstudio.com/content/problem/311087/hard-crash-with-the-supplied-snapshotpoint-is-on-a.html The problem is that the solution includes installing VS 2019.
Has anyone else experienced this cataclysmic crisis?
My interim solution is to edit the class in notepad. If the problem persists I will be pursuing a career in SAP.
Thanks for your attention
Is this related to Dynamics 365? If so, how? Note that VS 2019 is not supported (yet) with Microsoft Dynamics 365 F&O development. It would be possible to install VS 2017 side by side next to VS 2015.
You can try installing VS2019 Professional if you want to check if that solves it, you just need to install the devtools extension after installing VS and it should be fine. You'll get some warnings but they can be ignored, I've been working with VS2019 for some months already.
1) Yes it is a VS error, not a D365 error. But then, as I mentioned, I cannot use the VS solution, because the VS solution is to install VS2019 and the D365 add-in is only for VS2015. Which makes it a D365 problem.
2) And then it is related to D365 because I am coding an extension of an F&O class.
Is there a planned D365 add-in release for VS2019? I'd be very excited if that is the case.
That is the best news I've heard in quite a while - I'd love to work on the new VS. I was not aware that there is a workaround to use it. I have already started following this how-to guide: crmfortress.com/.../
If you do not mind me asking some questions:
1) I am currently downloading VS2019 Enterprise. Will it work the same? I just selected the one that looks like top tier. Should I rather download Professional? And I'm not quite sure what the difference is in terms of D365 development. I looked at this comparison visualstudio.microsoft.com/.../ but I am not much wiser.
2) Any specific things I should do while installing VS2019? I've never installed VS (believe it). I've always just opened it on some D365 VM. The tutorials for the D365 add-in do not specify any VS2019 configuration - they assume you have VS2019 in the correct state / configuration.
3) Exactly how stable is it? You mentioned some warnings - I assume that is only during installation?
And then I am unsure which extension to download. Could you maybe provide a link? Also, I am not sure whether the how-to link I provided is applicable for D365 F&O - there is a lot of stuff about CRM.
1) I've only tried with Professional, I know some users had issues with the Community version but probably Enterprise should be OK. I wrote a step-by-step blog post.
2) You need to select ".NET Desktop Development tools" when installing VS. Then just go and install the devtools and VS2019 will appear on the list selector.
3) Some error when starting VS, and some warnings which you can stop from being displayed. There's also performance warning related to the devtools Extension. But as I said, I've been working for several months with it and it's 100% usable.
One question regarding the error: is it happening only with one solution or with all? If it's only happening with one solution, have you tried creating a new solution and adding the objects to the new one? If the error still persists after installing VS2019... I'd just deploy a new VM, it's not worth wasting your time when you can have a shiny new VM ready for the next day. If your VM is on Azure of course, but I guess you could also create a new local VM right?
Adrià Ariste - Senior technical consultant @ Axazure - Read my blog!
The devtools VSIX installer is in your service drive under the DevToolsService/Scripts folder. The VSIX is called Microsoft.Dynamics.Framework.Tools.Installer.vsix.
Thank you very much - I am currently follow your step-by-step guide. Much appreciated.
About the error. I actually fixed the error a while ago - I was kept busy with the VS2019 story. The error is not method, class, extension class, project, solution, model, package, VS usage data or VM specific (I tried editing without an open solution as well as a new class in a different model, cleared usage data and also tried on another VM). It is flat out caused by code/text arrangement (the only thing I did not check is the element's model's package references). But then I am assured by my hypothesis by the comments in the link I supplied in the OP. So the solution was to re-arrange the code.
I think I can actually guarantee that it will happen on any VM (in VS2015 of course). Create a class. The name does not matter - for the example I created XYZClass. Then paste this code:
void updateSum(TransDate _transDate, LedgerPostingType _postingType, RefRecId _mainAccount, DimensionDefault _dimensionDefault, CurrencyCode _currencyCode, AmountCur _amountCur, NoYes _isFactorOk, RefRecId _clearingAccount, PaymTermId _paymentTermId, PaymTermId _clearingPeriod, PaymDayId _paymentDay, TransDate _fixedDueDate, ExchangeRateTypeRecId _exchangeRateTypeRecId)
The code arrangement is not BP - leave it like that. Save the file, close it, re-open it and then start typing in the method. VS2015 will crash:
It can be fixed by splitting the parameters in the method header (as prescribed by BP).
And then the reason for the single, very long line for the method header (which seems to be the culprit).
I don't like splitting parameters because the line will be split in any case by the VS code editor if it does not fit in the screen. Like such:
And then I think the BP rule / convention was created for AX2012 where the editor did not have the same functionality as VS.
Lastly the reason for the thousands of parameters: Not my method. I was busy creating a CoC method for LedgerCoverage.updateSum(). Which was about 4 hours ago... lol
I tried my own tutorial to reproduce the error and then VS didn't throw an error. However, if you rearrange the code so that it looks like the screenshot I provided, then it will throw an error (method header must be one line). Which confirms my suspicion that the problem is purely code arrangement.
Pete, I think there's definitely something wrong with your environment. If you have everything under source control try closing VS, stopping IIS, the Batch service and the MR service, deleting the model that contains that class from the PackagesLocalDirectory folder, restarting the services and do a get latest for that model.
I don't know if there's something cached, or a problem with the PCB files or what could possibly be, but FnO is full of long method declarations with endless parameters and I've never had that issue and I can't reproduce it on a VM with 10.0.6/PU30.
I would even consider deploying a new VM if you can.
What I understood until now, it that there are a few things not working correctly when using VS2019 with Dynamics 365 F&O development in this way. But if you can do the things you need to do... it would make sense to use it in the way as described by Adria.
There will be a new story to have the option for local development: docs.microsoft.com/.../developer-tools-as-installable-components
Hi Pete, I also get this error. After upgrading to V10 PU28 VS would sometimes just hung but not that bad. It was just odd. Then I had to have my cloud-hosted development environment redeployed. I chose to have V10.0.5 PU 29 installed with VS 2015 professional. This was done last week. Since having my dev box on V10.0.5 PU29 I have this snapshot issue.
So yes you are correct, getting a new Dev environment redeployed is not going to fix it.
What I have noticed is that my X++ code suddenly will now also show the reference count for a method like one will see on a C# method. I never had that in previous versions. The only times I saw it was when I created custom rate engines which one writes in C#, but never in my X++ code.
I have to work in notepad as well. One has only 1 shot to get the code in and saved. The moment it is saved, one cannot press spacebar or enter to get a new line. It happens when I create a new class and added methods. It happens when I create a new data entity and right-click and choose to override a method and after the method shows in the "view code" editor and it is saved, then one cannot press enter to get a new line to start coding.
It also happens for me on an existing class . as long as I do changes in an existing method, all is good but the moment I add a new method to that class I have the same issue.
I have D365 set up to synchronize to the DB on build of the project. I have noticed that with my new environment the green run-arrow is usually greyed-out while it is building and synchronizing, but lately it will complete the build and then it looks like it has not synchronized. Then I have to manually choose to synchronize to the DB. However the green arrow will be green , it doesn't grey out anymore.
I think something in v10.0.5 PU29 isn't compatible with VS 2015 professional.
I've been going through this thread and trying to reproduce the issue but no luck so far. We're hearing quite a few reports of this snapshot problem so we're eager to reproduce this in-house so we can fix it.
We're working on 2017 and 2019 support, but have no date to share yet. There will likely be more info on this soon enough. But for now, 2015 is out main version still so this needs to work.
Any other suggestions for reproducing the error welcome. I'll spend more time testing based on the suggestions in this thread.
Thanks for your reply Joris.
So I have created this class and method in quite a few scenarios:
Am I correct in saying that this is related to PU29? I haven't tested with modelX on some other package update.
And then it seems that I was incorrect with my earlier hypothesis that it is not model related. It looks like the fact that modelX exists on a VM has a very big influence.
Here is the Descriptor for ModelX:
<?xml version="1.0" encoding="utf-8"?><AxModelInfo xmlns:i="">www.w3.org/.../XMLSchema-instance"> <AppliedUpdates xmlns:d2p1="">schemas.microsoft.com/.../Arrays" /> <Customization>Allow</Customization> <Description>ModelX/Description> <DisplayName>ModelX</DisplayName> <Id>54011</Id> <InternalsVisibleTo xmlns:d2p1="">schemas.microsoft.com/.../Arrays" /> <Layer>8</Layer> <Locked>false</Locked> <ModelModule>XYZ</ModelModule> <ModelReferences xmlns:d2p1="">schemas.microsoft.com/.../Arrays" i:nil="true" /> <ModuleReferences xmlns:d2p1="">schemas.microsoft.com/.../Arrays"> <d2p1:string>ApplicationCommon</d2p1:string> <d2p1:string>ApplicationFoundation</d2p1:string> <d2p1:string>ApplicationPlatform</d2p1:string> <d2p1:string>ApplicationSuite</d2p1:string> <d2p1:string>BankTypes</d2p1:string> <d2p1:string>BusinessProcess</d2p1:string> <d2p1:string>Calendar</d2p1:string> <d2p1:string>CaseManagement</d2p1:string> <d2p1:string>ContactPerson</d2p1:string> <d2p1:string>Currency</d2p1:string> <d2p1:string>DataSharing</d2p1:string> <d2p1:string>Dimensions</d2p1:string> <d2p1:string>Directory</d2p1:string> <d2p1:string>ElectronicReporting</d2p1:string> <d2p1:string>ElectronicReportingCore</d2p1:string> <d2p1:string>ElectronicReportingDotNetUtils</d2p1:string> <d2p1:string>ElectronicReportingForAx</d2p1:string> <d2p1:string>ElectronicReportingMapping</d2p1:string> <d2p1:string>FinancialReporting</d2p1:string> <d2p1:string>FiscalBooks</d2p1:string> <d2p1:string>GeneralLedger</d2p1:string> <d2p1:string>Ledger</d2p1:string> <d2p1:string>Measurement</d2p1:string> <d2p1:string>Personnel</d2p1:string> <d2p1:string>PersonnelCore</d2p1:string> <d2p1:string>PersonnelManagement</d2p1:string> <d2p1:string>Policy</d2p1:string> <d2p1:string>Project</d2p1:string> <d2p1:string>Retail</d2p1:string> <d2p1:string>SourceDocumentation</d2p1:string> <d2p1:string>SourceDocumentationTypes</d2p1:string> <d2p1:string>Subledger</d2p1:string> <d2p1:string>Tax</d2p1:string> <d2p1:string>TaxEngine</d2p1:string> <d2p1:string>UnitOfMeasure</d2p1:string> </ModuleReferences> <Name>ModelX</Name> <Publisher>MyOrganization</Publisher> <VersionBuild>80</VersionBuild> <VersionMajor>10</VersionMajor> <VersionMinor>0</VersionMinor> <VersionRevision>2</VersionRevision></AxModelInfo>
And then I was wondering whether this is related: https://community.dynamics.com/365/financeandoperations/f/dynamics-365-for-finance-and-operations-forum/365449/vs-find-references---object-reference-not-set
We found the issue. If you go to the Visual Studio options, under "Text Editor", "X++"... if "word wrap" and "show visual glyphs for word wrap" are both enabled, this issue happens. Turning those options off seem to fix the issue.
Would be great if you all can confirm that turning these options off solves the issue for you as well, that means we found the root cause.
As I understand it, we can't fix it until we deprecate VS2015 and can move on to a newer API available in VS2017 and above. We announced deprecation of VS2015 support for April 2021.
No, we suggested to turn word wrap OFF. :-)
I think I got the issue and posted a quick blog post here. The solution was actually to disable Word wrap option in VS.
Hope this helps late comers.
Business Applications communities