How to deploy and configure a web part include solution package in sharepoint 2013? - project

I had deployed web part and post this ...
This isn`t question, If anybody require ,please use following the way. I think that it will be usefully anybody..thanks.
Configure and deploy Web Parts include solution package in SharePoint 2013
1. Deploy solution packages (SharePoint Server 2013)
A. Adding a solution package
Before you can deploy a solution package, you must add it to the solution database of a SharePoint Server farm.
Important
You must be a member of the Administrators group on any computer on which you run Windows PowerShell.
To import a solution package by using Windows PowerShell
1. On the Start menu, click All Programs.
2. Click Microsoft SharePoint 2013 Products.
3. Click SharePoint 2013 Management Shell as an administrator.
4. At the Windows PowerShell command prompt, type the following command:
5. Add-SPSolution -LiteralPath
Ex: add-spsolution -literalpath “D:\Debug\F21WebPart.wsp"
The solution is added to the farm's solution store. To use the solution, follow the procedure in the next section in this article.
Quick Overview
Here’s a quick overview of what we’ve learned with a few more tidbit commands you’ll probably need along the way:
• Add Solution
Add-SPSolution c:.wsp
• Deploy/Install Solution
Install-SPSolution –Identity .wsp –WebApplication http:// -GACDeployment
• Update Solution
Update-SPSolution –Identity .wsp –LiteralPath c:.wsp –GACDeployment
• Uninstall Solution
Uninstall-SPSolution –Identity .wsp –WebApplication http://
• Remove Solution
Remove-SPSolution –Identity .wsp
B. Deploying a solution package
You can deploy imported solutions by using the Central Administration Web site or by using Windows PowerShell. After a solution has been added to the solution store by using the Windows PowerShell Add-SPSolution cmdlet, it must be deployed to a site before it can be accessed.
Note
You cannot add a solution to the solution store by using the Solution Management page in Central Administration.
The following procedures show how to deploy an imported solution to a site in the farm by using either the Central Administration Web site or Windows PowerShell.
To deploy a solution by using Central Administration
1. On the Central Administration Home page, click System Settings.
2. In the Farm Management section, click Manage farm solutions.
3. On the Solution Management page, click the solution that you want to deploy.
4. On the Solution Properties page, click Deploy Solution.
5. On the Deploy Solution page, in the Deploy When section, select one of the following:
o Now
o At a specified time. If you select this option, specify a time by using the date and time boxes. We recommend that you select a time when the load on the destination servers is low.
6. In the Deploy To? section, in the A specific web application list, click either All web applications or select a specific Web application.
7. Click OK.
To deploy a solution package to a single Web application by using Windows PowerShell
1. On the Start menu, click All Programs.
2. Click Microsoft SharePoint 2013 Products.
3. Click SharePoint 2013 Management Shell.
4. At the Windows PowerShell command prompt as an administrator , type the following command:
5. Install-SPSolution -Identity -WebApplication
Where:
o is the name of the solution.
o is the URL of the Web application to which you want to deploy the imported solution.
Ex: add-spsolution -literalpath “D:\Debug\F21WebPart.wsp" –WebApplication “http:///pwa/”
By default, the solution is immediately deployed. You can also schedule the deployment by using the time parameter.
To deploy a solution package to all Web applications by using Windows PowerShell
1. On the Start menu, click All Programs.
2. Click Microsoft SharePoint 2013 Products.
3. Click SharePoint 2013 Management Shell.
4. At the Windows PowerShell command prompt as an administrator, type the following command:
5. Install-SPSolution -Identity -AllWebApplications -time -GACDeployment -CASPolicies
Where:
o GACDeployment is the parameter that enables SharePoint Server 2013 to deploy the assemblies in the global assembly cache.
o CASPolicies enables the creation of a custom code access security (CAS) policy file and the activation of it in the Web.config file of the targeted site collection.
The solution is immediately deployed by default. You can also schedule the deployment by using the time parameter.
C. Verify the deployed Global Assemble
1. On the Start screen, press CTRL + TAB to open the Apps list and then press V. The list will include all installed Visual Studio command prompts. (To open the Start screen, press the Windows logo key on your keyboard.)
2. Choose the Developer Command Prompt (or the command prompt you want to use).
3. Type the following command. For more detail, look gacutil
gacutil /l F21WebPart
• Please remember the publickeyToken in gacutil window.
2. Deploy and configure a Web Part
To manually deploy and configure a Web Part
1. Verify that you have the following administrative credentials:
o You must be a member of the local Administrators group on the server hostingSharePoint products.
2. Copy the .dll assembly in the project's Bin directory to the Bin directory in your Web application root directory. For example: C:\inetpub\wwwroot\wss\VirtualDirectories\80\bin.
3. Locate the Web.config file in your application root directory and open it for editing.
4. Add the following safe-control entry for your custom assembly to the Web.config file:
5. , Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" Namespace="" TypeName="*" Safe="True" AllowRemoteDesigner="True"/>
Ex:
Please use the PublicKeyToken you remembered in gacutil window
Where:
1. is the name of the Web Part that is being deployed.
2. is the namespace that is associated with your Web Part.
3. Add a Component to the Web Part Gallery
Every Web Part should have a .webpart file, which is an XML file that describes the Web Part. The .webpart file also causes your Web Part to appear in the Web Part gallery. The following procedure is the easiest way to create a .webpart file after you deploy your Web Part and register it in the Safe Control list.
To add a component to the Web Part gallery
1. Verify that you have the following administrative credentials:
o You must be a member of the Farm Administrators group.
2. To create a .webpart file, navigate to http:///_layouts/newdwp.aspx, where is the name of the server on which your SharePoint site is deployed.
Ex.http:///pwa/_layouts/newdwp.aspx
3. Select the check box next to ..
4. Click Populate Gallery to add the YourWebPartName Web Part to the Team Site gallery.
5. In the Web Part gallery, select Edit to edit the Web Part, and then click Import.
You are prompted to specify a location for the .webpart file. You can also export ASP.NET Web Parts and import them to SharePoint sites.

Also you can update the existing wsp with below management shell command-
Update-SPSolution -Identity "xyz.wsp" -LiteralPath "C:\xyz.wsp" -GACDeployment
replace xyz with the name of your wsp

Related

Using nuget packages on machine with no internet

I have a .net core intranet web app which uses certain nuget packages. I have two machines, my local computer with internet and a test machine with no connection to outside internet. The app works fine on my computer.
All the nuget packages are locally stored and referred by the web app.
When I try to build the app on test machine, I am getting the following error
C:\Program Files\dotnet\sdk\3.0.100\Nuget.targets(123,5): error : Unable to load the service index for source https://api.nuget.org/v3/index.json
What process is actually looking for service index from outside url? Of course it cannot find because there is no internet. No proxies involved so nothing to put in nuget.config
All the packages are locally stored. What can I do to resolve this issue?
Thank you
You’ll need a local folder to keep all your local NuGet packages..
Then download the NuGet packages you wish to be able to use offline into this folder. Packages can be downloaded from nuget.org.
Once you are logged in, search for the packages you require and click the ‘Download’ link in the left hand menu of each.
Once you have successfully downloaded the .nupkg files you require into your local repository folder, head into Visual Studio and open the NuGet Settings dialog via Tools > NuGet Package Manager > Package Manager Settings. Click the Package Sources tab within the settings dialog, followed by the ‘plus’ icon in the top left to add a new package source.
Enter the Name and Source of your local repository. The name can be any string and will be the name displayed in the NuGet Package Manager within Visual Studio.
Now that you have added the local package source, you will be able
to use your offline local repository from within Visual Studio in
the usual way, either via the Console or via the Package Dialog, by
selecting it from the Package Source menu, without the need for an active internet connection.

clickonce deployment with prerequisites

We have an application that we deploy to a website. User goes to the website and downloads the application to their machine.
There are a few prerequisites such as .net and sql server 2012 express that we just click in the "prereqs" to install. But we also have another executable file syncronization which is an exe that the user needs to install before loading the application. How can we also include that so before the app runs it loads this as well. because i don't see an option to include it, it just has the standard default microsoft ones.
So basically you want to run a .exe file along with your main app???
Or it is like the .exe file should load before when you start the main app????

How to install ASP.NET MVC4 RC on a server (2008 and above )

Title just about sums it up. I'd like to be able to deploy my application to one of our servers, is there anything spacial that needs to take place, the reason I ask is that a fresh deploy with the deployment tool says I have conflicting dlls, which I was sure to have referenced correctly from the upgrade guide.
Thank you,
Stephen
It's simple:
go to http://www.asp.net/mvc/mvc4
click the green "Install ASP.NET MVC 4 RC" button to download and run the installer.
Alternatively, you could just install it on your dev machine, then in VS right click on your project and choose "Add Deployable Dependencies..." to automatically include the necessary assemblies in your project for deployment (this will bin deploy MVC).
Another option is to just manually copy the MVC assemblies to the server GAC (copy all the assemblies that are added when using "Add Deployable Dependencies..."), which is what the installer does.
This page hosts the standalone installer for MVC 4:
http://www.microsoft.com/en-ca/download/confirmation.aspx?id=30683
Despite what the page says, Visual Studio is not required to install on a sever.
The "Add Deployable Dependencies..." does no longer exist since VS now always includes the dependend binaries...
Source

How to Create Websetup for Clickonce type windows forms application by publishing it to some folder

Trying to publish a click once type app to a local directory and create a websetup with the published contents- so that i can give tat setup to install in two different servers. but as the publishing wizard takes a URL - separate setup is required for each server. Is there any way that i can create a single setup which i can use it in two servers..?
The URL for setup.exe is only for the purpose of bootstrapping. What I found is that the bootstrapper that gets created with your deployment manifest ('setup.exe') is designed for a web-published application.
If your clickonce publish will be installed on intranet servers, you can't use out of the box bootstrapper. You may write your own or build a seperate setup project for bootstrapping and calling the .application from the installed server when the pre requisites where installed.
If you don't rely on pre requisites and you can ask users to make sure they have the right CLR version, you don't need the setup.exe at all.

building a windows service using msbuild

Can someone point out any tutorials that help build windows services using msbuild.
Requirements :
- Should not use the csproj file
- Output should be the same as the publish option in Visual Studio
Updated question:
We have a project of type windows service in our solution. In this windows service, we are referencing a couple of libraries that reside on a different system (one of them is not strongly named). This solution also contains other class libraries and websites/web-apps.
I am trying to write a custom build that outputs a xcopy deployable version of the website, and a deployable version of the windows service. When I say windows service, it shows up on the Control Panel -> Services MMC.
The website build was easy via msbuild...however I am struggling with the windows service build. Until now, my fellow developers were using the right-click on the project file ,and click publish to publish the windows service. This generates a setup.exe file that helps the admins to deploy the service.
So, now here is my question:
I want to use msbuild to build my windows service.
I do not want to directly use the .csproj file in conjunction with msbuild to build the service.
The output my build file generates should match the output from the "publish" option (*the publish option generates a setup.exe file*)
In general, "the publish option" under the covers just runs a build with /t:Publish, i.e., it triggers a different target to the normal default 'Build' one.
Can you tell us more of what you are looking for, as opposed to not looking for?
Are you looking to generate an MSI? (If so, you definitely won't be using MSBuild if you're using the built-in .vdproj system - but be careful - this means having to put VS on a build server)