Welcome to deBUG.to Community where you can ask questions and receive answers from Microsoft MVPs and other experts in our community.
0 like 0 dislike
1.3k views
in SharePoint Server by 13 14 22

I am trying to deploy a SharePoint 2019 solution using Visual Studio 2022 on my DEV environment, but I get this error "This solution contains one or more assemblies targeted for the global assembly cache" at "Add Solution" Step as below

Error occurred in deployment step 'Add Solution': This solution contains one or more assemblies targeted for the global assembly cache. You should use a strong name for any assembly that will be in the global assembly cache.

Error occurred in deployment step 'Add Solution': This solution contains one or more assemblies targeted for the global assembly cache.

How can I solve this proplem to deploy my sharepoint solution properly?


1 Answer

1 like 0 dislike
by 96 167 336
selected by
 
Best answer

Solving: This solution contains one or more assemblies targeted for the global assembly cache

Even you are using SharePoint 2019 or ASP.Net solution to solve this issue "This solution contains one or more assemblies targeted for the global assembly cache", you have to do the following:

  1. Open your solution in Visual Studio.
  2. Right click on Project Name > Select Properties.
    signing key in SharePoint solution
  3. In Project Properties, Click on "Signing".
  4. Check "Sing the Assembly", then select New from choose strong name key file drop down list.
    Solving: This solution contains one or more assemblies targeted for the global assembly cache
  5. Provide the Name and Password if you need, then click Ok.
  6. Try now to deploy your SharePoint 2019 solution that should be working properly!

See also Error occurred in deployment step Add Solution: Operation is not valid due to the current state of the object.

by 13 14 22
0 0
Thanks alot this solution solved my problem
If you don’t ask, the answer is always NO!
...