From ee16646429bc27a156c1a387e8356eebb2fde362 Mon Sep 17 00:00:00 2001 From: Inga Lovinde <52715130+inga-lovinde@users.noreply.github.com> Date: Wed, 23 Sep 2015 14:05:02 +0300 Subject: [PATCH] Restored InternalsVisibleTo rewrite --- BuildServer/lib/tasks/dotnetrewrite.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/BuildServer/lib/tasks/dotnetrewrite.js b/BuildServer/lib/tasks/dotnetrewrite.js index c32ff75..9d7498a 100644 --- a/BuildServer/lib/tasks/dotnetrewrite.js +++ b/BuildServer/lib/tasks/dotnetrewrite.js @@ -31,6 +31,14 @@ module.exports = function (params, processor) { "repository: " + processor.context.owner + "/" + processor.context.reponame + "; " + "branch: " + processor.context.branch + ")", processAssemblyInfo = function (content, cb) { + if (!params.skipCodeSigning && !settings.skipCodeSigning) { + content = content.replace( + /InternalsVisibleTo\s*\(\s*\"([\w.]+)\"\s*\)/g, + function (match, p1) { + return "InternalsVisibleTo(\"" + p1 + ",PublicKey=" + settings.codeSigningPublicKey + "\")"; + } + ); + } content = addAssemblyAttribute(content, "[assembly: AssemblyInformationalVersion(\"v" + version + "\")]"); return cb(null, content); };