Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

So I just deployed this .wsp to production and I've identified a tiny bit of logic that needs tweaking in an event receiver. I'm considering compiling a new .wsp package, and then running an Update-SPSolution on my production SPF. Naturally, I just wanted to verify that such an update would actually work. So, here's my context:

I still have a development SPF with the same version of the solution running identical to production. The only difference was, the development version was deployed via Visual Studio (as is common, I suppose).

Then, I made some minor tweaks to a list event receiver code. I updated the Assembly version, built the solution and then packaged it up (but did not use Visual Studio to deploy it). Rather I ran the Update-SPSolution command. All seems well enough. No errors in the console.

Now, when I go to perform action X which should cause the event receiver to fire.. it doen't fire at all. Instead, I see this in the ULS:

Event manager error: Could not load file or assembly 'myCustomAssembly, Version=1.0.1.14, Culture=neutral, PublicKeyToken=130eeb2d789a2e4b' or one of its dependencies. The system cannot find the file specified.

So, it's hanging on to the old Version=1.0.1.14 when my latest .wsp contains Version=1.0.2.0

Is the Update-SPSolution really so worthless? I read somewhere on MSDN it's supposed to be for these situations where all the files and features between solutions are still-present (though containing changes). I've done upgrades in the past where I had to deactivate-features, uninstall, re-install.. and I'm really hoping to execute something less intrusive.

EDIT:

FWIW: When I comb the log for critical-level errors, I also see this one. I don't take all the errors on my DEV box too seriously.. but I am noticing a pattern.. this one is always coupled with the aforementioned one:

An exception occurred while updating addresses for connected app {7a59242d-4587-4f4e-9563-e067aa23c5e7_61322854-9714-4458-949c-c2bcc98ef497}. The uri endpoint information may be stale. System.InvalidOperationException: The requested application could not be found. at Microsoft.SharePoint.SPTopologyWebServiceApplicationProxy.ProcessCommonExceptions(Uri endpointAddress, String operationName, Exception ex, SPServiceLoadBalancerContext context) at Microsoft.SharePoint.SPTopologyWebServiceApplicationProxy.ExecuteOnChannel(String operationName, CodeBlock codeBlock) at Microsoft.SharePoint.SPTopologyWebServiceApplicationProxy.GetEndPoints(Guid serviceId) at Microsoft.SharePoint.SPConnectedServiceApplicationAddressesRefreshJob.Execute(Guid targetInstanceId)

share|improve this question
    
I have chosen to accept-as-answer the response from @almostSharepointMaster as an exhaustive treatment to my proposed question. Even though, I'm still not quite sure why I can't get Update-Solution to work for my particular scenario. I'll keep updating this thread if I ever discover further detail. –  bkwdesign Jan 21 '13 at 4:42

1 Answer 1

up vote 1 down vote accepted

You can try this:

Update-SPSolution –Identity YourSolutionName.wsp –LiteralPath “C:\YourSolutionName.wsp” –GacDeployment

This should update the existing wsp with the new version with the correct version!

The Update-SPSolution cmdlet upgrades a deployed SharePoint solution in the farm. Use this cmdlet only if a new solution contains the same set of files and features as the deployed solution. If files and features are different, the solution must be retracted and redeployed by using the Uninstall-SPSolution and Install-SPSolution cmdlets, respectively.

How do I update an already existing wsp on farm?

EDIT

If you have an issue as you have you will notice that just upgrading isnt enough thats becasue you have changed the versioning ;) so you would need to do the following to ask sharepoint to go through the list of features to upgrade :):

open cmd (command propmt)

trype in the following:

psconfig.exe -cmd upgrade -inplace v2v -wait

Performs an upgrade of SharePoint 2010 Products. This command is automatically run when you run the SharePoint Products Configuration Wizard if the product has to be upgraded.

How to use Psconfig commands

When you run Psconfig at a command prompt, you can specify commands to control how the tool runs. To run Psconfig at a command prompt, navigate to the %COMMONPROGRAMFILES%\Microsoft Shared\web server extensions\14\bin folder, and then type the commands by using the following syntax:

psconfig.exe -cmd upgrade -inplace v2v -wait

the following is describing the commands :)

[-wait]

If specified, the SharePoint Products Configuration Wizard does not return until the upgrade is complete. If not specified, the wizard returns after dispatching a SharePoint Timer Service job to perform the upgrade. To view the upgrade job status, you can access the SharePoint Central Administration Web site by using your Web browser.

[-inplace <v2v|b2b>]

If specified, the SharePoint Products Configuration Wizard will perform an in-place upgrade. If v2v is specified, an in-place version to version upgrade is performed. If b2b is specified, an in-place build to build upgrade is performed.

http://technet.microsoft.com/en-us/library/cc263093(v=office.14).aspx

this will do the trick ;)

EDIT

The last thing i know of is the configuration cache! as by your reply it looks like regardless what you do it is still taking the old values. If you clear it, it will start all from new and should hopefully get your feature up and running :)

How to clear SharePoint Configuration Cache?

a) Stop the SharePoint 2010 Timer service on ALL of SharePoint servers in the farm.

b) Log into your Index server.

c) Navigate to the directory: C:\ProgramData\Microsoft\SharePoint\Config\GUID.

d) Delete all the XML files from the directory.

CAUTION: DELETE ONLY THE .XML FILES, NOT THE .INI FILE. IF YOU DELETED THE .INI file, see item 3.

e) Open the cache.ini with Notepad and reset the number to 1. Save and close the file.

f) Start the SharePoint 2010 Timer service on the Index server and wait for XML files to reappear in the directory.

g) After you see XML files appearing, repeat steps c, d & e on each query server (one server at a time).

h) After all of the query servers have all been cleared, repeat steps c, d & e on each of the WFE and application servers in the farm (one server at a time).

http://latenightsp.wordpress.com/2011/03/16/sharepoint-config-cache/

share|improve this answer
    
That is precisely the command that I ran, and that paragraph is precisely the reason I chose this option. Nevertheless, the error referring to the prior version is what is showing in my logs. –  bkwdesign Jan 18 '13 at 13:24
1  
added an edit to solve your issue ;) –  ali Sharepoint Jan 18 '13 at 13:44
    
OK! .. will def. give that a try. THANKS.. I smell impending upvotes –  bkwdesign Jan 18 '13 at 17:08
    
ok. it prompted me for a -passphrase parameter which I totally don't know.. but I reset it using this info: sharepointadam.com/2010/01/21/… –  bkwdesign Jan 18 '13 at 17:30
1  
ok, iv added a new update at the bottom, i think i know your issue.... i belive its todo with the configuration cache as what you described sounds exactly that :) –  ali Sharepoint Jan 18 '13 at 19:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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