Comments (4)
@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'
usealias 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.
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.
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.
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:
- uninstalling Coyote with
dotnet tool uninstall --global Microsoft.Coyote.CLI
- installing Coyote again with the
--framework
flag to explicitly use the 3.1 versiondotnet 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)
- [Tutorial] Redundant conditional in the EspressoMachine tutorial HOT 5
- `case` in `receive` - `case`syntax requires an argument even if the event doesn't have one HOT 1
- Compiling 1_ClientServer gives me error NU3037 on macOS HOT 5
- Simplify the process of writing test cases.
- Simplify the module system requirements
- Add support for collection union for sets
- Adding Probabilistic Choose() in P
- Emacs support for editing P files HOT 3
- VSCode extension syntax highlighting not working HOT 2
- Tutorial - Client/Server - Error: "'PMonitor' does not contain a definition for 'TryRandom'" HOT 2
- Installation instructions should say you need nuget as a dotnet source HOT 1
- Grammar railroad diagram HOT 1
- [docs] compositional programming: docs and examples? HOT 1
- [docs] State machine event handler semantics: atomic execution? HOT 6
- `GuaranteedWithDrawProgress` in Tutorial 1 is inaccurate/misdocumented HOT 4
- Internal Error: No such file or directory HOT 1
- In trace logs enums are printed as integers and its annoying!
- Unable to compile due to "no viable alternative at input" HOT 9
- Infinite loop in Timer module HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from p.