private void StepEnableCodeAnalysis(Settings settings) { this.UpdateProjectProperty("RunCodeAnalysis","true"); this.UpdateProjectProperty("CodeAnalysisIgnoreGeneratedCode","true"); this.UpdateProjectProperty("CodeAnalysisRuleSet", "MinimumRecommendedRules.ruleset"); this.UpdateProjectProperty("TreatWarningsAsErrors","true"); }
public void ProcessProject(Settings settings) { Console.WriteLine("Project File : {0}", Path.GetFileName(this.projectFilePath )); Console.WriteLine("Path : {0}", Path.GetDirectoryName(this.projectFilePath)); Console.WriteLine("--------------------------------------------------------------"); this.StepSignAssembly(settings); this.StepEnableCodeAnalysis(settings); Console.WriteLine("--------------------------------------------------------------"); }
private static Settings ParseOptions(string[] args) { var settings = new Settings( Path.GetFullPath(args[0]), Path.GetFullPath(args[1])); return settings; }
private static IEnumerable<CsProjectFileProcessor> FindVisualStudioProjects(Settings settings) { var csprojFilePaths = Directory.GetFiles(settings.TargetDirectory , "*.csproj", settings.Recursive ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly); return csprojFilePaths.Select(vsProjFilePath => new CsProjectFileProcessor(vsProjFilePath)); }
private void StepSignAssembly( Settings settings) { string keyPath = PathHelper.GetRelativePath( Path.GetFullPath(projectFilePath), settings.SnkFilePath); this.UpdateProjectProperty("AssemblyOriginatorKeyFile", keyPath); this.UpdateProjectProperty("SignAssembly", "true"); }