Example #1
0
        public override bool Execute()
        {
            BindingRedirectResolution.Enable();

            SharpGenLogger = new Logger(new MSBuildSharpGenLogger(Log), null);

            var config = new ConfigFile
            {
                Files = ConfigFiles.Select(file => file.ItemSpec).ToList(),
                Id    = "SharpGen-MSBuild"
            };

            try
            {
                config = LoadConfig(config);

                if (SharpGenLogger.HasErrors)
                {
                    return(false);
                }

                return(Execute(config));
            }
            catch (CodeGenFailedException ex)
            {
                Log.LogError(ex.Message);
                return(false);
            }
        }
Example #2
0
        protected void PrepareExecute()
        {
            BindingRedirectResolution.Enable();

            SharpGenLogger = new Logger(new MSBuildSharpGenLogger(Log));

#if DEBUG
            if (DebugWaitForDebuggerAttach)
            {
                WaitForDebuggerAttach();
            }
#endif
        }