Git Product home page Git Product logo

Comments (4)

thesammiller avatar thesammiller commented on June 15, 2024 1

@martinHornacek I am using Debian/Linux, but I think your point holds about conflicting versions.

Another way to work around this:

  • Install dotnet 3.1 explicitly (so there are multiple versions of the sdk installed)
  • Create a global.json file in the directory of the project.
  • Put the following in the global.json:
{
  "sdk": {
    "version": "3.1.425"
  }
}
  • Install Coyote locally (skip the --global flag)
  • Instead of using alias pmc='coyote test' use alias pmc='dotnet tool run coyote test'
  • The global.json specifies using dotnet 3.1 in the folder and the alias targets the specific version of coyote.

It's been a minute since I found this workaround, so some of these instructions may not be correct, but it does leave the global versions of dotnet and coyote untouched, which may be important for some environments.

from p.

thesammiller avatar thesammiller commented on June 15, 2024

I tried this again with the output DLL and it errored out. I tried to compile all the tutorials and they all had errors. Most had output similar to the below.

~/Development/dotnet/P/Tutorial/1_ClientServer$ coyote test ./POutput/netcoreapp3.1/ClientServer.dll -m PImplementation.tcSingleClient.Execute -i 1000
Microsoft (R) Coyote version 1.7.1.0 for .NET 6.0.11
Copyright (C) Microsoft Corporation. All rights reserved.

. Testing /home/smiller/Development/dotnet/P/Tutorial/1_ClientServer/POutput/netcoreapp3.1/ClientServer.dll.
Unable to load one or more of the requested types.
Could not load type 'Microsoft.Coyote.Event' from assembly 'Microsoft.Coyote, Version=1.7.1.0, Culture=neutral, PublicKeyToken=c4566cf0a7f74012'.                                                   
Could not load type 'Microsoft.Coyote.Event' from assembly 'Microsoft.Coyote, Version=1.7.1.0, Culture=neutral, PublicKeyToken=c4566cf0a7f74012'.                                                   
Could not load type 'Microsoft.Coyote.Event' from assembly 'Microsoft.Coyote, Version=1.7.1.0, Culture=neutral, PublicKeyToken=c4566cf0a7f74012'.                                                   
Could not load type 'Microsoft.Coyote.Event' from assembly 'Microsoft.Coyote, Version=1.7.1.0, Culture=neutral, PublicKeyToken=c4566cf0a7f74012'.                                                   
Could not load type 'Microsoft.Coyote.Event' from assembly 'Microsoft.Coyote, Version=1.7.1.0, Culture=neutral, PublicKeyToken=c4566cf0a7f74012'.                                                   
Could not load type 'Microsoft.Coyote.Event' from assembly 'Microsoft.Coyote, Version=1.7.1.0, Culture=neutral, PublicKeyToken=c4566cf0a7f74012'.                                                   
Could not load type 'Microsoft.Coyote.Actors.StateMachine' from assembly 'Microsoft.Coyote, Version=1.7.1.0, Culture=neutral, PublicKeyToken=c4566cf0a7f74012'.                                     
Could not load type 'Microsoft.Coyote.Actors.StateMachine' from assembly 'Microsoft.Coyote, Version=1.7.1.0, Culture=neutral, PublicKeyToken=c4566cf0a7f74012'.                                     
Could not load type 'Microsoft.Coyote.Actors.StateMachine' from assembly 'Microsoft.Coyote, Version=1.7.1.0, Culture=neutral, PublicKeyToken=c4566cf0a7f74012'.                                     
Could not load type 'Microsoft.Coyote.Actors.StateMachine' from assembly 'Microsoft.Coyote, Version=1.7.1.0, Culture=neutral, PublicKeyToken=c4566cf0a7f74012'.
Could not load type 'Microsoft.Coyote.Actors.StateMachine' from assembly 'Microsoft.Coyote, Version=1.7.1.0, Culture=neutral, PublicKeyToken=c4566cf0a7f74012'.
Could not load type 'Microsoft.Coyote.Actors.StateMachine' from assembly 'Microsoft.Coyote, Version=1.7.1.0, Culture=neutral, PublicKeyToken=c4566cf0a7f74012'.
Could not load type 'Microsoft.Coyote.Event' from assembly 'Microsoft.Coyote, Version=1.7.1.0, Culture=neutral, PublicKeyToken=c4566cf0a7f74012'.
Could not load type 'Microsoft.Coyote.Event' from assembly 'Microsoft.Coyote, Version=1.7.1.0, Culture=neutral, PublicKeyToken=c4566cf0a7f74012'.
Could not load type 'State' from assembly 'Microsoft.Coyote, Version=1.7.1.0, Culture=neutral, PublicKeyToken=c4566cf0a7f74012'.
Could not load type 'State' from assembly 'Microsoft.Coyote, Version=1.7.1.0, Culture=neutral, PublicKeyToken=c4566cf0a7f74012'.
Could not load type 'State' from assembly 'Microsoft.Coyote, Version=1.7.1.0, Culture=neutral, PublicKeyToken=c4566cf0a7f74012'.
Could not load type 'State' from assembly 'Microsoft.Coyote, Version=1.7.1.0, Culture=neutral, PublicKeyToken=c4566cf0a7f74012'.
Could not load type 'Microsoft.Coyote.Event' from assembly 'Microsoft.Coyote, Version=1.7.1.0, Culture=neutral, PublicKeyToken=c4566cf0a7f74012'.
Could not load type 'State' from assembly 'Microsoft.Coyote, Version=1.7.1.0, Culture=neutral, PublicKeyToken=c4566cf0a7f74012'.
Could not load type 'State' from assembly 'Microsoft.Coyote, Version=1.7.1.0, Culture=neutral, PublicKeyToken=c4566cf0a7f74012'.
Could not load type 'State' from assembly 'Microsoft.Coyote, Version=1.7.1.0, Culture=neutral, PublicKeyToken=c4566cf0a7f74012'.
Could not load type 'Microsoft.Coyote.Event' from assembly 'Microsoft.Coyote, Version=1.7.1.0, Culture=neutral, PublicKeyToken=c4566cf0a7f74012'.
Could not load type 'State' from assembly 'Microsoft.Coyote, Version=1.7.1.0, Culture=neutral, PublicKeyToken=c4566cf0a7f74012'.
Could not load type 'State' from assembly 'Microsoft.Coyote, Version=1.7.1.0, Culture=neutral, PublicKeyToken=c4566cf0a7f74012'.
Could not load type 'Microsoft.Coyote.Event' from assembly 'Microsoft.Coyote, Version=1.7.1.0, Culture=neutral, PublicKeyToken=c4566cf0a7f74012'.
Could not load type 'State' from assembly 'Microsoft.Coyote, Version=1.7.1.0, Culture=neutral, PublicKeyToken=c4566cf0a7f74012'.
Could not load type 'State' from assembly 'Microsoft.Coyote, Version=1.7.1.0, Culture=neutral, PublicKeyToken=c4566cf0a7f74012'.
Could not load type 'Microsoft.Coyote.Event' from assembly 'Microsoft.Coyote, Version=1.7.1.0, Culture=neutral, PublicKeyToken=c4566cf0a7f74012'.
Could not load type 'State' from assembly 'Microsoft.Coyote, Version=1.7.1.0, Culture=neutral, PublicKeyToken=c4566cf0a7f74012'.
Could not load type 'State' from assembly 'Microsoft.Coyote, Version=1.7.1.0, Culture=neutral, PublicKeyToken=c4566cf0a7f74012'.
Could not load type 'Microsoft.Coyote.Event' from assembly 'Microsoft.Coyote, Version=1.7.1.0, Culture=neutral, PublicKeyToken=c4566cf0a7f74012'.
Could not load type 'State' from assembly 'Microsoft.Coyote, Version=1.7.1.0, Culture=neutral, PublicKeyToken=c4566cf0a7f74012'.
Could not load type 'State' from assembly 'Microsoft.Coyote, Version=1.7.1.0, Culture=neutral, PublicKeyToken=c4566cf0a7f74012'.

from p.

thesammiller avatar thesammiller commented on June 15, 2024

I am able to get this to work on a different computer. I am assuming there is something wrong with my local setup. I am closing this issue. Thank you.

from p.

martinHornacek avatar martinHornacek commented on June 15, 2024

@thesammiller

I had similar issue on my Mac with the "Could not load type" errors when running the 'coyote test' command.

In the end the problem was that the Coyote was installed for different version of dotnet (in my case 6.0.11) than the version which was used to build the P tutorials. If you follow the installation guide by running

brew tap isen-ng/dotnet-sdk-versions
brew install --cask dotnet-sdk3-1-400

then the dotnet framework will be 3.1.

You can see which version the Coyote tries to use in the output when running 'coyote test':

Microsoft (R) Coyote version 1.7.1.0 for .NET 6.0.11

I resolved the issue by:

  1. uninstalling Coyote with dotnet tool uninstall --global Microsoft.Coyote.CLI
  2. installing Coyote again with the --framework flag to explicitly use the 3.1 version dotnet tool install --global Microsoft.Coyote.CLI --version 1.0.5 --framework netcoreapp3.1

I am putting my solution here just in case someone stumbles on the same issue.

@ankushdesai This issue could be a common problem for folks using Macs who have already a specific version of dotnet framework installed on their machine.

We could improve the P/Docs/docs/getstarted/install.md and add a note to use the --framework flag when installing Microsoft.Coyote.CLI to make sure the tool is installed for the proper version of dotnet framework.

Would such change make sense? Please let me know what you think. If yes, I'll create a PR.

Thank you.

from p.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.