Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading a VB.NET WPF project failed - but reported as success - Two issues #1606

Open
1 task
adegeo opened this issue Oct 29, 2024 · 0 comments
Open
1 task

Comments

@adegeo
Copy link
Contributor

adegeo commented Oct 29, 2024

  • Include the log file upgrade-assistant.clef that is produced in the working directory

This log file wasn't generated...

Describe the bug

I work on the .NET docs. I needed to verify the code samples used by this project, and encountered issues trying to upgrade. There are two main issues:

  1. It can't seem to figure out that I don't want x86

    When you open the project it prompts to upgrade to .NET 4.8, which is fine. You can run the project and everything works. I went to upgrade the project through the upgrade assistant and that's where problems started.

    It first prompts to save the SLN (because one doesn't exist) and that works fine. Next I start the upgrade as in-place which succeeds. When I run the project I get this error:

    Image

    This is in the project file:

    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
    

    The solution file has:

    Microsoft Visual Studio Solution File, Format Version 12.00
    # Visual Studio Version 17
    VisualStudioVersion = 17.10.35027.167
    MinimumVisualStudioVersion = 10.0.40219.1
    Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "DragDropWalkthroughVB", "DragDropWalkthroughVB.vbproj", "{7A9D4CC9-9019-4514-9155-1FDB604652B9}"
    EndProject
    Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
            Debug|x86 = Debug|x86
            Release|x86 = Release|x86
        EndGlobalSection
        GlobalSection(ProjectConfigurationPlatforms) = postSolution
            {7A9D4CC9-9019-4514-9155-1FDB604652B9}.Debug|x86.ActiveCfg = Debug|x86
            {7A9D4CC9-9019-4514-9155-1FDB604652B9}.Debug|x86.Build.0 = Debug|x86
            {7A9D4CC9-9019-4514-9155-1FDB604652B9}.Release|x86.ActiveCfg = Release|x86
            {7A9D4CC9-9019-4514-9155-1FDB604652B9}.Release|x86.Build.0 = Release|x86
        EndGlobalSection
        GlobalSection(SolutionProperties) = preSolution
            HideSolutionNode = FALSE
        EndGlobalSection
        GlobalSection(ExtensibilityGlobals) = postSolution
            SolutionGuid = {0B671A80-7836-481B-BB60-E69540C47797}
        EndGlobalSection
    EndGlobal
    

    After the upgrade, I need to delete this solution file. When reopening the project, it generates a solution file that targets ANYCPU.

  2. WPF has a default My namespace extension. This doesn't seem to migrate.

    If I add <UseWindowsForms> to the project file, the errors related to the MyWpfExtension disappear.

    But I can't seem to get the BC30002 Type 'Global.DragDropWalkthroughVB.My.MySettings' is not defined. error to go away. When I click on it the code file is opened but there is no problem. I can F12 to navigate to source and resolve MySettings no problem.

Image

To Reproduce

VBWPFDragDrop.zip

Exceptions (if any)

Further technical details

  • Windows 24H2 64-bit
  • Using Visual Studio 2022 17.11.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant