From 2f3f00dd1a83aa617b7570eed363ec130785e4d5 Mon Sep 17 00:00:00 2001 From: m-kovalsky Date: Thu, 17 Jun 2021 10:06:06 +0300 Subject: [PATCH] Update README.md --- BestPracticeRules/README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/BestPracticeRules/README.md b/BestPracticeRules/README.md index 8a492f7..7a81944 100644 --- a/BestPracticeRules/README.md +++ b/BestPracticeRules/README.md @@ -27,12 +27,19 @@ Following these steps will automatically load the Best Practice Rules into your 3. Run the following code in the Advanced Scripting window. ```C# +using System.Windows.Forms; System.Net.WebClient w = new System.Net.WebClient(); string path = System.Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData); string url = "https://raw.githubusercontent.com/microsoft/Analysis-Services/master/BestPracticeRules/BPARules.json"; +string version = Application.ProductVersion.Substring(0,1); string downloadLoc = path+@"\TabularEditor\BPARules.json"; +if (version == "3") +{ + downloadLoc = path+@"\TabularEditor3\BPARules.json"; +} + w.DownloadFile(url, downloadLoc); ```