Ejemplo n.º 1
0
 private void StepEnableCodeAnalysis(Settings settings)
 {
     this.UpdateProjectProperty("RunCodeAnalysis","true");
     this.UpdateProjectProperty("CodeAnalysisIgnoreGeneratedCode","true");
     this.UpdateProjectProperty("CodeAnalysisRuleSet", "MinimumRecommendedRules.ruleset");
     this.UpdateProjectProperty("TreatWarningsAsErrors","true");
 }
Ejemplo n.º 2
0
        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("--------------------------------------------------------------");
        }
Ejemplo n.º 3
0
 private static Settings ParseOptions(string[] args)
 {
     var settings =  new Settings( Path.GetFullPath(args[0]), Path.GetFullPath(args[1]));
     return settings;
 }
Ejemplo n.º 4
0
 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));
 }
Ejemplo n.º 5
0
 private void StepSignAssembly( Settings settings)
 {
     string keyPath = PathHelper.GetRelativePath( Path.GetFullPath(projectFilePath), settings.SnkFilePath);
     this.UpdateProjectProperty("AssemblyOriginatorKeyFile", keyPath);
     this.UpdateProjectProperty("SignAssembly", "true");
 }