Upgrading Coalesce
Upgrading your project's version of Coalesce is a relatively straightforward process, but the process does involve a few different steps.
Decide new version
The first step, which you may have already done, is decide which version you're upgrading to. Coalesce projects generally favor the use of CI builds which are released as soon as new features are developed, rather than formal release versions that come out at a much slower cadence.
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
Next, 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.0.0-ci.20XX0806.2",
"coalesce-vue-vuetify3": "5.0.0-ci.20XX0806.2",
}
}
- Save the changes to
package.json
. - Run
npm i
in your web project to install the new versions.
NuGet upgrades
Coalesce projects 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.0.0-ci.20XX0806.2</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.