public bool Execute() { Log.VisualStudioVersion = VisualStudioVer; if (!CommonRegistryConfigurations.IsSolutionEnabled(SolutionName, VisualStudioVer)) { return(true); } try { string snkCertificate = File.Exists(Snk) ? Snk : null; using (SInjection sInjection = new SInjection(Assembly, snkCertificate)) { return(sInjection.Patch()); } } catch (Exception e) { const string errorMessage = "Error Executing MSBuild Task SInjectionBuildTask"; Log.Write(e, errorMessage); e.Capture(VisualStudioVer, message: errorMessage); BuildWarningEventArgs errorEvent = new BuildWarningEventArgs("Debugger Visualizer Creator", "", "SInjectionBuildTask", 0, 0, 0, 0, $"There was an error adding the serializable attributes to type of the project {Assembly}. Please change serialization method from Binary to Json or Xml in Tools->Options->BridgeVs->SerializationOption. ", "", "LINQBridgeVs"); BuildEngine.LogWarningEvent(errorEvent); } return(true); }
public static void Init(TestContext testContext) { var sInjection = new SInjection(SinjectTestModelPath); sInjection.Patch(SerializationTypes.BinarySerialization); AppDomain.CurrentDomain.AssemblyResolve += HandleAssemblyResolve; _modelAssembly = AppDomain.CurrentDomain.Load(AssemblyName.GetAssemblyName(SinjectTestModelPath)); }
static void Main(string[] args) { var sinject = new SInjection( @"C:\Work\RBTCode\Trunk\Airline\CrewPay\CrewPay\bin\wnvhtmlconvert.dll", mode: PatchMode.Debug); sinject.Patch(SerializationTypes.BinarySerialization); }
public static void Init(TestContext testContext) { SInjection sInjection = new SInjection(SinjectTestModelPath); _patchResult = sInjection.Patch(SerializationTypes.BinarySerialization); AppDomain.CurrentDomain.AssemblyResolve += HandleAssemblyResolve; _modelAssembly = AppDomain.CurrentDomain.Load(AssemblyName.GetAssemblyName(SinjectTestModelPath)); }
public bool Execute() { Log.Configure("LINQBridgeVs", "SinjectionBuildTask"); try { var snkCertificate = File.Exists(Snk) ? Snk : null; var sInjection = new SInjection(Assembly, mode: PatchMode.Debug, snkCertificatePath: snkCertificate); sInjection.Patch(SerializationTypes.BinarySerialization); } catch (Exception e) { Log.Write(e, @"Error Executing MSBuild Task SInjectionBuildTask "); } return(true); }
public bool Execute() { RavenWrapper.VisualStudioVersion = VisualStudioVer; Log.VisualStudioVersion = VisualStudioVer; try { string snkCertificate = File.Exists(Snk) ? Snk : null; var sInjection = new SInjection(Assembly, mode: PatchMode.Debug, snkCertificatePath: snkCertificate); return(sInjection.Patch(SerializationTypes.BinarySerialization)); } catch (Exception e) { const string errorMessage = "Error Executing MSBuild Task SInjectionBuildTask"; Log.Write(e, errorMessage); RavenWrapper.Instance.Capture(e, message: errorMessage); return(false); } }