*** NOTE: ALL INFORMATION IS ACCURATE AT DATE OF PUBLISHING ***
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:
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: https://go.microsoft.com/fwlink/?LinkId=715685&clcid=0x409
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:
D365 Account & Contact Management Using Power Automate
This is just 1 of 357 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.