Can you build a SharePoint Project without Visual Studio 2010/2012 being installed on the machine you are trying build it on using PowerShell?

I have a PowerShell script the is working great. It calls up SlikSVN hits my repository checks the code I want out and builds it using MSBuild.exe. Granted that this machine has Visual Studio 2012 installed on it and SharePoint Foundation 2010 as well. When I try to run the script on a machine with just SharePoint Foundation 2010 installed I get a few errors. I was able to suppress some by copying varying folders and files over, but now I am stuck with an error I cannot resolve.

Error in powershell:

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\SharePointTools\Microsoft.VisualStudio.SharePoint.targets(4 80,5): error MSB4066: The attribute "BeforeTargets" in element is unrecognized.

After I installed the .Net 4 Framework and Win SDK I get this error. I cannot remember if I copied this folder: (C:\Program Files(x86)\MSBuild\Microsoft\VisualStudio\v10.0\SharePointTools) from my Dev machine or not. It seems like I need to some how register the DLLs but I tried Regsvr32.exe with no luck.

Updated error:

    C:\Program Files\(x86)\MSBuild\Microsoft\VisualStudio\v10.0\SharePointTools\
    52,5): error MSB4062: The "SetPackagingProperties" task could not be loaded from
    the assembly C:\Program Files (x86)\MS Build\Microsoft\VisualStudio\v10.0\
    Could not load file or assembly 'Microsoft.VisualStudio.SharePoint.Tasks,
    Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
    or one of its dependencies. Strong name validation failed. (Exception from HRESULT:
    0x8013141A) Confirm that the <Using Task> declaration is correct, that the assembly
    and all its dependencies are available, and that the task contains a public class
    that implements Microsoft.Build.Framework.ITask.

1 Answer 1


All you need to install is the .NET Framework SDK, not only the client profile. For more info check the following Stack Overflow answers:



  • I will give this a shot and let you know how it goes. Thanks
    – JTime
    Jan 22, 2013 at 14:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.