Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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\
    Microsoft.VisualStudio.SharePoint.targets(3
    52,5): error MSB4062: The "SetPackagingProperties" task could not be loaded from
    the assembly C:\Program Files (x86)\MS Build\Microsoft\VisualStudio\v10.0\
    SharePointTools\Microsoft.VisualStudio.SharePoint.Tasks.dll.
    Could not load file or assembly 'Microsoft.VisualStudio.SharePoint.Tasks,
    Version=11.0.0.0, 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.
share|improve this question

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:

http://stackoverflow.com/questions/9558138/net-framework-installation-include-msbuild

http://stackoverflow.com/questions/2567018/installing-msbuild-4-0-without-visual-studio-2010

share|improve this answer
    
I will give this a shot and let you know how it goes. Thanks –  JTime Jan 22 '13 at 14:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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