Exception when connect to local SharePoint through "Import Site Columns"

Oct 9, 2010 at 9:21 PM
Edited Oct 9, 2010 at 9:22 PM

I'm using VS2010+SPSF2010 3.0.1 to create a SharePoint 2007 application and met a problem.

I want to import some site columns from SharePoint site to my Visual Studio project, so I used the "Import Site Columns" project item provided by SPSF. In the "Import Site Column" wizard window, after choose a parent feature for the site columns, it lets me enter the URL of SharePoint site collection. But when I click the "Load Site Column" button, a "SharePointBridge has stoped working" error prompt window pops up after a while.

I tried click the drop-down icon of URL textbox (I guess it will load all site collections into this drop-down list), same error prompt window pops up. But this time, it providers some detail debug information:


-----System.Runtime.Remoting.RemotingException: Failed to read from an IPC Port: The pipe has been ended.
Server stack trace: 
   at System.Runtime.Remoting.Channels.Ipc.IpcPort.Read(Byte[] data, Int32 offset, Int32 length)
   at System.Runtime.Remoting.Channels.Ipc.PipeStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   at System.Runtime.Remoting.Channels.SocketHandler.ReadFromSocket(Byte[] buffer, Int32 offset, Int32 count)
   at System.Runtime.Remoting.Channels.SocketHandler.Read(Byte[] buffer, Int32 offset, Int32 count)
   at System.Runtime.Remoting.Channels.SocketHandler.ReadAndMatchFourBytes(Byte[] buffer)
   at System.Runtime.Remoting.Channels.Tcp.TcpSocketHandler.ReadAndMatchPreamble()
   at System.Runtime.Remoting.Channels.Tcp.TcpSocketHandler.ReadVersionAndOperation(UInt16& operation)
   at System.Runtime.Remoting.Channels.Ipc.IpcClientHandler.ReadHeaders()
   at System.Runtime.Remoting.Channels.Ipc.IpcClientTransportSink.ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, ITransportHeaders& responseHeaders, Stream& responseStream)
   at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg)


Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at SharePointSoftwareFactory.SharePointBridge.SharePointRemoteObject.GetAllSiteCollections()
   at SharePointSoftwareFactory.Library.SharePointBrigdeHelper.GetAllSiteCollections()

---------------------------OK   ---------------------------

I'm using Windows 7 as my dev machine, and installed SharePoint Server 2007 on this local machine (through WSSVista tool). I tried turn off Windows Firewall but no lucky.

Hope anyone can give some help, thanks!

Coordinator
Oct 10, 2010 at 12:42 PM

Hi kaneboy,

Thank you for your support. I will check this and will provide a fix.

Sorry for any inconveniences. We are currently testing all sorts of combinations between SharePoint 2007 vs. 2007, VS 2010 vs. 2008, 32bit vs. 64bit, W2008 vs. W2003 vs. W7 for the final release of SPSF and we are very thankful for any help.

 

Coordinator
Oct 10, 2010 at 10:37 PM

Hi kaneboy,

I was able to reproduce the problem and fixed it.

The problem was that our SharePointBridge references several assemblies from SharePoint 14 and on a system with SharePoint 2007 we redirect the dependencies via a app.config to the 12.0 version of those assemblies. This redirect was not completely reliable but this is fixed now.

Please download the current release 3.0.2 (still beta).

Thank you for telling us about the problem.

Oct 11, 2010 at 3:58 AM

@torman119:

Thanks much for the response and quick fix! SPSF is a so cool tool for building SharePoint 2007/2010 application.

Oct 11, 2010 at 5:51 AM

Sorry but I met another problem when importing Site Columns.

I installed updated 3.0.2 version and tried again. Still in the "Import Site Columns" wizard window, after I filled all required information and click "Finish" button, the wizard window closes and SPSF generates a "dummy.txt" file in VS2010 project. But after that, VS2010 shows an error message window and the site column isn't be imported successfully. I tried do this in Visual Studio 2008 (also with SPSF 2010 3.0.2), also get the same error.

The detail error message from VS2008: (seems like the error message contains more details than VS2010 :)

Microsoft.Practices.RecipeFramework.ActionExecutionException: An exception occurred during the binding of reference or execution of recipe SiteColumnImport. Error was: Action GenerateElements failed to execute:Exception of type 'Microsoft.Practices.RecipeFramework.VisualStudio.Library.Templates.TemplateException' was thrown.. You can remove the reference to this recipe through the Guidance Package Manager. ---> Compiling transformation: The name 'SiteColumnSchema' does not exist in the current context----------------------------------------------------------------------------------------------------Compiling transformation: The name 'SiteColumnGroup' does not exist in the current context----------------------------------------------------------------------------------------------------Compiling transformation: The name 'SiteColumnDisplayName' does not exist in the current context----------------------------------------------------------------------------------------------------Compiling transformation: The name 'SiteColumnDescription' does not exist in the current context----------------------------------------------------------------------------------------------------Compiling transformation: The name 'AutoCreateResxFiles' does not exist in the current context----------------------------------------------------------------------------------------------------Compiling transformation: The name 'ResourceFilename' does not exist in the current context----------------------------------------------------------------------------------------------------Compiling transformation: The name 'ResourceKeyPrefix' does not exist in the current context----------------------------------------------------------------------------------------------------Compiling transformation: The name 'ResourceFilename' does not exist in the current context----------------------------------------------------------------------------------------------------Compiling transformation: The name 'ResourceKeyPrefix' does not exist in the current context----------------------------------------------------------------------------------------------------Compiling transformation: The name 'ResourceFilename' does not exist in the current context----------------------------------------------------------------------------------------------------Compiling transformation: The name 'ResourceKeyPrefix' does not exist in the current context----------------------------------------------------------------------------------------------------Compiling transformation: The name 'SiteColumnID' does not exist in the current context----------------------------------------------------------------------------------------------------Compiling transformation: The name 'SiteColumnName' does not exist in the current context----------------------------------------------------------------------------------------------------Compiling transformation: The name 'SiteColumnName' does not exist in the current context----------------------------------------------------------------------------------------------------Compiling transformation: The type or namespace name 'CodeDom' does not exist in the namespace 'System' (are you missing an assembly reference?)----------------------------------------------------------------------------------------------------Compiling transformation: The type or namespace name 'CodeDom' does not exist in the namespace 'System' (are you missing an assembly reference?)----------------------------------------------------------------------------------------------------Compiling transformation: The type 'System.CodeDom.Compiler.CompilerErrorCollection' is defined in an assembly that is not referenced. You must add a reference to assembly 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.----------------------------------------------------------------------------------------------------Compiling transformation: 'System.CodeDom.Compiler.CompilerErrorCollection' does not contain a definition for 'Add'----------------------------------------------------------------------------------------------------
   --- End of inner exception stack trace ---   at Microsoft.Practices.RecipeFramework.Recipe.UndoExecutedActionsAndRethrow(Exception ex)   at Microsoft.Practices.RecipeFramework.Recipe.ExecuteActions(IDictionaryService readOnlyArguments, IDictionaryService arguments, ITypeResolutionService resolution)   at Microsoft.Practices.RecipeFramework.Recipe.Execute(Boolean allowSuspend)   at Microsoft.Practices.RecipeFramework.GuidancePackage.Execute(String recipe, IAssetReference reference, IDictionary arguments)   at Microsoft.Practices.RecipeFramework.GuidancePackage.ExecuteFromTemplate(String recipe, IDictionary arguments)   at Microsoft.Practices.RecipeFramework.VisualStudio.Templates.UnfoldTemplate.ExecuteRecipe(Boolean executeActions)   at Microsoft.Practices.RecipeFramework.VisualStudio.Templates.UnfoldTemplate.RunFinished()

The detail error message from VS2010:

Microsoft.Practices.RecipeFramework.ActionExecutionException: An exception occurred during the binding of reference or execution of recipe SiteColumnImport. Error was: Action GenerateElements failed to execute:Exception of type 'Microsoft.Practices.RecipeFramework.VisualStudio.Library.Templates.TemplateException' was thrown.. You can remove the reference to this recipe through the Guidance Package Manager. ---> Microsoft.Practices.RecipeFramework.VisualStudio.Library.Templates.TemplateException: Exception of type 'Microsoft.Practices.RecipeFramework.VisualStudio.Library.Templates.TemplateException' was thrown.   at Microsoft.Practices.RecipeFramework.VisualStudio.Library.Templates.T4Action.Render(String templateCode, String templateFile)   at Microsoft.Practices.RecipeFramework.VisualStudio.Library.Templates.TextTemplateAction.Execute()   at Microsoft.Practices.RecipeFramework.Recipe.Microsoft.Practices.RecipeFramework.Services.IActionExecutionService.Execute(String actionName, Dictionary`2 inputValues)   at Microsoft.Practices.RecipeFramework.Recipe.Microsoft.Practices.RecipeFramework.Services.IActionExecutionService.Execute(String actionName)   at SharePointSoftwareFactory.Library.Coordinators.ConditionalCoordinator.Run(Dictionary`2 declaredActions, XmlElement coordinationData)   at Microsoft.Practices.RecipeFramework.Recipe.ExecuteActions(IDictionaryService readOnlyArguments, IDictionaryService arguments, ITypeResolutionService resolution)   --- End of inner exception stack trace ---   at Microsoft.Practices.RecipeFramework.Recipe.UndoExecutedActionsAndRethrow(Exception ex)   at Microsoft.Practices.RecipeFramework.Recipe.ExecuteActions(IDictionaryService readOnlyArguments, IDictionaryService arguments, ITypeResolutionService resolution)   at Microsoft.Practices.RecipeFramework.Recipe.Execute(Boolean allowSuspend)   at Microsoft.Practices.RecipeFramework.GuidancePackage.Execute(String recipe, IAssetReference reference, IDictionary arguments)   at Microsoft.Practices.RecipeFramework.VisualStudio.Templates.UnfoldTemplate.ExecuteRecipe(Boolean executeActions)   at Microsoft.Practices.RecipeFramework.VisualStudio.Templates.UnfoldTemplate.RunFinished()

Coordinator
Oct 11, 2010 at 10:24 AM

Hi kaneboy, I reproduced the issue and (hopefully) fixed it. I replaced the current download 3.0.2 with this minor fix.

Oct 11, 2010 at 4:32 PM

Yeah! It works now! Thanks!