When compiling a project in Visual Studio, I got the error message

"the exec task needs a command to execute"

, with no line number or anything.


Check the "build Events" in the project properties.
The error is caused by a newline character in the pre or post build text fields.

This applies to Visual Studio 2005, 2008 and 2010!

Tags: | Categories: IDE | Tips and tricks | Web development

When trying to deploy a SharePoint solution in Visual Studio 2010 folowing errors can occur:

Error 1 Error occurred in deployment step 'Retract Solution': The local SharePoint server is not available. Check that the server is running and connected to the SharePoint farm.

Solution: make the account you are running Visual Studio a member of the db_owner role on the sharepoint_config and sharepoint_admin databases.


Error 1 Error occurred in deployment step 'Activate Features': Cannot start service SPUserCodeV4 on computer '...'.

Solution: go into Central Administration, select System Settings, select Manage services on server. Find the 'Microsoft SharePoint Foundation Sandbox Code Service' and click Start.

Tags: , | Categories: IDE | SharePoint Development | Tips and tricks