VS2010 vb.net web open in VS2019

Johnny Balladares 21 Reputation points
2021-02-04T12:52:56.197+00:00

Hi All,
Trying to open a VS2010 vb.net web app in VS2019.
I use the option open folder, I can see the file but I have an issue with a reference.
The package.config file shows:
<packages>
<package id="AjaxControlToolkit" version="4.1.60919" targetFramework="net40" />
<package id="AjaxControlToolkit" version="7.1213" targetFramework="net40" />
<package id="AjaxMin" version="4.97.4951.28483" targetFramework="net40" />
<package id="HtmlAgilityPack" version="1.4.6" targetFramework="net40" />
<package id="Microsoft.Data.Edm" version="5.2.0" targetFramework="net40" />
<package id="Microsoft.Data.OData" version="5.2.0" targetFramework="net40" />
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="1.8.0.0" targetFramework="net40" />
<package id="System.Spatial" version="5.2.0" targetFramework="net40" />
<package id="WindowsAzure.Storage" version="2.1.0.4" targetFramework="net40" />
</packages>

The issue is the AjaxControlKit, I cannot install that one.
I download a new one v20 but looks like it is not compatible
63977-image.png

I am getting an error:
Severity Code Description Project File Line Suppression State
Error BC30002 Type 'Global.AjaxControlToolkit.ToolkitScriptManager' is not defined. ProjectWeb C:\VS_PROJECTS\PorjectWeb\Site.Master.designer.vb 41 Active

Any ideas on how to solve this issue?
Thanks

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,916 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,506 questions
0 comments No comments
{count} votes

Accepted answer
  1. Michael Taylor 54,806 Reputation points
    2021-02-04T15:16:00.457+00:00

    The package configuration has duplicate entries for the Ajax toolkit. That isn't valid. Remove the older one. You should have no issues downloading the 7.x version as it is in NuGet. Your code should then compile. Given the age of your project it is using the really old approach to restoring NuGet packages so you might need to manually trigger a package restore. You can tell it worked if you suddenly have a packages folder in your project.

    However all these are really old so at some point you do need to upgrade them. Unfortunately changing major version (e.g. 7.x to 20.x) generally requires that you make changes. Major version compatibility is not guaranteed. Unfortunately there is no way to fix this automatically. You have to look through the release notes and any migration guide posted by each package and upgrade based upon their notes. This is a manual process.

    Also note that your original code is targeting .NET 4 and you'll need to upgrade to .NET 4.5. That will potentially introduce even more changes.

    Ultimately I would recommend that you create a brand new ASP.NET project (WebForms or MVC depending upon what the old one was), then move your existing source code and forms/views to the new project, add the newer NuGet packages as you go along. This will allow you to fix issues as you go along and ensure you are using the latest project settings. If you don't go this route then you're going to run into intermittent issues as you try to build and debug and you're going to spend a lot of time editing project files.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Yijing Sun-MSFT 7,086 Reputation points
    2021-02-05T08:34:14.383+00:00

    Hi @Johnny Balladares ,
    As far as I think,you need to migrate the project to Visual Studio 2019.We try to preserve backwards compatibility with previous versions, such as Visual Studio 2017, Visual Studio 2015, Visual Studio 2013, and Visual Studio 2012. However, support for some project types changes over time. A newer version of Visual Studio might not support certain projects at all, or it might require that you update a project so that it's no longer backwards-compatible.You could refer to this article.


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our  documentation  to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best regards,
    Yijing Sun

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.