Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The type or namespace name 'BestParcticeAnalyzer' does not exist... #45

Closed
samaguire opened this issue Jun 6, 2021 · 1 comment
Closed
Labels
issue: bug Confirmed as a bug in TE3
Milestone

Comments

@samaguire
Copy link

I get this error as per the title when running the below script - which works in TE2

// https://github.com/microsoft/Analysis-Services/tree/master/BestPracticeRules

using TabularEditor.BestPracticeAnalyzer;

var bpa = new Analyzer();
bpa.SetModel(Model);

var sb = new System.Text.StringBuilder();
string newline = Environment.NewLine;

sb.Append("RuleCategory" + '\t' + "RuleName" + '\t' + "ObjectName" + '\t' + "ObjectType" + '\t' + "RuleSeverity" + '\t' + "HasFixExpression" + newline);

foreach (var a in bpa.AnalyzeAll().ToList())
{
    sb.Append(a.Rule.Category + '\t' + a.RuleName + '\t' + a.ObjectName + '\t' + a.ObjectType + '\t' + a.Rule.Severity + '\t' + a.CanFix + newline);
}

sb.Output();
@otykier otykier added the issue: bug Confirmed as a bug in TE3 label Jun 8, 2021
@otykier otykier added this to the 3.0.6 milestone Jun 16, 2021
@otykier
Copy link
Collaborator

otykier commented Jun 17, 2021

3.0.6 now allows using the Best Practice Analyzer through a script.

However, you have to change the using statement at the top of the script, since it now resides in a different namespace:

using TabularEditor.Shared.BPA;

@otykier otykier closed this as completed Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug Confirmed as a bug in TE3
Development

No branches or pull requests

2 participants