The repo assumes a project uses the following folder structure:
control/
(folder containing the PCF control, *.pcfproj)solution/
(folder containing the PAC solution, *.cdsproj){project_name}.proj
The .proj
file should contain the following contents:
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Sdk Name="Cathal.PcfTools.MSBuild.Proj" Version="0.1.16" />
</Project>
Note: Replace 0.1.16
above with later versions as appropriate.
The following change should be made in the control.cdsproj
file:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Sdk Name="Cathal.PcfTools.MSBuild.Control" Version="0.1.16" />
Note: Replace 0.1.16
above with later versions as appropriate.
The following change should be made in the solution.cdsproj
file:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Sdk Name="Cathal.PcfTools.MSBuild.Solution" Version="0.1.16" />
Note: Replace 0.1.16
above with later versions as appropriate.
The following commands can be run from the folder where the {project_name}.proj
file exists:
-
Build the control / solution:
dotnet build
-
Updating the PAC package versions used by the project: (replace
X.Y.Z
with the updated version number with the version of thepcf-scripts
package to install)dotnet msbuild -t:UpdatePcfPackagesVersion -p:NewVersion=X.Y.Z
-
Upgrading the tools from command line: (replace
X.Y.Z
with the updated version number of this project)dotnet msbuild -t:UpdatePcfToolsSdk -p:NewVersion=X.Y.Z
-
Copying template files into the projects:
dotnet msbuild -t:UpdatePcfTemplateFiles
-
Set the version number consistently throughout the project: (replace
X.Y.Z
with the version you would like to set your control to)dotnet msbuild -t:SetVersion -p:NewVersion=X.Y.Z