Share via


Exercise 3: Upgrading the Feature

  1. Start the PowerShell editing environment by selecting All Programs » Accessories » Windows PowerShell » Windows PowerShell ISE.
  2. In the PowerShell Editor, add the following code to upgrade the solution. Be sure to edit the file path to match your environment. You’ll find the FinancialDocumentsLibrary_V2.wsp solution package in the bin\debug folder of the Visual Studio project. (Note: One easy way to find this location is to go to your Visual Studio Project and right click on the Project in the Solution Explorer and select Open Folder in Windows Explorer.)

    # check to ensure Microsoft.SharePoint.PowerShell is loaded $snapin = Get-PSSnapin | Where-Object {$_.Name -eq 'Microsoft.SharePoint.Powershell'} if ($snapin -eq $null) { Write-Host "Loading SharePoint Powershell Snapin" Add-PSSnapin "Microsoft.SharePoint.Powershell" } $path = "[Your complete path to the WSP file]" $new = "FinancialDocumentsLibrary_v2.wsp" $old = "FinancialDocumentsLibrary.wsp" Update-SPSolution -LiteralPath ($path + $new) -Identity $old -GACDeployment
  3. Run the script.
  4. Now open a command prompt and execute the following command:

    “C:\program files\common files\microsoft shared\web server extensions\14\bin\psconfig.exe" -cmd upgrade -force -wait -inplace b2b
  5. Return to your list in the internet browser and see the new column added.