Wednesday, May 11, 2016

Upgrading Sitefinity Web Application Projects

While upgrading Sitefinity versions in general has gotten easier over time, one of the MAJOR problems developers still face today even with the latest releases of Sitefinity is upgrading Sitefinity Web Application projects (especially when they are under source control).

The reason this remains a problem is because all of the Sitefinity Web Application project references are referring to the bin directory of the project.

Therefore, when you use the Sitefinity Project Manager, it appropriately updates the assemblies in the bin folder for you.

However, all of the Project References in the Sitefinity Web Application C# project file still refer to older assembly versions!

The problem originates from the fact that the specific version numbers are directly hardcoded into the .csproj file.

So, when you compile the application with these outdated assembly version numbers, the Sitefinity Web Application continues to think that it needs a particular assembly version to execute at runtime, causing innumerable problems for developers to resolve.

For example, you may have a reference like the following in your .csproj file:


<Reference Include="Telerik.Sitefinity.Frontend, Version=1.3.350.0, Culture=neutral, PublicKeyToken=b28c218413bdf563, processorArchitecture=MSIL">
      <HintPath>packages\Telerik.Sitefinity.Feather.Core.1.3.350.0\lib\net45\Telerik.Sitefinity.Frontend.dll</HintPath>
      <Private>True</Private>
    </Reference>

Instead, you probably want to have something like the following in your .csproj file:


<Reference Include="Telerik.Sitefinity.Frontend">
      <HintPath>bin\Telerik.Sitefinity.Frontend.dll</HintPath>
      <Private>True</Private>
    </Reference>

This change eliminates the direct assembly version dependency in the .csproj file as you noticed earlier and makes upgrades much more flexible.

If you are using a framework such as Sitefinity Feather which has available NuGet packages, then you will also want to make sure that you verify which version of Sitefinity Feather is compatible with your particular version of Sitefinity:


The update shown above for Sitefinity Feather works with Sitefinity v. .9.0, but if you are using an OLDER version of Sitefinity (such as Sitefinity v. 8.2), then you will need to ensure that you are choosing an appropriate version of the Sitefinity Feather assemblies that is compatible with your particular version (which is relatively easy to accomplish in Visual Studio 2015):


Once you have worked through all those hurdles in your Sitefinity Web Application project, hopefully you should be able to build your project/solution and compile a properly upgraded Sitefinity Web Application project!

NOTE: DO NOT REBUILD, just BUILD, since a REBUILD may wipe out all of the assemblies in the Sitefinity bin directory!!

Good luck with your Sitefinity upgrades!!

24 comments:

  1. Wow, happy to see this awesome post. I hope this think help any newbie for their awesome work and by the way thanks for share this awesomeness, i thought this was a pretty interesting read when it comes to this topic. Thank you..
    Artificial Intelligence Course

    ReplyDelete
  2. I am sure it will help many people. Keep up the good work. It's very compelling and I enjoyed browsing the entire blog.
    Business Analytics Course in Bangalore

    ReplyDelete
  3. I need to thank you for this very good read and i have bookmarked to check out new things from your post. Thank you very much for sharing such a useful article and will definitely saved and revisit your site.
    Data Science Course

    ReplyDelete
  4. Your site is truly cool and this is an extraordinary moving article and If it's not too much trouble share more like that. Thank You..
    Digital Marketing Course in Hyderabad

    ReplyDelete
  5. I have voiced some of the posts on your website now, and I really like your blogging style. I added it to my list of favorite blogging sites and will be back soon ...

    Digital Marketing Training in Bangalore

    ReplyDelete
  6. The Extraordinary blog went amazed by the content that they have developed in a very descriptive manner. This type of content surely ensures the participants explore themselves. Hope you deliver the same near the future as well. Gratitude to the blogger for the efforts.

    Machine Learning Course in Bangalore

    ReplyDelete
  7. Thanks Your post is so cool and this is an extraordinary moving article and If it's not too much trouble share more like that.
    Digital Marketing Course in Hyderabad

    ReplyDelete
  8. It is late to find this act. At least one should be familiar with the fact that such events exist. I agree with your blog and will come back to inspect it further in the future, so keep your performance going.

    Digital Marketing Training in Bangalore

    ReplyDelete
  9. This is an informative and knowledgeable article. therefore, I would like to thank you for your effort in writing this article.
    Best Digital Marketing Courses in Bangalore

    ReplyDelete

  10. Excellent effort to make this blog more wonderful and informative. The information shared was very useful.
    Cloud Computing Course Fees in Bangalore

    ReplyDelete
  11. Happy to chat on your blog, I feel like I can't wait to read more reliable posts and think we all want to thank many blog posts to share with us.

    Data Science in Bangalore

    ReplyDelete
  12. Excellent post to make this blog more wonderful, attractive and cool stuff you have. Thank You.
    Data Science Course in India with Placements

    ReplyDelete
  13. You have done a great job and will definitely dig it and personally recommend to my friends. Thank You.
    Data Science Online Training

    ReplyDelete
  14. This is really nice which is really cool blog and you have really helped a lot of people who visit the blog and give them useful information.
    Data Science Training in Noida

    ReplyDelete

  15. This is an informative and knowledgeable article. therefore, I would like to thank you for your effort in writing this article.
    Data Science Course in Bangalore

    ReplyDelete
  16. I feel very grateful that I read this. It is very helpful and very informative and I really learned a lot from it, Keep posting new articles.
    Data Analytics Course in Ahmedabad

    ReplyDelete
  17. This is an informative and knowledgeable article. therefore, I would like to thank you for your effort in writing this article.
    Data Scientist Course in Lucknow

    ReplyDelete
  18. Really nice and interesting post. I was looking for this kind of information and enjoyed reading this one. Thanks for sharing.
    Data Science Training in Indore

    ReplyDelete
  19. Hi, This article is probably where I got the most useful information for my research. Do you know of any other websites on this topic?
    Data Analytics Course in Jalandhar

    ReplyDelete
  20. Really, this article is truly one of the best in article history. I am a collector of old "items" and sometimes read new items if I find them interesting. And this one that I found quite fascinating and should be part of my collection. Very good work!

    Data Scientist Training in Bangalore

    ReplyDelete
  21. Hello. I found your blog using msn. This is a very well written article. I'll be sure to bookmark it and come back for more useful information. Thanks for the post. I will definitely be back.

    Data Science Training in Bangalore

    ReplyDelete
  22. Nice post, you give readers a lot to think about and I appreciate that kind of writing.
    Data Science Course Fees

    ReplyDelete
  23. I have read your article, it is very informative and useful to me, I admire the valuable information you offer in your articles. Thanks for posting it ...

    Data Science Course in Durgapur

    ReplyDelete