Browse Source

Fix designer errors and .NET Framework on Unix errors.

test-meta-packages
Jeremy Koritzinsky 8 years ago
parent
commit
05e0020f53
  1. 1
      src/Avalonia.DesktopRuntime/Avalonia.DesktopRuntime.csproj
  2. 2
      src/tools/Avalonia.Designer.HostApp/Avalonia.Designer.HostApp.csproj
  3. 10
      src/tools/Avalonia.Designer.HostApp/Program.cs
  4. 3
      tests/Avalonia.DesignerSupport.Tests/DesignerSupportTests.cs

1
src/Avalonia.DesktopRuntime/Avalonia.DesktopRuntime.csproj

@ -16,5 +16,6 @@
</ItemGroup>
<Import Project="..\..\build\NetCore.props" />
<Import Project="..\..\build\NetFX.props" />
<Import Project="..\Shared\PlatformSupport\PlatformSupport.projitems" />
</Project>

2
src/tools/Avalonia.Designer.HostApp/Avalonia.Designer.HostApp.csproj

@ -18,4 +18,6 @@
<ProjectReference Include="..\..\Avalonia.Styling\Avalonia.Styling.csproj" />
<ProjectReference Include="..\..\Avalonia.Themes.Default\Avalonia.Themes.Default.csproj" />
</ItemGroup>
<Import Project="..\..\..\build\NetFX.props" />
</Project>

10
src/tools/Avalonia.Designer.HostApp/Program.cs

@ -2,20 +2,19 @@
using System.IO;
using System.Reflection;
namespace Avalonia.Designer.HostApp.NetFX
namespace Avalonia.Designer.HostApp
{
class Program
{
#if NET461
private static string s_appDir;
private static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
{
string assemblyPath = Path.Combine(s_appDir, new AssemblyName(args.Name).Name + ".dll");
if (File.Exists(assemblyPath) == false) return null;
Assembly assembly = Assembly.LoadFrom(assemblyPath);
return assembly;
return Assembly.LoadFile(assemblyPath);
}
public static void Main(string[] args)
{
s_appDir = Directory.GetCurrentDirectory();
@ -36,9 +35,6 @@ namespace Avalonia.Designer.HostApp.NetFX
}
static void Exec(string[] args)
#elif NETCOREAPP2_0
public static void Main(string[] args)
#endif
{
Avalonia.DesignerSupport.Remote.RemoteDesignerEntryPoint.Main(args);
}

3
tests/Avalonia.DesignerSupport.Tests/DesignerSupportTests.cs

@ -101,6 +101,7 @@ namespace Avalonia.DesignerSupport.Tests
RedirectStandardOutput = true,
RedirectStandardError = true,
CreateNoWindow = true,
WorkingDirectory = outputDir,
},
EnableRaisingEvents = true
})
@ -117,7 +118,7 @@ namespace Avalonia.DesignerSupport.Tests
cancelled = true;
}
Assert.True(cancelled);
Assert.True(cancelled, $"Message Not Received.");
Assert.NotEqual(0, handle);
proc.Kill();
proc.WaitForExit();

Loading…
Cancel
Save