Upgrading Coalesce
Upgrading your project's version of Coalesce is a relatively straightforward process. The latest version of Coalesce can be viewed on npm or on NuGet.
You should always use the same version for both NPM and NuGet dependencies. Having mismatched versions in a single project can introduce errors or subtle bugs.
NPM upgrades
First, upgrade the NPM dependencies in your web project.
- Open
package.json
in your web project and replace the versions ofcoalesce-vue
andcoalesce-vue-vuetify3
with the new version number.
{
"dependencies": {
"coalesce-vue": "5.3.1",
"coalesce-vue-vuetify3": "5.3.1",
}
}
- Save the changes to
package.json
. - Run
npm i
in your web project to install the new versions.
NuGet upgrades
Coalesce projects usually have a single variable, CoalesceVersion
, to control all Coalesce NuGet package dependencies, declared in Directory.Build.props
. This file is in the root of the solution, next to the .sln
file; it is also included in the "Solution Items" folder in Visual Studio's Solution Explorer.
To upgrade the NuGet packages:
- Update the value of
CoalesceVersion
with the new version number.
<Project>
<PropertyGroup>
<CoalesceVersion>5.3.1</CoalesceVersion>
</PropertyGroup>
</Project>
- Save the changes.
- Run
dotnet restore
in the solution root or in the web project. Then, run code generation withdotnet coalesce
ornpm run coalesce
in the web project.
TIP
The above information describes the default project configuration that originates from the Coalesce project template. If your project has diverged from this configuration, consult with your project team members, or just explore/search the files in your project.
WARNING
It is not recommended to use the Visual Studio NuGet Package Manager to manage Coalesce versions because it will erase usages of the central CoalesceVersion
variable, which can lead to version mismatches within your solution. It also fails to maintain the version of the DotNetCliToolReference
, which provides Coalesce's code generator.