Skip to content
This repository has been archived by the owner on Oct 25, 2021. It is now read-only.

Commit

Permalink
[android] ResourceDesignerGenerator still needs to fail out
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanpeppers committed Jul 5, 2017
1 parent e44af31 commit f6641f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion binder/Utils/ResourceDesignerGenerator.cs
Expand Up @@ -179,14 +179,15 @@ public bool WriteAssembly()
return true;
}

public void WriteSource()
public string WriteSource()
{
string resourcePath = Path.Combine(OutputDirectory, "Resource.designer.cs");
using (var stream = File.Create(resourcePath))
using (var writer = new StreamWriter(stream))
{
csc.GenerateCodeFromCompileUnit(unit, writer, options);
}
return resourcePath;
}

public string ToSource()
Expand Down
3 changes: 2 additions & 1 deletion binder/Utils/XamarinAndroidBuild.cs
Expand Up @@ -83,7 +83,8 @@ public static string GeneratePackageProject(List<IKVM.Reflection.Assembly> assem
if (!resourceDesigner.WriteAssembly())
{
//Let's generate CS if this failed
resourceDesigner.WriteSource();
string resourcePath = resourceDesigner.WriteSource();
throw new Exception($"Resource.designer.dll compilation failed! See {resourcePath} for details.");
}

//ResolveAssemblies Task
Expand Down

0 comments on commit f6641f2

Please sign in to comment.