Wednesday, November 21, 2007 1:18 AM
Adding Columns to Lists in Sharepoint
Recently I have been creating site columns, content types and lists via CAML and web solution packages using VseWss 1.1 CTP.
If at list creation time you ever receive the following error in your sharepoint logs Failed to do column assignments for list then you should ensure that within your list schema.xml that you are not trying to set the ColName, this proved to be a major problem. I had not appreciated how Sharepoint structures it's database schema, the ColName attribute directly references a database table column which already exists; therefore you cannot change it, if you attempt to it will fail.
On a similar note if you ever experience a problem where during deployment you receive the error cannot find this file specified in the manifest file this is very confusing. The way I got rid of it was to delete all the generated folders/ files from the bin/debug folder and the pkg folder. Then I rebuilt and re-deployed the solution and it all worked. Most odd.....
However, after doing that it seems to have deleted all my content types! Maybe I should not have deleted the pkg folder contents..... hmmmmmm I suspect this is something to do with the fact that content types do not get displayed in the solution explorer, for some reason you can only see them in the WSP View and not in Solution Explorer which is incredibly irritating. It would also seem that unless you delete the generated files, what actually gets deployed is sometimes out of date; especially the list schema definitions.