Categories: FetchXML

For various reasons, I’ve had to install Visual Studio on a laptop several times over the past year or so. Maybe it’s just bad luck, but I have had issues each time, and each time I’ve been my only line of support to figure out how to resolve those issues. I thought it might be helpful (even if it’s just to myself in the future if I have issues again!) to document in case it helps someone else. This is with Visual Studio 2015, and needing to use it to write FetchXML reports for Dynamics 365 (CRM).

So the first issue was when opening Visual Studio itself. The Start Page would load, but NOTHING could be clicked on. It would freeze, and the only way to close the program was by opening up the task manager. I tried it several times, rebooted the machine… nothing got it to work.

I found a lot of articles that suggested turning off WiFi (or disconnecting to the internet) and opening it again. That didn’t work. Then I tried running as an administrator. Still nothing. I then found articles that suggested using the Developer Command Prompt for VS2015 (found by searching from the start menu). I found suggestions that worked for some, by running devenv.exe /SafeMode in the command prompt. I also found many things suggesting deleting settings/files etc. Nothing worked.

So, next thing, and it seems quite simple now, I went to Add/Remove programs from the Control Panel, and did a search for 2015, bringing up anything related to Visual Studio 2015. From there, select the program and click Modify. I then selected the Repair option. It took a long time to run through, so there were obviously a lot of missing elements, but once it was finished, I was able to open Visual Studio and click on menu items etc. Hooray! πŸ™‚ But that’s not the end of it πŸ™

If you are writing reports, you need to start by creating a Report Server Project. This was missing, so that needed to be sorted next. In order to do this, you need to download and install the SQL Server Data Tools which can be found here. This ran without any issues. Then the next time I opened Visual Studio and created a Project, the Business Intelligence templates were available, and I could create a Report Server Project.

That’s still not it though πŸ™ No sir! In order to then create FetchXML reports (for Dynamics 365), you need to use the embedded connection type of Microsoft Dynamics 365 Fetch.

And of course, this isn’t something that is installed with Visual Studio either! So, now you need to install the Microsoft Dynamics 365 Report Authoring Extension, which can be found here. Quickly run and I am done? Nope, more errors! I get the following:

Microsoft Dynamics CRM Report Authoring Extension Setup
Action Microsoft.Crm.Setup.Common.Analyzer+CollectAction failed.
Fatal error during installation

Luckily (?) I had seen this before, but hadn’t ever documented how I fixed it, so back to Google. I knew it was related to something to do with the registry, and I needed to delete some duplicate registry keys. Thankfully I found an article which explains why it happens and how to fix it, with details on the exact registry key to look for and delete! Click here for the resolution.

I ran through the installation for the authoring extension again, and it ran smoothly. I was able to open Visual Studio, create a Report Server Project, then create a new report with the Microsoft Dynamics 365 Fetch connection type.

Hopefully I won’t ever have to setup Visual Studio again, at least not for a VERY LONG TIME! But if I do, I will probably be glad of this article. It might just help someone else in the same boat, or series of boats πŸ™‚

** UPDATE – 28/02/2018 **

I’ve been reminded by a couple of people about another little quirk to be aware of. Once you have created your report, when you try and upload it to D365, you get this:

I remember the first time I got this, took me a while to figure it out, but this article explains why it happens, and how to fix it. Read it for more detail, but simple steps, go to the Report Server Project, then to the Project properties.

Scroll to the bottom of the list of items, and click on the option for the TargetServerVersion. By default it will be ‘SQL Server 2016 or later’. Make sure this is set to ‘SQL Server 2008 R2, 2012 or 2014’.

Also, when adding your report, you might be tempted to grab the report file from the main project folder:

Instead, drill down further and go to the bin folder, then the Debug folder. This is where you will need to get the rdl file from.

** UPDATE – 27/07/2018 ** 

One more, if you upgrade your D365 instance and are on Version 9, you might find you get stuck in a joyless loop of being prompted to log in OVER and OVER again! Here is how to fix that.

  • On the machine where VS is installed go to the start menu, then type run and then enter. Type in regedit and then OK.
  • Once the Registry Editor is open, go to: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319
  • Right click on the name of the folder (the v4.0.30319 folder) and select New, then DWORD.
  • Give it the name of SchUseStrongCrypto and the Value of 1.
  • Exit the Registry Editor, then restart your machine.

** UPDATE – 06/04/2020 **

Yet another fun issue found, this time when getting to the step where the SQL Server Data Tools Installation needed to run. I kept running in to issues with the installer where it would fail pretty much immediately, and give me a link to a log file on my machine. On inspection of the log file, I found several lines similar to this:

Error 0x80072f08: Failed to get size and time for URL:

After searching for a while, I saw several suggestions to try installing the SSDT preview as an ISO image and running the installer that way. Back at this link you can download the file from the bottom of the page in step 4. Once you have the download, right click on it, and select Mount.

The file is then mounted as a drive and opened on your machine. Try running the SSDTSETUP.exe file from here, and hopefully that should resolve it for you!

Any other gotchas?

Check out the latest post:
Wave 2 2024 Customer Insights Journey Chat With Amey Holden

This is just 1 of 462 articles. You can browse through all of them by going to the main blog page, or navigate through different categories to find more content you are interested in. You can also subscribe and get new blog posts emailed to you directly.

18 thoughts on “Too Many Issues To Count – Creating Reports In Visual Studio

  1. Good one! Let us know when you hit the first snags with deploying reports, there are some nice gotchas, especially if you’re usign CRM On Premises. For example, making sure the TargetServerVersion matches the SQL Server version your CRM is using.

    1. Yes, I should probably update the blog. Also, the fact that you need to get the rdl file from the bin>Debug folder rather than the top level folder for the project!

  2. Many thanks! great article (and nicely kept up to date too!!) One thing i’d put in bold would be the comment ‘This is with Visual Studio 2015’ as i was banging away at VS 2017 for a least half an hour before realising my mistake

    1. Oh no! πŸ™ I just made it bold, hopefully others will see it and there is be no more head banging or pulling out of hair. Thanks for reading and for the comment Phil!

  3. Hi, This is great! really helpful. Thank you. Do you know if Microsoft Dynamics 365 Fetch is supported by Visual Studio 2017 yet?

  4. Greetings,

    I am a new to the SSRS world, my initial report upload based on your Creating Dynamics 365 video (March 18), worked like it should. Since then I have crafted my own reports, and I get this message from D365, “Invalid Data Source…This report type is not supported. MS 365 Onlin supports only reports that use Fetch XML data sources….yada yada….” I can send the error code, but I don’t want to kill this comment section.

    1. Hi Frank, at what point to you get the error? Is it when you are importing the report in to D365?

    2. Exactly, D365 is rejecting the file, as not being created by FetchXML.


    3. For your data source, are you using a shared data source or embedded?

  5. Excellent and generous.

    Thank you it assisted me.

    W.r.t the report Authoring Extensions, when i try to install them, I receive an error:

    The computer is running an operating system that Dynamics 365 does not support. To install this product, you must upgrade your computer to a supported operating system. For a complete list of supported operating systems, see the Dynamics 365 documentation (, Error, OK

    However, my machine is Windows 7 workstation with Vis. Studio 2015, SSDT installed.

    I am having the exact same problem as reported in this forum BIDS installation for VS 2015 / Dynamics 365 fails (, to which no solution is advised.

    If you know the reason for this then I’d sure like to hear from you – or any of your readers.

    Thanks for the very instructive YouTube videos too, Megan.

    1. Hi Shane. That’s strange! That first link is about OnPremise, which typically most times someone is writing a report using FetchXML it’s for D365 online (not always of course). I would suggest opening a support ticket with Microsoft if you have a paying subscription for D365 and see if they can help. Not seen that one before, sorry!

  6. I went through the steps but could never see the Fetch XML type when creating a data source. It’s probably because I use VS 2019 and the report authoring tool won’t work with it?
    At times I get the feeling that Microsoft wants to test us…

    I wish Microsoft would make reporting a bit easier. You can’t use the Dynamics report wizard for anything remotely complicated and it’s an absolute pain to try to get the SSRS report option working.

    1. Hi Anders. Yes, the D365 report authoring tool is currently still only available for 2015. So you wouldn’t be able to get it to work with 2019. Once you’ve got it all set up, I find writing the reports to be relatively easy, and dare I say it, fun! πŸ˜‰

  7. Hi Megan,

    Thanks, I will try to install VS 2015 and see if I can have me some fun πŸ™‚

Comments are closed for this post.