Dienstag, 13. April 2010

FileNotFoundException when using SPMetal

If you are working with SharePoint 2010 and using SPMetal to access list data in your site, you might encounter the error:

System.IO.FileNotFoundException: The Web application at [SITE] could not be found. Verify that you have typed the URL correctly
I created a code library project to include the SPMetal output file and do some business logic when accessing the SharePoint list data.

I want to test that code from Visual Studio, so I created a test project. Unfortunately the test projects run with the .net Framework 4 and you are not able to change that in the project properties.

So I used a console application with .net Framework 3.5 and I had to change the Target CPU to x64 (or you can use AnyCPU) because SharePoint is build only for 64 bit platforms.

Freitag, 9. April 2010

BCS: Association Error

You are developing an association between BCS entities. You encouner an error like:
Exception handed to HandleRuntimeException.HandleException System.InvalidOperationException: The Association with Name 'SomethingAssociationNavigator' expects '1' EntityInstances (External Items) as input, but '0' were supplied.
Maybe you have defined the finder method of the entity but you missed the specific finder method or you defined a specific finder method but it has a faulty parameter definition.