Share via

Getting an error when starting a project

code_g33k 0 Reputation points
2024-10-23T05:21:47.8866667+00:00

When creating a F# project I always get this error, Object reference not set to an instance of an object , occurs when you try to use an object that has not yet been created. Which I don't understand how to fix, I tried by deleting the folders below and restarting VS but I still can't created a project, what am I doing wrong?

C:\Users%userprofile%\AppData\Local\Microsoft\VisualStudio C:\Users%userprofile%\AppData\Local\Microsoft\VSCommon

Developer technologies | Visual Studio | Other
Developer technologies | Visual Studio | Other

A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Tianyu Sun-MSFT 34,836 Reputation points Microsoft External Staff
    2024-10-23T08:24:09.0833333+00:00

    Hello @code_g33k,

    Welcome to Microsoft Q&A forum.

    I don't think you did something wrong. But this error might only appear on specific F# projects. Based on my test, this issue appears on "Blank App (Android)" F# project.

    I previously noticed this/similar issue and reported it on our Developer Community, here's the ticket link: Get an error(Exception of type System.Exception was thrown) while creating a F# Blank App (iPad) project. The ticket was marked as duplicate to this ticket and it's still under investigation.

    I would suggest you kindly follow that ticket, vote and add comments there or submit a new ticket on our Developer Community. If there's any latest information or fix, you will be informed.


    Update1:

    I double tested in VS 2022 and VS 2019(on the same machine). The F# project created correctly in VS 2019 but failed in VS 2022.

    I submit a new ticket here: Get an "Object reference not set to an instance of an object" error when creating a F# Blank App (Android) project in VS 2022.

    I will inform you if there's any update.

    Thanks for your understanding, have a nice day.

    Sincerely,

    Tianyu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.

    Was this answer helpful?


Your answer

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