Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

type 'canopy.classic' not found in assembly 'canopy, Version=2.0.0.0, #473

Closed
OnurGumus opened this issue May 28, 2019 · 6 comments
Closed

Comments

@OnurGumus
Copy link

I have the following fsharp script file:

#r "packages/Selenium.WebDriver/lib/netstandard2.0/WebDriver.dll"
#r "packages/canopy/lib/netstandard2.0/canopy.dll"

//these are similar to C# using statements
open canopy.runner.classic
open canopy.classic

canopy.configuration.chromeDir <- System.AppContext.BaseDirectory

//start an instance of chrome
start chrome

//this is how you define a test
"taking canopy for a spin" &&& fun _ ->
    //this is an F# function body, it's whitespace enforced

    //go to url
    url "http://lefthandedgoat.github.io/canopy/testpages/"

    //assert that the element with an id of 'welcome' has
    //the text 'Welcome'
    "#welcome" == "Welcome"

    //assert that the element with an id of 'firstName' has the value 'John'
    "#firstName" == "John"

    //change the value of element with
    //an id of 'firstName' to 'Something Else'
    "#firstName" << "Something Else"

    //verify another element's value, click a button,
    //verify the element is updated
    "#button_clicked" == "button not clicked"
    click "#button"
    "#button_clicked" == "button clicked"

//run all tests
run()

printfn "press [enter] to exit"
System.Console.ReadLine() |> ignore

quit()

I have installed canopy from nuget and when I run above with dotnet fsi that comes with .net core 3.0
I get the following

dotnet fsi .\test.fsx

error FS3216: type 'canopy.classic' not found in assembly 'canopy, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. A possible cause may be a version incompatibility. You may 
need to explicitly reference the correct version of this assembly to allow all referenced components to use the correct version.
@lefthandedgoat
Copy link
Owner

I haven't used .net core 3.0 and I rarely use fsi, so off the top of my head I do not know.

If you can provide more information, like OS and IDE+version I may be able to reproduce and figure it out.

@OnurGumus
Copy link
Author

It is Windows 10 pro 64 bit latest rtm. I use vs code, but it doesn't matter since I run dotnet fsi from command line

@lefthandedgoat
Copy link
Owner

Ok I am getting my VM up to date and I will give it a shot

@lefthandedgoat
Copy link
Owner

I was able to reproduce this, but after doing some reading I don't think there is a fix that you or I can do/use just yet.

You can read some here where MS/F# people discuss it:
dotnet/fsharp#3309

Sorry =(

@kaeedo
Copy link
Contributor

kaeedo commented Sep 12, 2019

I can confirm that the workaround from that issue works when using .Net Core 3 preview 9 on Windows 10

@OnurGumus
Copy link
Author

right now it works out of box with .net core 3.1. Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants