public override bool Execute() { BindingRedirectResolution.Enable(); try { var config = new ConfigFile { Files = MappingFiles.Select(file => file.ItemSpec).ToList(), Id = "SharpGen-MSBuild" }; RunCodeGen(config, AppType); return(true); } catch (CodeGenFailedException) { return(false); } }
public override bool Execute() { BindingRedirectResolution.Enable(); try { var patchApp = new InteropApp { AssemblyResolver = new MSBuildAssemblyResolver(References), Logger = new MSBuildSharpPatchLogger(Log), }; patchApp.PatchFile(AssemblyToPatch); return(true); } catch (Exception ex) { Log.LogErrorFromException(ex, true, true, null); return(false); } }