Say What?

Happy New Year!!..

So, We have an inherited VB website that we just bought under our own processes and controls. We like to keep things tidy and as a result of this decided to place the website under a Visual Studio solution within it’s own ‘website project’ (not application). There are several other projects associated with the application and as such it makes sense to store them all within one solution, this way anyone who elects to come ‘caped like’ to the rescue does not have to search disparate areas within the whole organisation for the source. All good.

I was then tasked with plugging the solution into our internal build processes (we use CCNet) and after a little scratting around to find how you build a web site  I was hopeful that my work was nearly at end. Upon kicking the automated build off all seemed to go without issue until I got  the following rather spurious error whist trying to ‘Publish’ the website :-

“Data at the root level is invalid. Line 1, position 1.”

Odd, the project published without issue on my machine, why should the centralised build machine be any different? I then tried to publish manually on the build server but studio also returned then same error, upon following the error link I was taken to a supposed web config file that was not in XML format and instead contained data like this:-

vti_encoding:SR|utf8-nl
vti_author:SR|AA-SPRING\\Tomt
vti_modifiedby:SR|AA-SPRING\\administrator
vti_timelastmodified:TR|25 Feb 2013 14:01:27 -0000
vti_timecreated:TR|22 Jan 2008 10:41:43 -0000
vti_lineageid:SR|{6CDADAD6-78EB-4125-B4E7-948810ABACD5}
vti_extenderversion:SR|12.0.0.6500
vti_backlinkinfo:VX|
vti_nexttolasttimemodified:TW|14 Feb 2008 11:22:56 -0000
vti_cacheddtm:TX|25 Feb 2013 14:01:27 -0000
vti_filesize:IR|8988

The web config was also not in the usual place instead being in a _vti_cnf directory underlying my website project folder. I investigated a few forums and discovered that these folders/files seem to be associated with the front page application which I have never utilised. I therefore determined that these folders could be safely deleted, I always have SVN I can fall back on if things get too hairy!

The cure it seems is to go through each of my projects directories (including sub directories)and ensure that any folder starting the text ‘_vti_’ are removed alomng with it’s contents. In my case these included:-

  • ‘_vti_pvt’
  • ‘_vti_cnf’
  • ‘_vti_script’
  • ‘_vti_text’

I subsequently restarted the CCNet build and hey presto, my websites build and publish as expected. I’m still at a loss as to :-

  1. How the _vti_ folders got there, I did have another guy work on the project and maybe he pressed an interesting button, I don’t know…
  2. Why one version of Visual studio 2008 chose to ignore the files and yet another version went belly up at the sight of the them.

Some victories need further explanation so I await it.. In the meantime I do however hope that my solution can help someone.

Advertisements