Hi,
Below is the power shell script to Add and Install wsp.Just you need to update the correct path,name of solution package correctly(which is in bold),copy and paste the below script entirely after updating accordingly.After pressing enter just it will add and install the wsp solution
$snapin = Get-PSSnapin | Where-Object {$_.Name -eq 'Microsoft.SharePoint.Powershell'}
if ($snapin -eq $null)
{
Write-Host "Loading SharePoint Powershell Snap-in"
Add-PSSnapin "Microsoft.SharePoint.Powershell"
}
$SolutionName = "xxxx.wsp"
$SolutionPath = "path" + $SolutionName
write-host "Adding Solution: " $SolutionName
Add-SPSolution -LiteralPath $SolutionPath
$SolutionTocheck = Get-SPSolution -identity $SolutionName
write-host "Deploying Solution: " $SolutionName
if ($SolutionToCheck)
{
if ($SolutionToCheck.ContainsWebapplicationResource)
{
if ($SolutionToCheck.ContainsGlobalAssembly)
{
Install-SPSolution -identity $SolutionToCheck -allwebapplications -GacDeployment
}
else
{
Install-SPSolution -identity $SolutionToCheck -allwebapplications
}
}
else
{
if ($SolutionToCheck.ContainsGlobalAssembly)
{
Install-SPSolution -identity $SolutionToCheck -GacDeployment
}
else
{
Install-SPSolution -identity $SolutionToCheck
}
}
}
Friday, May 20, 2011
Monday, March 14, 2011
The Site URL property of the project does not contain a valid URL.To ensure that designers work as expected,set the Site URL property of the project t
Some times after opening the solution file,if you search any text you will get an error as below
To fix this error see the file which has cylinder symbol as below.
Just click on that file and press F4 key,you will get a window as below on right side
Enter any site URL.Now search any text now it won't throw any error.Good Luck
Wednesday, March 9, 2011
Copying Data from One site to Another Site
Hi,
Some times we may need to copy the pages from one site to another under the site collection.In SP 2010 its pretty simple,let me explain with clearly.For example there is site 'Latest News',you want to copy the pages from this site to other site called 'Latest News1'.For this navigation is as below
Click on 'Manage Content and structure' which is under 'Site Actions' as below

Through tree view on left side go to the site pages from where you want to copy.Select the pages,under Actions click 'Copy' as below

You will get the dialog box to select the destination as below

After copying it shows the copied page in the destination page as below

Select the destination and click OK.You will get the message as below
Some times we may need to copy the pages from one site to another under the site collection.In SP 2010 its pretty simple,let me explain with clearly.For example there is site 'Latest News',you want to copy the pages from this site to other site called 'Latest News1'.For this navigation is as below
Click on 'Manage Content and structure' which is under 'Site Actions' as below
Through tree view on left side go to the site pages from where you want to copy.Select the pages,under Actions click 'Copy' as below
You will get the dialog box to select the destination as below
After copying it shows the copied page in the destination page as below
Select the destination and click OK.You will get the message as below
Monday, February 21, 2011
Popup not working properly with jquery
We had a problem with popup.Problem was as soon as page loads if we click 'Edit' hyperlink popup was coming,but after clicking check box/button in any other custom webpart that are available on the page,after that if we click on 'Edit' link popup was not coming up.From my TL i came to know the problem as popup is getting called in document.ready function.After any post back this function doesn't get called,popup should not be called in the document.ready function.For fixing this issue i got some Knowledge by go throughing the below link
http://geekswithblogs.net/venkatx5/archive/2010/11/17/how-to-open-a-page-in-sharepoint-2010-dialog-framework.aspx
After go throughing the above link
I have added the below function in the popup.js(path: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\1033\STYLES\xx\xx-js)
//User Defined Function to Open Dialog Framework
function OpenDialog(strPageURL)
{
var dialogOptions = SP.UI.$create_DialogOptions();
dialogOptions.url = strPageURL;// URL of the Page
dialogOptions.width = 750; // Width of the Dialog
dialogOptions.height = 500; // Height of the Dialog
dialogOptions.dialogReturnValueCallback = Function.createDelegate( null, CloseCallback); // Function to capture dialog closed event
SP.UI.ModalDialog.showModalDialog(dialogOptions); // Open the Dialog
return false;
}
// Dialog close event capture function
function CloseCallback(strReturnValue, target)
{
if (strReturnValue === SP.UI.DialogResult.OK) // Perform action on Ok.
{
alert("User clicked Ok!");
}
if (strReturnValue === SP.UI.DialogResult.cancel) // Perform action on Cancel.
{
alert( "User clicked Cancel!");
}
}
After this please change the code as below in the xxItemStyle.xsl in the template My Selection
Javascript:OpenDialog(' ');void('');
Recommendation to test the issue
1)Comment the code as below in the popup.js file(path: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\1033\STYLES\xx\xx-js)
//$(document).ready(function () {
// $('a.poplight').each(function () {
// var href = $(this).attr('href')
// href = '#' + href.substr(href.indexOf('?'), href.length).replace(/#/, '')
// $(this).attr('href', href)
// });
//});
2)After doing above code changes please do iisreset,delete the cookies,history from Internet Options and close that browser
3)Open another browser and test the issue
http://geekswithblogs.net/venkatx5/archive/2010/11/17/how-to-open-a-page-in-sharepoint-2010-dialog-framework.aspx
After go throughing the above link
I have added the below function in the popup.js(path: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\1033\STYLES\xx\xx-js)
//User Defined Function to Open Dialog Framework
function OpenDialog(strPageURL)
{
var dialogOptions = SP.UI.$create_DialogOptions();
dialogOptions.url = strPageURL;// URL of the Page
dialogOptions.width = 750; // Width of the Dialog
dialogOptions.height = 500; // Height of the Dialog
dialogOptions.dialogReturnValueCallback = Function.createDelegate( null, CloseCallback); // Function to capture dialog closed event
SP.UI.ModalDialog.showModalDialog(dialogOptions); // Open the Dialog
return false;
}
// Dialog close event capture function
function CloseCallback(strReturnValue, target)
{
if (strReturnValue === SP.UI.DialogResult.OK) // Perform action on Ok.
{
alert("User clicked Ok!");
}
if (strReturnValue === SP.UI.DialogResult.cancel) // Perform action on Cancel.
{
alert( "User clicked Cancel!");
}
}
After this please change the code as below in the xxItemStyle.xsl in the template My Selection
Recommendation to test the issue
1)Comment the code as below in the popup.js file(path: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\1033\STYLES\xx\xx-js)
//$(document).ready(function () {
// $('a.poplight').each(function () {
// var href = $(this).attr('href')
// href = '#' + href.substr(href.indexOf('?'), href.length).replace(/#/, '')
// $(this).attr('href', href)
// });
//});
2)After doing above code changes please do iisreset,delete the cookies,history from Internet Options and close that browser
3)Open another browser and test the issue
Thursday, February 17, 2011
This solution contains resources scoped for a Web application and must be deployed to one or more Web applications.
The Managed Metadata Service or Connection is currently not available. The Application Pool or Managed Metadata Web Service may not have been started.
I got the below error when i was trying to create Managed Metadata Service
"The Managed Metadata Service or Connection is currently not available. The Application Pool or Managed Metadata Web Service may not have been started. Please Contact your Administrator."
Finally it got resolved after making changes as mentioned in the below blog
http://sensoft2000-sharepoint.blogspot.com/2010/10/error-security-token-service-is-not.html
"The Managed Metadata Service or Connection is currently not available. The Application Pool or Managed Metadata Web Service may not have been started. Please Contact your Administrator."
Finally it got resolved after making changes as mentioned in the below blog
http://sensoft2000-sharepoint.blogspot.com/2010/10/error-security-token-service-is-not.html
Wednesday, February 16, 2011
The document could not opened for editing.A Microsoft SharePoint Foundation compatible application could not found to edit the document
Hi,
I was getting error as below When I was trying to edit the master page

I have used the below option from Site Actions of the Site to edit the master page and then click 'All files' folder on left side and then select your master page. Then I am able to edit the master page of the site in designer
I was getting error as below When I was trying to edit the master page

I have used the below option from Site Actions of the Site to edit the master page and then click 'All files' folder on left side and then select your master page. Then I am able to edit the master page of the site in designer

Subscribe to:
Posts (Atom)