Вот улучшения для принятого ответа:
$(".clickable").click(function (e) {
var selection = window.getSelection();
if (!selection || selection.rangeCount < 1) return true;
var range = selection.getRangeAt(0);
var node = selection.anchorNode;
var word_regexp = /^\w*$/;
// Extend the range backward until it matches word beginning
while ((range.startOffset > 0) && range.toString().match(word_regexp)) {
range.setStart(node, (range.startOffset - 1));
}
// Restore the valid word match after overshooting
if (!range.toString().match(word_regexp)) {
range.setStart(node, range.startOffset + 1);
}
// Extend the range forward until it matches word ending
while ((range.endOffset < node.length) && range.toString().match(word_regexp)) {
range.setEnd(node, range.endOffset + 1);
}
// Restore the valid word match after overshooting
if (!range.toString().match(word_regexp)) {
range.setEnd(node, range.endOffset - 1);
}
var word = range.toString();
});
Недорогое решение состоит в том, чтобы переключиться на использование ClickOnce, который можно автоматизировать использование MSBuild. Но если все еще необходимо создать пакет Windows Installer, необходимо будет преобразовать проект в WiX (довольно прямой foward) и сборка это с решением.
Это запустит Вас: Автоматизируйте Выпуски С MSBuild И Windows Installer XML
Я использовал WiX немного прежде, и обычно я находил, что это является большим, после того как Вы выясняете, что сделать, но существует крутая кривая обучения. При пребывании в течение твердого дня, пробегаясь через учебное руководство WiX, необходимо быть, могут получить 80% работы установки.
I had the same requirement and ended up using what is suggested in these two links
Basically, since Team Build, by itself, will not build the setup projects for you, this approach has you add a new build step after the regular build is complete. This step fires off a second build by launching the devenv.exe. The IDE will build your setup files. The extra build is a bit costly but we only needed it for builds that were going to be pushed out. The Daily build at most would need this customization our CI build does not need to build setup files each time.
After that you execute some Copy commands, once again build steps that show up in your Team System build results, to move the setup files to a network share etc.
It feels a bit like a kluge at first, but it does work, it is also a full-fledged part of the automated build in Team System so it worked for my Continuous Integration goals.