0

In visual studio 2022 Version 17.9.0 Preview 2.0 when opening the form designer occured this error : exception has been thrown by the target of an invocation

error image

This problem happened once before and I solved it by reinstalling Visual Studio.

Is there any other solution?

2 Answers 2

0

As an easier solution than reinstalling, you can repair Visual Studio:

visual-studio-repair-1

Of course, this method cannot be a definitive solution. So if anyone has another method, please tell me.

Sign up to request clarification or add additional context in comments.

Comments

0

I'm getting a combination of errors.

  1. Exception has been thrown by the target of an invocation
  2. I also get this error if coming from 'add new form' dialog. [Error Code: 0x80131604][1] https://i.sstatic.net/VRCYU.png

I have tried the repair option as noted by the op, also tried starting VS as administrator and deleting the .vs folder - but none of these worked.

I tried a new project from scratch. VB winforms, targeting 7 and 8, both failed.

What is strange, is that it was working earlier today and for several days since the upgrade to VS 2022 17.9 preview 2.0.

my app is all 63bit, over 100 forms/controls - never had an issue.

but now i'm stuck - i'll try one more reboot

I found a work-around.

Before opening the form, find it's resource file .resx and open it. Now the designer will open too!

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.