locked
Unable to run tests in Release mode. RRS feed

  • Question

  • I have a Unit test project in C# for Universal Windows. When I build the unit test project I get the following warning messages (only in Debug, not in Release):

    C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\1.7.3\tools\Microsoft.NetNative.targets(697,5): warning : ILTransform : warning ILT0003: Method 'InferRunSettingsHelper.UpdateRunSettingsWithUserProvidedSwitches(XmlDocument, Architecture, Framework, string)' will always throw an exception due to the missing method 'XmlDocumentXPathExtensions.CreateNavigator(XmlDocument)'. There may have been a missing assembly. [C:\Users\User\src\Unit_Tests\Unit_Tests.csproj]
    C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\1.7.3\tools\Microsoft.NetNative.targets(697,5): warning : ILTransform : warning ILT0003: Method 'InferRunSettingsHelper.TryGetDeviceXml(XPathNavigator, string)' will always throw an exception due to the missing method 'XPathNavigator.SelectSingleNode(string)'. There may have been a missing assembly. [C:\Users\User\src\Unit_Tests\Unit_Tests.csproj]
    C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\1.7.3\tools\Microsoft.NetNative.targets(697,5): warning : ILTransform : warning ILT0003: Method 'InferRunSettingsHelper.IsTestSettingsEnabled(string)' will always throw an exception due to the missing method 'XmlDocumentXPathExtensions.CreateNavigator(XmlDocument)'. There may have been a missing assembly. [C:\Users\User\src\Unit_Tests\Unit_Tests.csproj]
    C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\1.7.3\tools\Microsoft.NetNative.targets(697,5): warning : ILTransform : warning ILT0003: Method 'InferRunSettingsHelper.AddNodeIfNotPresent(XmlDocument, string, string, T, bool)' will always throw an exception due to the missing method 'XmlDocumentXPathExtensions.SelectSingleNode(XmlNode, string)'. There may have been a missing assembly. [C:\Users\User\src\Unit_Tests\Unit_Tests.csproj]
    C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\1.7.3\tools\Microsoft.NetNative.targets(697,5): warning : ILTransform : warning ILT0003: Method 'InferRunSettingsHelper.ValidateRunConfiguration(XPathNavigator)' will always throw an exception due to the missing method 'XPathNavigator.MoveToChild(string, string)'. There may have been a missing assembly. [C:\Users\User\src\Unit_Tests\Unit_Tests.csproj]
    C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\1.7.3\tools\Microsoft.NetNative.targets(697,5): warning : ILTransform : warning ILT0003: Method 'InferRunSettingsHelper.UpdateRunConfiguration(XmlDocument, Architecture, Framework, string)' will always throw an exception due to the missing method 'XmlDocumentXPathExtensions.SelectSingleNode(XmlNode, string)'. There may have been a missing assembly. [C:\Users\User\src\Unit_Tests\Unit_Tests.csproj]
    C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\1.7.3\tools\Microsoft.NetNative.targets(697,5): warning : ILTransform : warning ILT0003: Method 'MSTestSettingsUtilities.Import(string, IXPathNavigable, Architecture, FrameworkVersion)' will always throw an exception due to the missing method 'IXPathNavigable.CreateNavigator()'. There may have been a missing assembly. [C:\Users\User\src\Unit_Tests\Unit_Tests.csproj]
    C:\Program Files (x86)\Microsoft SDKs\UWPNuGetPackages\microsoft.net.native.compiler\1.7.3\tools\Microsoft.NetNative.targets(697,5): warning : ILTransform : warning ILT0003: Method 'MSTestSettingsUtilities.GenerateMSTestXml(string)' will always throw an exception due to the missing method 'XmlDocumentXPathExtensions.CreateNavigator(XmlNode)'. There may have been a missing assembly. [C:\Users\User\src\Unit_Tests\Unit_Tests.csproj]

    After this, when in Run

    vstest.console.exe /logger:trx AppPackages\......\Unit_Tests_1.0.0.0_x64.appx

    I get the error message that no tests could be discovered.

    This happens only in Release and not in Debug in Visual Studio 15.7.5

    Any pointers will be very helpful. Thanks.



    -vineeth

    Monday, July 23, 2018 5:35 AM