public override bool Execute() { var referenceCopyLocalPaths = ReferenceCopyLocalPaths.Select(x => x.ItemSpec).ToList(); var defineConstants = DefineConstants.GetConstants(); processor = new Processor { Logger = new BuildLogger { BuildEngine = BuildEngine, }, AssemblyFilePath = AssemblyPath, IntermediateDirectory = IntermediateDir, KeyFilePath = KeyFilePath, SignAssembly = SignAssembly, ProjectDirectory = ProjectDirectory, References = References, SolutionDirectory = SolutionDir, ReferenceCopyLocalPaths = referenceCopyLocalPaths, DefineConstants = defineConstants, NuGetPackageRoot = NuGetPackageRoot, PackageDefinitions = PackageDefinitions?.ToList() }; var success = processor.Execute(); if (success) { var weavers = processor.Weavers.Select(x => x.AssemblyName); ExecutedWeavers = string.Join(";", weavers) + ";"; } return(success); }
public override bool Execute() { // System.Diagnostics.Debugger.Launch(); var referenceCopyLocalPaths = ReferenceCopyLocalFiles.Select(x => x.ItemSpec).ToList(); var defineConstants = DefineConstants.GetConstants(); processor = new Processor { Logger = new BuildLogger { BuildEngine = BuildEngine, }, AssemblyFilePath = AssemblyFile, IntermediateDirectory = IntermediateDirectory, KeyFilePath = KeyOriginatorFile ?? AssemblyOriginatorKeyFile, SignAssembly = SignAssembly, ProjectDirectory = ProjectDirectory, DocumentationFilePath = DocumentationFile, References = References, SolutionDirectory = SolutionDirectoryFinder.Find(SolutionDirectory, NCrunchOriginalSolutionDirectory, ProjectDirectory), ReferenceCopyLocalPaths = referenceCopyLocalPaths, DefineConstants = defineConstants, NuGetPackageRoot = NuGetPackageRoot, MSBuildDirectory = MSBuildThisFileDirectory, WeaverFilesFromProps = GetWeaverFilesFromProps(), DebugSymbols = GetDebugSymbolsType() }; var success = processor.Execute(); if (success) { var weavers = processor.Weavers.Select(x => x.AssemblyName); ExecutedWeavers = string.Join(";", weavers) + ";"; File.WriteAllLines(IntermediateCopyLocalFilesCache, processor.ReferenceCopyLocalPaths); } else { if (File.Exists(IntermediateCopyLocalFilesCache)) { File.Delete(IntermediateCopyLocalFilesCache); } } return(success); }
public override bool Execute() { var defineConstants = DefineConstants.GetConstants(); var verifier = new Verifier { Logger = new BuildLogger { BuildEngine = BuildEngine, }, SolutionDirectory = SolutionDir, ProjectDirectory = ProjectDirectory, DefineConstants = defineConstants, TargetPath = TargetPath, }; return(verifier.Verify()); }
public override bool Execute() { var defineConstants = DefineConstants.GetConstants(); var verifier = new Verifier { Logger = new BuildLogger { BuildEngine = BuildEngine, }, SolutionDirectory = SolutionDirectoryFinder.Find(SolutionDirectory, NCrunchOriginalSolutionDirectory, ProjectDirectory), WeaverConfiguration = WeaverConfiguration, ProjectDirectory = ProjectDirectory, DefineConstants = defineConstants, TargetPath = TargetPath, }; return(verifier.Verify()); }
public override bool Execute() { var referenceCopyLocalPaths = ReferenceCopyLocalFiles.Select(x => x.ItemSpec).ToList(); var defineConstants = DefineConstants.GetConstants(); var buildLogger = new BuildLogger { BuildEngine = BuildEngine, }; processor = new Processor { Logger = buildLogger, AssemblyFilePath = AssemblyFile, IntermediateDirectory = IntermediateDirectory, KeyFilePath = KeyOriginatorFile ?? AssemblyOriginatorKeyFile, SignAssembly = SignAssembly, ProjectDirectory = ProjectDirectory, DocumentationFilePath = DocumentationFile, References = References, SolutionDirectory = SolutionDirectoryFinder.Find(SolutionDirectory, NCrunchOriginalSolutionDirectory, ProjectDirectory), ReferenceCopyLocalPaths = referenceCopyLocalPaths, DefineConstants = defineConstants, NuGetPackageRoot = NuGetPackageRoot, MSBuildDirectory = MSBuildThisFileDirectory, WeaverFilesFromProps = GetWeaverFilesFromProps(), DebugSymbols = GetDebugSymbolsType(), GenerateXsd = GenerateXsd }; var success = processor.Execute(); if (success) { var weavers = processor.Weavers.Select(x => x.AssemblyName); ExecutedWeavers = string.Join(";", weavers) + ";"; try { File.WriteAllLines(IntermediateCopyLocalFilesCache, processor.ReferenceCopyLocalPaths); } catch (Exception ex) { buildLogger.LogInfo("ProjectDirectory: " + ProjectDirectory); buildLogger.LogInfo("IntermediateDirectory: " + IntermediateDirectory); buildLogger.LogInfo("CurrentDirectory: " + Directory.GetCurrentDirectory()); buildLogger.LogInfo("AssemblyFile: " + AssemblyFile); buildLogger.LogInfo("IntermediateCopyLocalFilesCache: " + IntermediateCopyLocalFilesCache); buildLogger.LogError("Error writing IntermediateCopyLocalFilesCache: " + ex.Message); return(false); } } else { if (File.Exists(IntermediateCopyLocalFilesCache)) { File.Delete(IntermediateCopyLocalFilesCache); } } return(success); }