Background Worker Wrapper (oldie but goodie)

Ran into a need to run a long running process in a Windows Application

Figured writing a wrapper class made calling it much easier

public class BackgroundWorkerWrapper

{

BackgroundWorker _worker;

public Action RunAction{get; set;}

public Action PostAction{get; set;}

public BackgroundWorkerWrapper(Action runAction = null, Action postAction = null)

{

RunAction = runAction;

PostAction = postAction;

_worker = new BackgroundWorker();

_worker.WorkerReportsProgress = true;

_worker.DoWork += _worker_DoWork;

_worker.RunWorkerCompleted += _worker_RunWorkerCompleted;

Run();

}

public void Run()

{

_worker.RunWorkerAsync();

}

void _worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)

{

PostAction.Invoke();

}

void _worker_DoWork(object sender, DoWorkEventArgs e)

{

RunAction.Invoke();

}

}

.

 

 

Share on Facebook

Visual Studio 2015 – An error occurred while signing: Failed to sign SignTool Error: No certificates were found that met all the given criteria.

Visual Studio 2015 – An error occurred while signing: Failed to sign SignTool Error: No certificates were found that met all the given criteria.

Create a pfx as you normally would with Sign the File:
2014-11-13_0117

2014-11-13_0121

 

 

 

Select From File:
2014-11-13_0121_001

 

 

Find your PFX, and open:
2014-11-13_0123

 

Rebuild:

2014-11-13_0123_001

Share on Facebook