web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

"The supplied SnapshotPoint is on an incorrect snapshot" VS code editor error

(1) ShareShare
ReportReport
Posted on by 3,542

Hi

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

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,075 Super User 2025 Season 2 on at

    Hi Pete,

    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.

  • Adria Ariste Profile Picture
    User Group Leader on at

    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.

  • Pete Alberts Profile Picture
    3,542 on at

    Thanks André

    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.

  • Pete Alberts Profile Picture
    3,542 on at

    Thanks Adriá

    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?

  • Pete Alberts Profile Picture
    3,542 on at

    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.

  • Adria Ariste Profile Picture
    User Group Leader on at

    Hi Pete,

    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?

    Regards,

    Adrià Ariste - Senior technical consultant @ Axazure - Read my blog!

  • Adria Ariste Profile Picture
    User Group Leader on at

    The devtools VSIX installer is in your service drive under the DevToolsService/Scripts folder. The VSIX is called Microsoft.Dynamics.Framework.Tools.Installer.vsix.

    Adrià Ariste - Senior technical consultant @ Axazure - Read my blog!

  • Pete Alberts Profile Picture
    3,542 on at

    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:

    class XYZClass

    {

        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:

    Screenshot-2019_2D00_10_2D00_01-at-15.42.14.png

    It can be fixed by splitting the parameters in the method header (as prescribed by BP).

  • Pete Alberts Profile Picture
    3,542 on at

    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:

    pastedimage1569937405938v1.png

    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

  • Pete Alberts Profile Picture
    3,542 on at

    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.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 551 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 278 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans