<!-- The following are tests that fail on non-Windows, which we must not run when building against packages -->
<ItemGroup Condition="'$(XunitTestBinBase)' != '' and '$(BuildTestsAgainstPackages)' == 'true' and '$(TargetsWindows)' != 'true'">
+ <ExcludeList Include="$(XunitTestBinBase)/Interop/MarshalAPI/NativeLibrary/NativeLibraryTests/*">
+ <Issue>Issue building native components for the test. Since tests are currently built on Windows, the native components end up at Core_Root instead of Test directory, which is not suitable for the test.</Issue>
+ </ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/CoreMangLib/cti/system/byte/ByteToString3/*">
<Issue>needs triage</Issue>
</ExcludeList>
if (TestLibrary.Utilities.IsWindows)
{
+ libName = GetWin32LibName();
+
// Calls on a valid library from System32 directory
- libName = GetNativeLibraryPlainName();
- success &= EXPECT(LoadLibraryAdvanced("mapi32", assembly, DllImportSearchPath.System32));
- success &= EXPECT(TryLoadLibraryAdvanced("mapi32", assembly, DllImportSearchPath.System32));
+ success &= EXPECT(LoadLibraryAdvanced(libName, assembly, DllImportSearchPath.System32));
+ success &= EXPECT(TryLoadLibraryAdvanced(libName, assembly, DllImportSearchPath.System32));
// Calls on a valid library from application directory
- success &= EXPECT(LoadLibraryAdvanced("mapi32", assembly, DllImportSearchPath.ApplicationDirectory), TestResult.DllNotFound);
- success &= EXPECT(TryLoadLibraryAdvanced("mapi32", assembly, DllImportSearchPath.ApplicationDirectory), TestResult.ReturnFailure);
+ success &= EXPECT(LoadLibraryAdvanced(libName, assembly, DllImportSearchPath.ApplicationDirectory), TestResult.DllNotFound);
+ success &= EXPECT(TryLoadLibraryAdvanced(libName, assembly, DllImportSearchPath.ApplicationDirectory), TestResult.ReturnFailure);
}
// Calls with null libName input
return "NativeLibrary";
}
+ static string GetWin32LibName()
+ {
+ return "msi.dll";
+ }
+
static string GetNativeLibraryName()
{
string baseName = GetNativeLibraryPlainName();