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

Wild cards don't work in dotnet-tools.json #7860

Merged
merged 1 commit into from
Jul 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions Documentation/articles/migrate_38.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,31 +35,31 @@ However, if you are migrating from 3.8.0, you will need to setup a configuration
"isRoot": true,
"tools": {
"dotnet-mgcb": {
"version": "3.8.1.*",
"version": "3.8.1.263",
"commands": [
"mgcb"
]
},
"dotnet-mgcb-editor": {
"version": "3.8.1.*",
"version": "3.8.1.263",
"commands": [
"mgcb-editor"
]
},
"dotnet-mgcb-editor-linux": {
"version": "3.8.1.*",
"version": "3.8.1.263",
"commands": [
"mgcb-editor-linux"
]
},
"dotnet-mgcb-editor-windows": {
"version": "3.8.1.*",
"version": "3.8.1.263",
"commands": [
"mgcb-editor-windows"
]
},
"dotnet-mgcb-editor-mac": {
"version": "3.8.1.*",
"version": "3.8.1.263",
"commands": [
"mgcb-editor-mac"
]
Expand All @@ -68,6 +68,8 @@ However, if you are migrating from 3.8.0, you will need to setup a configuration
}
```

Please note that you can't use the ```3.8.1.*``` wildcard in the ```dotnet-tools.json``` file (tool versions have to be fully qualified). We strongly recommand that the versions match the MonoGame version referenced in your ```.csproj``` (if you're using the ```*``` wildcard, make sure that they don't end up mismatching if the nugets are updated without you noticing).

You will also need to add this to your ```.csproj```:

```xml
Expand All @@ -77,7 +79,9 @@ You will also need to add this to your ```.csproj```:
</Target>
```

With these changes, .NET will automatically install the MGCB Editor for you when launching Visual Studio 2022. Then, if you installed the Visual Studio extension, you should also be able to just double-click an ```.mgcb``` file to open the MGCB Editor. You can also open the MGCB Editor with the CLI via ```dotnet mgcb-editor``` when executed from within the project directory.
With these changes, .NET will automatically install the MGCB Editor for you when launching Visual Studio 2022 (if you want to install it manually and skip adding the Target, run ```dotnet tool restore``` within the project directory).

Then, if you installed the Visual Studio extension, you should also be able to just double-click an ```.mgcb``` file to open the MGCB Editor. You can also open the MGCB Editor with the CLI via ```dotnet mgcb-editor``` when executed from within the project directory.

This new configuration has the advantage of allowing to have per-project versions of MGCB and its Editor (instead of per-machine like a global tool).

Expand Down