1

I'm having some trouble for deploy a farm solution from Visual Studio 2012 Ultimate:

The error says:

Error occurred in deployment step 'Retract Solution': Object reference not set to an instance of an object.

The farm webpart was already installed "since 2016", but I need to deploy again for check some changes made to the logic (i.e write some values on SharePoint Logs), but this errors appears once I tried to retract the solution via Central Administration:

Could not allocate space for object 'dbo.Objects'.'IX_Objects_Version' in database 'SharePoint_Config_015c6f29-dc5d-4015-843e-32c0e1f3333b' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.

I check the size of the disk and 40.5 GB free space.

I tried:

  • Increase database size based on this page:
  • Build a sandbox solution and deploy it = without any problem, after changed it to Farm Solution and appliying the same logic in this new solution, the same error occurs.
  • Delete previous Log Files (I'd read in a blog that this eror may occur when log is full) - I have a backup of tose files (logs from 2016, though).
  • Add this line in the web.config: <NetFx40_LegacySecurityPolicy enabled="true"/>

This line was due I receive this error:

This method uses CAS policy, which has been obsoleted by the .NET Framework. In order to enable CAS policy for compatibility reasons, please use the configuration switch. Please see link for more information.

And now I have this error:

Error occurred in deployment step 'Activate Features': Feature with Id 'bbfb205e-ec9c-4cc2-bbf7-853ac1f0c247' is not installed in this farm, and cannot be added to this scope.

The solution has 2 features and bbfb205e-ec9c-4cc2-bbf7-853ac1f0c247 is the Id of one of those features.

I checked too that, even when I increased the databse size (as previous mentioned), I check again the Properties of the SharePoint database, but the changes aren't saved:

This screenshot shows the automatic grown of the files from the database before change them:

Before changes

After change the values:

After changes

What I can do for solve this issue?

  • Do you face this issue for all farm solutions? if yes soI suggest try to install and use Vs 2013 or 2015 instead of 2012 – Mohamed El-Qassas MVP Jul 7 '17 at 22:03
  • @M.Qassas thanks for your comment. Haven't tested yet with other solutions (only two) and both have this issue "both have the same code". Can you explain why is need use VS2013 or VS2015? – Mauricio Arias Olave Jul 7 '17 at 22:36
  • because it is stable, but before you go ahead with this way, try to deploy any WSP using PowerShell to make sure that the issue is not related to your farm. – Mohamed El-Qassas MVP Jul 7 '17 at 23:33
  • @M.Qassas, I'll try with a sandbox webpart but, I tried using PowerShel with an farm solution and the same problem occurs: Error occurred in deployment step 'Retract Solution': Object reference not set to an instance of an object. sometimes when I tried it appears this one instead: Could not allocate space for object 'dbo.Objects'.'IX_Objects_Version' in database 'SharePoint_Config_015c6f29-dc5d-4015-843e-32c0e1f3333b'... – Mauricio Arias Olave Jul 10 '17 at 13:06
0

After a coworker "who knows more than me about Sharepoint" created a new virtual machine and set there the sharepoint database of the site, installing also Visual Studio 2015 Community.

However, when I was working with a farm solution the deployment was almost succeced1.

For complete the deployment, I have to use PowerShell with this command:

update-spsolution -identity "<MY_WSP_SOLUTION>.wsp" -literalpath "C:\WSP\MY_PROYECT\<MY_WSP_SOLUTION>.wsp" -gacdeployment

I just generate the .wsp file and used the PowerShell command listed above in production and it worked without problems.


1 I couldn't deploy from Visual Studio due to a Feature of the farm solution.

The highlights of the errors is:

  • Could not be installed because the loading of event receiver assembly for _Feature2
  • WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Since these changes should be done in production server, I cannot take that risk and also, we're running on time with this support to one of our customers.

This is the error's description (in spanish):

Severity Code Description Project File Line Suppression State Error Error occurred in deployment step 'Activate Features': No se pudo cargar el ensamblado del receptor ", Version=1.0.0.0, Culture=neutral, PublicKeyToken=f5f9e843b36a2fe5" para la característica "_Feature2" (identificador: bbfb205e-ec9c-4cc2-bbf7-853ac1f0c247).: System.IO.FileNotFoundException: No se puede cargar el archivo o ensamblado ', Version=1.0.0.0, Culture=neutral, PublicKeyToken=f5f9e843b36a2fe5' ni una de sus dependencias. El sistema no puede encontrar el archivo especificado. Nombre de archivo: ', Version=1.0.0.0, Culture=neutral, PublicKeyToken=f5f9e843b36a2fe5' en System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) en System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) en System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) en System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) en System.Reflection.Assembly.Load(String assemblyString) en Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()

AVS: El registro del enlace de ensamblado está desactivado. Para habilitar el registro de errores del enlace de ensamblado, establezca el valor de Registro [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) como 1. Nota: existe una disminución del rendimiento asociada registro de errores del enlace de ensamblado. Para desactivar esta característica, elimine el valor de Registro [HKLM\Software\Microsoft\Fusion!EnableLog].

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.