Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Is it possible to get ClientDependency to automatically use the build number of a specified assembly, rather than the manually incremented config one?
Hi Rob,
the short answer is yes - the long answer is it really depends on what your build / deployment process is.
Using Visual Studio Team Services for example you can do some variable replacement to put the build number into the clientdependency.
you can use things like Replace Tokens, https://marketplace.visualstudio.com/items?itemName=qetza.replacetokens
to change the value in the file at build time for this you have a parameters.xml file in your solution
<?xml version="1.0" encoding="utf-8" ?> <parameters> <parameter name="ClientDependency.Version" description="Change the Client DependencyVersion - new minified files" defaultValue="#{ClientDependency.Version}#" tags=""> <parameterEntry kind="XmlFile" scope="ClientDependency\.config$" match="/clientDependency/@version" /> </parameter> </parameters>
and you can set the version to be the build number in your release :
you can also use poweshell scripts as part of a something like and octopus deployment to increment the version number.
For example i have used something like this in the past: http://blog.darren-ferguson.com/2016/04/30/incrementing-the-umbraco-client-dependency-version-with-octopus-deploy/
where the number is incremented by the script when the build is made.
there are a few other ways its sort of depends.
edit: for completeness there is also the MSBuild way (in the comments on the post above)
https://our.umbraco.com/forum/extending-umbraco-and-using-the-api/85268-howto-get-msbuild-to-update-the-client-dependency-framework
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Get ClientDependency to use build number
Is it possible to get ClientDependency to automatically use the build number of a specified assembly, rather than the manually incremented config one?
Hi Rob,
the short answer is yes - the long answer is it really depends on what your build / deployment process is.
Using Visual Studio Team Services for example you can do some variable replacement to put the build number into the clientdependency.
you can use things like Replace Tokens, https://marketplace.visualstudio.com/items?itemName=qetza.replacetokens
to change the value in the file at build time for this you have a parameters.xml file in your solution
and you can set the version to be the build number in your release :
you can also use poweshell scripts as part of a something like and octopus deployment to increment the version number.
For example i have used something like this in the past: http://blog.darren-ferguson.com/2016/04/30/incrementing-the-umbraco-client-dependency-version-with-octopus-deploy/
where the number is incremented by the script when the build is made.
there are a few other ways its sort of depends.
edit: for completeness there is also the MSBuild way (in the comments on the post above)
https://our.umbraco.com/forum/extending-umbraco-and-using-the-api/85268-howto-get-msbuild-to-update-the-client-dependency-framework
is working on a reply...