This solution contains one or more assemblies targeted for the global assembly cache - powershell

I am having a SharePoint site which is deployed through SharePoint powershell. the wsp is build through visual studio 2013.
All my projects in the solution are not Signed assemblies(project->right Click->properties->Signing->Sign the assemblies check box is unchecked). I am taking the wsp of my solution by publishing it and deploying it to the SharePoint using SharePoint powershell.
When I try to do this, I am getting the following error:
When I googled for the solution. Many of them are suggesting to Check the 'Sign the assemblies' check box. which I don't want to do, because I am facing some other issues with some packages install through Nugget.

Sign the Libraries of the Solution
Go to Properties of the Project then Click Signing tab and then Check the Sign the Libraries Options and create a new Strong Name file with or without password and then Rebuild and Deploy.

Related

Get UWP Store associations using PowerShell or MSBuild

I'm using AppVeyor CI to build my UWP app and want to create an APPX package during every build. However my .gitignore is ignoring the Package.StoreAssociation.xml and MyAppName_StoreKey.pfx which I want to include in the APPX package as they are identifying my app in Windows Store.
Is there any way to get these files using PowerShell or MSBuild or something like that? In other words, is there any command line equivalent to the Project > Store > Associate App with the Store... wizard?
I know I can upload these files to the repo as Secure files but I'd prefer getting the latest files from the Dev Center with every build.
I would say probably not, as the Associate App with the Store Wizard, is an authenticated Wizard which requires a users Microsoft Account to be registered with Visual Studio, Load Credentials from storage or asking for OAuth, and then Visual Studio goes to Microsoft's server to Sign the Certificate and Sign the app with it.
AppVeyor documentation says the currently UWP is not officially supported for UWP, as a Microsoft License is required.
Edit: Does this help?
Is there any way to get these files using PowerShell or MSBuild or something like that? In other words, is there any command line equivalent to the Project > Store > Associate App with the Store... wizard?
No, as #William's explanation. The associating operation needs user's interaction in Visual Studio, this doesn't depend on a public command/API.
In my experience, we need to store(maintain) the latest store association information in somewhere, overwrite the related files and replace the reserved keywords in the app's manifest template file before packaging.

Error while saving a workflow via sharepoint designer: Server-side activities have been updated

While saving a workflow using SharePoint designer on a SharePoint site, I get the following error:
Server-side activities have been updated. You need to restart SharePoint Designer to use the updated version of activities.
Steps to recreate error:
Login to the WFE server hosting IIS and workflow manager, open SharePoint Designer 2013 and login to a SharePoint site.
Access the list using SharePoint Designer 2013, in the workflow section, click new workflow.
In the new workflow dialog, enter workflow details, click save
Error message is displayed as below:
Server-side activities have been updated. You need to restart SharePoint Designer to use the updated version of activities.
After restarting SharePoint Designer, the saved workflow is not seen in the site/workflows or list/workflow section.
Workaround
When the above steps are repeated while accessing the site via SPD from any other box besides the WFE/Workflow manager host server, the error is not encountered and its possible to save/publish workflows.
Notes
Workflow Manager 1.0 is installed.
The site has been registered with Workflow manager using Register-SPWorkflowService cmdlet.
Any clue on why is this happening?
Copy Microsoft.SharePoint.WorkflowServices.Activities.Proxy.dll assembly to WebsiteCache folder (%USERPROFILE%\AppData\Local\Microsoft\WebsiteCache{Site Name}\15.0.0.4745)
http://www.jrjlee.com/2014/10/server-side-activities-have-been-updated.html
Experienced with Windows 8.1
During setup/configuration of a remote SharePoint Server on Windows Server 2008 R2, I managed to install Workflow Manager on my client Windows 8 machine while following instructions erroneously as I was supposed to do this on the server.
I accomplished what was necessary with Workflow Manager on the server, but never removed this from my workstation client. After searching through google a ton, I kept finding this page and eventually realized the fix:
Since workflow manager is designed for server edition of Windows, this simply shouldn't be on your client that you are attempting to use SharePoint Designer on to create workflows with.
I was using SharePoint Online with SharePoint Designer 2013 and ran in to this issue when trying to create a workflow. I uninstalled the Workflow Manager as recommended and it started working. Workflow Manager was most likely installed when I installed Visual Studio 2015. I am on Windows 10.
Update WorkflowManager and WorkflowManagerClient to CU4
Uninstall Visual Studio
Uninstall SPD
Deactivate Distributed Cache
Delete WebApplications (Except Central Admin)
Run CMD commands:
cd "%APPDATA%\Microsoft\Web Server Extensions\Cache"
del *.web /S /Q "%APPDATA%\Microsoft\Web Server Extensions\Cache"
cd "%USERPROFILE%\AppData\Local\Microsoft\WebsiteCache\"
rmdir /S /Q "%USERPROFILE%\AppData\Local\Microsoft\WebsiteCache."
mkdir "%USERPROFILE%\AppData\Local\Microsoft\WebsiteCache"
dir "%APPDATA%\Microsoft\Web Server Extensions\Cache"
dir "%USERPROFILE%\AppData\Local\Microsoft\WebsiteCache"
Run iisreset
Restart VM
Create Web Application
Install SPD
Execute iisreset
Restart VM
Open SPD
Go to "Options > Application Options > General Tab" and let -only
the following- boxes checked: "Show status bar" and "Show catalog
lists and system objects" > OK > OK
Open the site via SPD
Create new Workflow 2013 via SPD
Thats what I did. Hope it helps.
I faced the same issues. The workarround was to install sharepoint designer on another machine than the host machine where sharepoint, workflow manager and visual studio is installed. That fixed the issue, however i faced other problems later, specially with workflow 2013, specially when trying to save them as workflow templates, or publish them as global workflows. So i tried to fix the original issue in order to avoid differences between both environements and to be sure to have the right permissions. After long days i found another workarround for my problem:
When comparing the folders
user profile\AppData\Local\Microsoft\WebsiteCache\sitename\version of both environements, i figured out that there were a lot of dll's missing on de developement machine. So I have copied them from the working machine, then i was able to edit workflows 2013 on the buggy machine.
By updating the SharePoint designer you can resolve this issue. Click on the link and follow all the steps mentioned on the blog.
1 Install Microsoft sharepoint designer service pack 1
2 install the update for the sharepoint designer
Enjoy it will work.
Your answer is here

Error on deploying a SharePoint 2010 site template

I have a web application in which I have few document libraries, lists, picture libraries, workflows and few webparts. The webparts are created using visual studio with the feature site scoped. WorkFlows are created using SPD. Everyting working fine in my local SharePoint server. I want to copy my web application to a different server. For this I saved the site template Site Actions-> Save Site as template, saved the wsp to my desktop. Then I took the wsp to the other server machine where i created a webapplication.
Then using PowerShell command added the solution using Add-SPSolution command. When trying to install using Install-SPSolution command I got an error:
This solution contains no resources scoped for a web application and cannot be deployed to a particular web application
I tried to change the scope of webpart feature to Web/WebApplication but encountered error when tried to deployed using visual studio.
How can I deploy the wsp in a different SharePoint Server machine?
When you save the site as a template, you'll only save the site, not your web application. Create the web application first (maybe without a site template), and roll out your site from your WSP afterwards.
If you are using powershell to deploy the solutions, please remember to include the flag -GACDeployment.

error activating .wsp file in sharepoint server 2010

I developed a sample application in visual studio 2010. I created an Empty SharePoint Project and gave the local site url for debugging. Checked "Deploy as Farm" as the trust level of the SharePoint solution. Added a visual webpart and also a class to the solution. I am able to build and successfully run the application using visual studio. In my local machine am using SharePoint foundation 2010 to debug the SharePoint application.
Now i want to deploy this application in the SharePoint server 2010 which is in a virtual machine.
1. I copied the .wsp file of the application i created to the virtual machine.
2. From the central administrator in the VM I created a web application and the site collection.
3. Then using Site Actions -> Site Settings -> Solution(Galleries), choose the .wsp file for uploading. it showed a "Warning: You should only activate this solution if you trust this solution. An activated solution can read, modify and delete your data. " and the activate button is disabled.
Then I tried to do same in my local machine on a different site collection. Here Activate button is enabled but when clicked it threw exception
Server Error in '/' Application.
This solution contains invalid markup or elements that cannot be deployed as part of a sandboxed solution. Solution manifest for solution 'aee60282-765d-4c9f-b67a-5981f18a6d3b' failed validation, file manifest.xml, line 10, character 4: The element 'Solution' in namespace 'http://schemas.microsoft.com/sharepoint/' has invalid child element 'TemplateFiles' in namespace 'http://schemas.microsoft.com/sharepoint/'. List of possible elements expected: 'FeatureManifests, ActivationDependencies' in namespace 'http://schemas.microsoft.com/sharepoint/'.
What could be this error?
The "TemplateFiles" element refers to items that will be copied onto the web server. This is allowed for farm solutions (which are deployed via CentralAdmin), but is not allowed for sandboxed solutions (which are deployed via the Solution Gallery).
When you deploy your wsp with visual studio, you deploy it as farm solution.
When you deploy your wsp from site settings into solution galery, you deploy it as user solution (sandbox solution) with some limitations :
first, avoid using out of the box visual webparts, it's prohibited !
Deploy your wsp by writing powershell script.
A good starting point here :
patrickboom.wordpress.com/2010/05/31/using-powershell-to-deploy-sharepoint-solutions-wsp-2/
Le_Fredo is correct here, when attempting to deploy a WSP file into the site collection directly under the site settings, you won't be able to. I found this article from microsoft to be extermely helpful
http://technet.microsoft.com/en-us/library/ff607688(v=office.14).aspx

Crystal Reports Viewer in ASP.NET3.5 App

I created a ASP.NET3.5 website having a crystalreportviewer in it, it works fine if I run through visual studio 2008 or on my own machine. But when i deployed project on web server, it started giving me error.
Firstly it was giving error on first page that CrystalDecision.web assembly can't be found, then I installed Crytal Runtime 2008 on my web server. After installation application seems like ok, but when I opened page with CrystalReportViewer it gave me different error, as following:
The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Any idea about it??
You probably have slightly different versions of the crystal assemblies on the server and your development machine. Compare the version numbers in c:\windows\assembly on both and see if there is a difference. If there is, either update the server or change the version numbers for the assemblies in web.config.
Also, The located assembly's manifest definition does not match the assembly reference
After spending almost 2hrs I finally found the fix.
Uninstall the Crystal Reports run time from web server.
Check if web server still have \program files\Business object folder, if still exist then delete it. Ensure other applications are not dependent on it.
Give Read and Write access permissions to ASPNET user on \windows\Temp folder
Install Crystal Report run time now.
Restart IIS
Following these steps should fix the crystal report viewer problem.
But then one more problem arises, crystal report viewer doesnt show the icons, the reason is crystal report viewer looks for aspnet_client\system_web\2_0_50727 folder in root folder of the website. In my case I have multiple websites on my server including .NET 1.1, 2.0 and ASP, so I have wwwrootASP2.0 folder for this website. But by default web server created aspnet_client\system_web\2_0_50727 folder under default website (wwwroot). So, the fix is, just copy that aspnet_client\system_web\2_0_50727 folder into your website's root directory. Bingo !!!!!! It works fine now.
I hope it will help,
Cheers.
I just wanted to add that an easier way seems to be creating a virtual directory under you web application called aspnet_client that points to C:\Inetpub\wwwroot\aspnet_client.
This also makes the images on the crystal report viewer show up. It was tested with visual studio 2008 crystal basic on IIS running on server 2003.
I figured this out after reading http://social.msdn.microsoft.com/Forums/en-US/vscrystalreports/thread/e2dc93b3-e594-4ae6-ba92-9440ccc7f6be.