Build/Test Issues

Errors building with SlowCheetah

Started by james on 11,873 views

Hi,

We recently updated to SlowCheetah 2.5.8 from 2.5.5.

The project builds fine in VS 2012 and VS 2013 but I'm getting an error in NCrunch (1) saying it can't find Microsoft.Web.XmlTransform.dll 1.2.0.0. The dll exists in the SlowCheetah.2.5.8/tools folder with reported version 1.2.31129.0.

I then closed VS, deleted the 2 SlowCheetah packages, loaded the solution again and built. While building, the 2.5.8 package was downloaded, but not the 2.5.5 package (as nothing references it now). The build succeeded. Now NCrunch fails to load ALL projects (2) saying it can't find 2.5.5. I've checked every line of every file (git grep "2\.5\.5") and nothing is referencing SlowCheetah 2.5.5. I've tried deleting the _NCrunch folder and reinitializing NCrunch but nothing seems to work.

See below for the errors.

Thanks for any help

James

1) Error if both packages are installed, only on projects which reference SlowCheetah 2.5.8
..\packages\SlowCheetah.2.5.8\tools\SlowCheetah.Transforms.targets (104)#0: The "SlowCheetah.Xdt.TransformXml" task failed unexpectedly.
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Web.XmlTransform, Version=1.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.Web.XmlTransform, Version=1.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   at SlowCheetah.Xdt.TransformXml.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext()

=== Pre-bind state information ===
LOG: DisplayName = Microsoft.Web.XmlTransform, Version=1.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
 (Fully-specified)
LOG: Appbase = file:///C:/Program Files (x86)/Microsoft Visual Studio 12.0/Common7/IDE/Extensions/Remco Software/NCrunch for Visual Studio 2013
LOG: DEVPATH = C:\ProgramData\Red Gate\.NET Reflector\DevPath
LOG: Initial PrivatePath = NULL
Calling assembly : SlowCheetah.Xdt, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in LoadFrom load context.
WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load().
LOG: Using application configuration file: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Remco Software\NCrunch for Visual Studio 2013\nCrunch.build.4.0.config
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.Web.XmlTransform, Version=1.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 12.0/Common7/IDE/Extensions/Remco Software/NCrunch for Visual Studio 2013/Microsoft.Web.XmlTransform.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 12.0/Common7/IDE/Extensions/Remco Software/NCrunch for Visual Studio 2013/Microsoft.Web.XmlTransform/Microsoft.Web.XmlTransform.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 12.0/Common7/IDE/Extensions/Remco Software/NCrunch for Visual Studio 2013/Microsoft.Web.XmlTransform.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 12.0/Common7/IDE/Extensions/Remco Software/NCrunch for Visual Studio 2013/Microsoft.Web.XmlTransform/Microsoft.Web.XmlTransform.EXE.
LOG: Attempting download of new URL file:///C:/Users/James.Foster.THAP/AppData/Local/NCrunch/4828/36/packages/SlowCheetah.2.5.8/tools/Microsoft.Web.XmlTransform.DLL.
LOG: Attempting download of new URL file:///C:/Users/James.Foster.THAP/AppData/Local/NCrunch/4828/36/packages/SlowCheetah.2.5.8/tools/Microsoft.Web.XmlTransform/Microsoft.Web.XmlTransform.DLL.
LOG: Attempting download of new URL file:///C:/Users/James.Foster.THAP/AppData/Local/NCrunch/4828/36/packages/SlowCheetah.2.5.8/tools/Microsoft.Web.XmlTransform.EXE.
LOG: Attempting download of new URL file:///C:/Users/James.Foster.THAP/AppData/Local/NCrunch/4828/36/packages/SlowCheetah.2.5.8/tools/Microsoft.Web.XmlTransform/Microsoft.Web.XmlTransform.EXE.


2) Error if 2.5.8 is present but 2.5.5 isn't, on ALL projects
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\dev\thap\CTS\clickscotravelsystem\src\packages\SlowCheetah.2.5.5\tools'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileSystemEnumerableIterator`1.CommonInit()
   at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
   at System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption)
   at nCrunch.Core.ComponentLoader.WildcardFileResolver.ResolveFiles(String fileSpec)
   at nCrunch.Core.ComponentLoader.SnapshotComponentFactory.#=qWi8MtHMwxB6LHbwtcYsKsiBezVd85r4NgPVkhCX5f0g=(List`1 #=qdvV5w1mTJXX4WtZ$tCSJzw==, List`1 #=qLND2qpR_CGvESwK_A4ToadhCbxvTh21zdNbyVmVFQFE=, String #=qfySYWViq5jY00cxgplIKpQ==)
   at nCrunch.Core.ComponentLoader.SnapshotComponentFactory.#=qBJvDj8HG11ShPiSCtAY2ZQzyeRg5yvx3fzN2XArMsQA=(String[] #=qmoKS$O8_bR8dCeeat_DJPyj8YGcGHOpHgz6fWmI8NoCmIDhF4C4XpMtKinWlHA5e)
   at nCrunch.Core.ComponentLoader.SnapshotComponentFactory.CreateSnapshotComponentFromXml(String projectFilePath, String projectXml, String solutionFilePath, String[] additionalFilesToIncludeAtSolutionLevel, Boolean isLoadedFromFile)
Hi James -

The update to the new version of SlowCheetah has changed the name of the directory NCrunch is referencing in order to find SlowCheetah's build tasks. You need to align your NCrunch configuration with the new directory name. Have a look at the Additional files to include setting at both solution and project level, and make sure this is in sync with the updated version number.


That was it. Thanks.

I should check the ncrunch files into source control. Not everyone on the project uses it tho so I haven't needed to. If they were it would have shown up in git grep :(

Thanks again
Great to hear. I definitely recommend placing the NCrunch config files in source control. They may only be noise to other team members, but it's important that these settings are versioned correctly alongside your code. You can find more information about which files to place in source control on this documentation page.


Cheers,

Remco
That's a good to know about checking those NCrunch files in :-)

If you don't want to check those files in what I do in the case of SlowCheetah on my team project is just modify the project file
I only use transformations in my release builds from TFS so this works for me

<PropertyGroup Label="SlowCheetah" Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">

But I'm pretty sure you could do this
<PropertyGroup Label="SlowCheetah" Condition=" '$(NCrunch)' != '1' ">

And then it'll work as well
That seems like a good move.

I've checked the nchrunch files into source control but they will still need updating every time we reference a new version of SlowCheetah.

Your suggestion would avoid that.

Thanks

Post a reply

Log in to reply.