This project is read-only.

MSBuild.ExtensionPack.Xml.XmlTask Transform XslTransformException: Execution of scripts was prohibited.

Dec 16, 2009 at 3:30 PM

I would appreciate some advice to solve an error I am getting when using MSBuild.ExtensionPack.Xml.XmlTask Transform. The error is:

"error : XslTransformException: Execution of scripts was prohibited. Use the XsltSettings.EnableScript property to enable it."

Using "MSBuild.ExtensionPack.Xml.XmlTask" task from assembly "C:\ccviews\CorneyG_TC_DEV_REL_1\TCSYS01\TC\Source\BuildBTApps
Task "MSBuild.ExtensionPack.Xml.XmlTask" (TaskId:0)
  Loading XmlFile: BTSNTSvc.exe.config (TaskId:0)
  Transforming: BTSNTSvc.exe.config (TaskId:0)
  Loading XslTransformFile: Test.xslt (TaskId:0)
C:\ccviews\CorneyG_TC_DEV_REL_1\TCSYS01\TC\Source\BuildBTApps\MSBuildExtensionPack.Test\Tpf.Config\Tpf.Config.proj(6,9): er
ror : XslTransformException: Execution of scripts was prohibited. Use the XsltSettings.EnableScript property to enable it.
An error occurred at (3,3).\r
C:\ccviews\CorneyG_TC_DEV_REL_1\TCSYS01\TC\Source\BuildBTApps\MSBuildExtensionPack.Test\Tpf.Config\Tpf.Config.proj(6,9): er
ror :
Done executing task "MSBuild.ExtensionPack.Xml.XmlTask" -- FAILED. (TaskId:0)

My script is very simple and is:

<Project ToolsVersion="3.5" DefaultTargets="Default" xmlns="">
    <Import Project="C:\ccviews\CorneyG_TC_DEV_REL_1\TCSYS01\TC\Source\BuildBTApps\BuildTasks\MSBuild.ExtensionPack\MSBuild.ExtensionPack.tasks"/>
    <Target Name="Test">
        <MSBuild.ExtensionPack.Xml.XmlTask TaskAction="Transform" XmlFile="BTSNTSvc.exe.config" XslTransformFile="Test.xslt">
            <Output PropertyName="Out" TaskParameter="Output"/>
        <Message Text="Transformed Xml: $(Out)"/>

Many thanks,  Geoff

Dec 16, 2009 at 4:30 PM

A fix is going in soon.

Could you attach your xslt to the workitem so I can test it.



Dec 22, 2009 at 12:31 PM

Thanks Mike, I will attatch my xslt.


Jan 4, 2010 at 10:17 AM


I am trying to build the code so that I can build the fix WorkItemId=4907
I have downloaded the code and built version Source\Releases\ which builds OK but when I run an MSBuild project that references the MSBuildExtensionPack dlls I get a runtime error indicating a strong name failure when an attempt is made to load the dll's (see error (1) below).
I have looked on the codeplex site but cannot find any specifc build documentation to help me resolve this.
I notice that the project signing properties are set to 'delay sign only' and if I uncheck that I get a build error  indicating a 'Cryptographic failure while signing assembly' because the 'Common\ExtensionPack.public.snk' is missing the private key needed for signing' (see error (2) below).

Sorry in advance if I am missing something obvious but I would appreciate some help to get the solution built and running so that I can implement the fix WorkItemId=4907.

1. Run time error
Building with tools version "3.5".
Target "Test: (TargetId:0)" in file "C:\ccviews\CorneyG_TC_DEV_REL_1\TCSYS01\TC\Source\BuildBTApps\MSBuildExtensionPack.Tes
t\Tpf.Config\Tpf.Config.proj" from project "C:\ccviews\CorneyG_TC_DEV_REL_1\TCSYS01\TC\Source\BuildBTApps\MSBuildExtensionP
C:\ccviews\CorneyG_TC_DEV_REL_1\TCSYS01\TC\Source\BuildBTApps\MSBuildExtensionPack.Test\Tpf.Config\Tpf.Config.proj(5,9): er
ror MSB4062: The "MSBuild.ExtensionPack.Xml.XmlTask" task could not be loaded from the assembly C:\ProgramDownloads\Codeple
x\MSBuildExtensionPack\Source\Releases\\Main3.5\BuildBinaries\MSBuild.ExtensionPack.dll. Could not load file or asse
mbly 'MSBuild.ExtensionPack, Version=, Culture=en-GB, PublicKeyToken=10d297e8e737fe34' or one of its dependencies. S
trong name validation failed. (Exception from HRESULT: 0x8013141A) Confirm that the <UsingTask> declaration is correct, and
 that the assembly and all its dependencies are available.
Done building target "Test" in project "Tpf.Config.proj" -- FAILED.: (TargetId:0)
Done Building Project "C:\ccviews\CorneyG_TC_DEV_REL_1\TCSYS01\TC\Source\BuildBTApps\MSBuildExtensionPack.Test\Tpf.Config\T
pf.Config.proj" (Test target(s)) -- FAILED.

Project Performance Summary:
      422 ms  C:\ccviews\CorneyG_TC_DEV_REL_1\TCSYS01\TC\Source\BuildBTApps\MSBuildExtensionPack.Test\Tpf.Config\Tpf.Config.
proj   1 calls
                422 ms  Test                                       1 calls

Target Performance Summary:
      344 ms  Test                                       1 calls


2. Builld Error
Error    1    Cryptographic failure while signing assembly 'C:\ProgramDownloads\Codeplex\MSBuildExtensionPack\Source\Releases\\Main3.5\Framework\obj\Debug\MSBuild.ExtensionPack.dll' -- 'Key file 'c:\ProgramDownloads\Codeplex\MSBuildExtensionPack\Source\Releases\\Main3.5\Common\ExtensionPack.public.snk' is missing the private key needed for signing'    Framework


Jan 4, 2010 at 10:42 AM

Hi, in the Help File you should find:

Developing With the Latest Sourcecode

To compile and use the solution, you may need to add skip verification for the public key. Run the following from a .net command prompt: sn.exe -Vr *,10d297e8e737fe34


Jan 4, 2010 at 12:52 PM


Many thanks for your help, I can build and run now.