Don't link the main assembly

The main assembly was getting marked to link because it is an EXE.
This was making data binding fail.

Fixes #113
Fixes #107
This commit is contained in:
Frank A. Krueger 2018-03-23 14:38:08 -07:00
parent 865929c434
commit d7d7290c87
No known key found for this signature in database
GPG Key ID: 0471C67474FFE664
1 changed files with 11 additions and 0 deletions

View File

@ -209,6 +209,7 @@ namespace Ooui.Wasm.Build.Tasks
Pipeline GetLinkerPipeline ()
{
var p = new Pipeline ();
p.AppendStep (new DontLinkExeStep ());
p.AppendStep (new LoadReferencesStep ());
p.AppendStep (new PreserveUsingAttributesStep (bclAssemblies.Values.Select (Path.GetFileNameWithoutExtension)));
p.AppendStep (new BlacklistStep ());
@ -221,6 +222,16 @@ namespace Ooui.Wasm.Build.Tasks
return p;
}
class DontLinkExeStep : BaseStep
{
protected override void Process ()
{
foreach (var a in Context.GetAssemblies ()) {
Annotations.SetAction (a, AssemblyAction.Copy);
}
}
}
class MarkStepWithUnresolvedLogging : MarkStep
{
public TaskLoggingHelper Log;