This project is read-only.

Error message on deploy

Jan 23, 2013 at 9:01 AM
Edited Jan 23, 2013 at 9:02 AM

Hi,

Great work! I just recently started to using this script to deploy our solutions, and it is working very good.

However I found some issues, that hopefully you could look into.

SPSD_Deployment.ps1 line 1243:

$webApps = Get-SPWebApplication -IncludeCentralAdministration | Where-Object { $Urls -imatch $_.Url.TrimEnd("/")}
Log -Message ("Deploying to '"+([string]::Join("', '",$webApps.Url))+"'...") -Type $SPSD.LogTypes.Verbose -NoNewline
# using Deploy Method instead of Cmdlet to deploy to multiple WebApps
$solution.Deploy([System.DateTime]::Now - [System.TimeSpan]::FromDays(1), $AllowGACDeployment, $webApps, $force);
Log -Message "Done" -Type $SPSD.LogTypes.Verbose -Success -NoIndent


I had to change this to

if ($SPSD.InstalledVersion -eq 14){
    Install-SPSolution -Identity $solutionName -webapplication $Urls -CASPolicies:$AllowCASPolicies �GACDeployment:$AllowGACDeployment -force:$force
}
else if ($SPSD.InstalledVersion -eq 15){
    Install-SPSolution -Identity $solutionName -webapplication $Urls -FullTrustBinDeployment:$AllowFullTrustBinDeployment -GACDeployment:$AllowGACDeployment -force:$force
}

Or else deployment wouldn't work. I either got an error saying "Exception calling "Join" With "2" argument(s): "Value cannot be null. Parameter name: value"" or "Cannot find an overload for "Deploy" and the argument Count: "4"".

I'm deploying my solutions to SharePoint 2010.

SPSD_Utilities.ps1 line 372 

$allExternalNodes.Node | ForEach-Object{
 	$newNode = LoadNodeFromFile -node $_ -srcFile $envFile -filterAttribute "ID"
	if(!$newNode){
		$_.RemoveAttribute("FilePath")
	}
}

I had to change this to

$allExternalNodes | ForEach-Object{
	$newNode = LoadNodeFromFile -node $_.Node -srcFile $envFile -filterAttribute "ID"
	if(!$newNode){
		$_.RemoveAttribute("FilePath")
	}
}

Or else I would get an error saying $_ was null. 

Because we are integrating this script into a TFS build to automatically deploy to a lab server, it would be nice to have the path to the solutions folder as an optional parameter that could override the default one. Our drop folder for the wsp's will not be the "Solutions" folder.

When I made these changes the solutions where successfully deployed.

Is there any plan to add support for feature activation and upgrade in the future? I know I could add this to AfterDeploy method, but it would be nice to have this in the enviorment file as well.

Keep up the good work!
Thank's in advance.

Tommy

 

Jan 23, 2013 at 12:17 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Jan 23, 2013 at 12:22 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Jan 23, 2013 at 12:24 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Jan 23, 2013 at 12:35 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Jan 23, 2013 at 12:37 PM

Hi Tommy!

Thanks for your feedback! I created some work items, so that it is easier to track the issues.
I will check them out shortly and provide a new build which includes the fixes!
Adding a solutions folder parameter is not a big deal and will come too in the next build.

Regarding your question about feature activation:
Yes, absolutely! The plan for the next big release is to be able to define structures with site collections, subsites, lists etc. This will include also the ability to activate/deactivate features.

The main advantage will be that the structures can be reused with different urls, and that they will be build incrementally, meaning that if they are already there only the still missing actions will be performed.

I am already in the middle of the development of that feature, but it will take some time as I want to provide also an easy way in the environment file editor to create and manage these structures.

Also I have some other OpenSource projects to maintain ;-) i.e. http://spsf.codeplex.com

Regards

Matthias

Feb 1, 2013 at 5:02 PM
Hi Tommy,

all of your bugs and feature request are done apart from the functionality to activate features.

You can now pass the solution folder as an additional parameter to SPSD_Main.ps1
Either update the batch file(s) or pass it directly through PowerShell

The paramater takes both absolute paths and relative paths to the SPSD root folder.

Regards Matthias