Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 25064

Feature Version doesn't change?

$
0
0

Hi all,

I have a problem with doing Feature Upgrades. In the Properties of the Feature, I place "0.0.0.3" (current version is 0.0.0.2). I then place the actions I need like so:

<?xml version="1.0" encoding="utf-8" ?><Feature xmlns="http://schemas.microsoft.com/sharepoint/" ImageUrl="Feature.png"><UpgradeActions><VersionRange BeginVersion="0.0.0.0" EndVersion="0.0.0.1">
        Do Something</VersionRange><VersionRange BeginVersion="0.0.0.2" EndVersion="0.0.0.3">
           //Do Something</VersionRange></UpgradeActions></Feature>


One thing that is weird though is that there is no upgrade action for 0.0.0.2 before, but current version is 0.0.0.2.

I then run the ff script:

Update-SPSolution -Identity MyFeature.wsp -Path "C:\MyFeature.wsp" -GACDeployment

I then run the ff script I got from another thread:

$featureName="MyFeature"
$latestVersion=(get-spfeature|where {$_.DisplayName -eq $featureName}).Version
$sitename=get-spsite http://zoodev
$theFeature=$sitename.Features|Where {$_.Definition.DisplayName -eq $featureName}
$currentVersion=$theFeature.Version
write-host "Current Version: $currentVersion, Latest Version: $latestVersion"

And I always get this, which shows the versions are the same:

I'm pretty new to this Feature Upgrade so I'm not sure what I am doing wrong. I followed steps on the internet.

Can anyone help me maybe?

Thank you!


Viewing all articles
Browse latest Browse all 25064

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>