Skip to content

Commit 2968960

Browse files
committed
Fix building Events library on WinRT
1 parent 74adbbd commit 2968960

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

ReactiveUI.Events/EventBuilder.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,12 @@ public AssemblyDefinition Resolve(string fullName, ReaderParameters parameters)
307307
fullPath = targetAssemblyDirs.Select(x => Path.Combine(x, dllName)).FirstOrDefault(x => File.Exists(x));
308308
}
309309

310+
// NB: This hacks WinRT's weird mscorlib to just use the regular one
311+
if (fullName.Contains("mscorlib") && fullName.Contains("255"))
312+
{
313+
fullPath = Environment.ExpandEnvironmentVariables(@"%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll");
314+
}
315+
310316
if (fullPath == null)
311317
{
312318
var err = String.Format("Failed to resolve!!! {0}", fullName);
@@ -328,6 +334,12 @@ public AssemblyDefinition Resolve(string fullName)
328334
fullPath = targetAssemblyDirs.Select(x => Path.Combine(x, dllName)).FirstOrDefault(x => File.Exists(x));
329335
}
330336

337+
// NB: This hacks WinRT's weird mscorlib to just use the regular one
338+
if (fullName.Contains("mscorlib") && fullName.Contains("255"))
339+
{
340+
fullPath = Environment.ExpandEnvironmentVariables(@"%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll");
341+
}
342+
331343
if (fullPath == null)
332344
{
333345
var err = String.Format("Failed to resolve!!! {0}", fullName);

0 commit comments

Comments
 (0)