У меня проблема при запуске теста Навес в коробке Windows:System.MissingMethodException: Метод не найден: «Microsoft .FSharp.Core.FSharpFunc`2
Unhandled Exception: System.MissingMethodException: Method not found: 'Microsoft
.FSharp.Core.FSharpFunc`2<System.String,System.String> canopy.core.get_xpath()'.
at <StartupCode$UITest>[email protected]()
Я думаю, это потому, что, когда компиляции, мой Visual Studio 2012 восстановлены пакеты NuGet и сплюнул это в консоли выводе:
Consider app.config remapping of assembly "FSharp.Core, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.3.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\3.0\Runtime\v4.0\FSharp.Core.dll] to Version "4.4.0.0" [C:\Users\Andres\Documents\Code\endtoendtests\packages\FSharp.Core.4.0.0.1\lib\net40\FSharp.Core.dll] to solve conflict and get rid of warning.
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3247: Found conflicts between different versions of the same dependent assembly.
C:\Program Files (x86)\Microsoft SDKs\F#\3.0\Framework\v4.0\fsc.exe -o:obj\x86\Debug\UITest.exe -g --noframework --define:DEBUG --optimize- --tailcalls- --platform:x86 -r:C:\Users\Andres\Documents\Code\endtoendtests\packages\canopy.0.9.52\lib\canopy.dll -r:C:\Users\Andres\Documents\Code\endtoendtests\packages\FSharp.Core.4.0.0.1\lib\net40\FSharp.Core.dll -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\mscorlib.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Drawing.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Numerics.dll" -r:C:\Users\Andres\Documents\Code\endtoendtests\packages\Selenium.WebDriver.2.53.0\lib\net40\WebDriver.dll --target:exe --warnaserror:76 --vserrors --validate-type-providers --LCID:1033 --utf8output --fullpaths --flaterrors --highentropyva- "C:\Users\Andres\AppData\Local\Temp\.NETFramework,Version=v4.0.AssemblyAttributes.fs" AssemblyInfo.fs Program.fs
UITest -> C:\Users\Andres\Documents\Code\endtoendtests\UITest\bin\Debug\UITest.exe
Как точно добавить это переназначение, чтобы исправить эту проблему?
Возможный дубликат [MissingMethodException при тестировании функции, которая принимает параметр функции] (http://stackoverflow.com/questions/36238316/missingmethodexception-when-testing-a-function-that-takes-a-function-parameter) –
Возможный дубликат [«Рассмотрите возможность переназначения app.config сборки ...» в F #] (http://stackoverflow.com/questions/7951560/consider-app-config-remapping-of-assembly-warning-in -f) – knocte
Для тех, кто это находит. «MisingMethodException» настолько распространен, что у него есть собственный [tag] (http://stackoverflow.com/questions/tagged/missingmethodexception). Прочитайте другие [ответы] (http://stackoverflow.com/questions/tagged/missingmethodexception+f%23) перед тем, как задать новый. –