question

SalimMuvak-7300 avatar image
0 Votes"
SalimMuvak-7300 asked ·

Find Window Form App design view on Visual Studio

Hi,
1. Months ago, I downloaded a sample project from github, then I make a few changes to the UI of a WFA in that project (add some buttons, labels, ...). The problem is: I'm trying to re open the WFA design view to make some modification to that UI, but I cannot find the design file in the entire project. However, when I run the WFA, that UI window still pops up and runs normally, so it must be somewhere, but the project is too large so I cannot handle to find in folder.
So is there anyway to trace the design file from my running WFA?
2. I think most of the code line have error like:
- Predefined type "System.String/Void/Boolean/..." is not defined or imported.
- The type or namespace name "Task" could not be found (are you missing a using directive or an assembly reference?)
If I just ignore those errors while debugging, the wfa still runs, but can you suggest me some way to solve it?
Thank you






windows-forms
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

LeonLaude avatar image
0 Votes"
LeonLaude answered ·

Hi,

Visual Studio is currently not supported in the Q&A forums, the supported products are listed over here https://docs.microsoft.com/en-us/answers/products (more to be added later on).

You can ask the experts in the dedicated Visual Studio forum over here:
https://developercommunity.visualstudio.com/spaces/8/index.html

https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?category=visualstudio


(If the reply was helpful please don't forget to accept as answer, thank you)


Best regards,
Leon

· 1 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

hi Leon, we just started to support visual studio on Q&A platform yesterday:) https://docs.microsoft.com/en-us/answers/products/vs

0 Votes 0 ·
DanielZhang-MSFT avatar image
0 Votes"
DanielZhang-MSFT answered ·

Hi SalimMuvak-7300,
First, you need to check the target framework of your project by following steps:
Right-click Project -> Properties ->Application.
If it is a Windows Forms App(.Net Core), there is no designer by default.
The .NET Core Windows Forms designer is available with the Visual Studio 16.5 Preview 1.
So you can try to update Visual Studio to Visual Studio 16.5 Preview 1 or a later version.
More details you can refer to this blog.
If it is .Net framework, you can open designer view via the steps below:
1.Open the solution explorer (View -> Solution Explorer, or Ctrl+W, S).
2.Select one of the mentioned classes like form or user control.
3.Right-click it and select View Designer (or simply Shift+F7). That will move you to the designer view.
For first error, the cause of the error is mostly missing mscorlib.dll.
And you can try the following suggestions to solve it.
1.Delete bin and obj file and rebuild your project.
2.Run dotnet restore command via Visual Studio -> Tools -> NuGet Package Manager -> Package Manager Console, then rebuild solution.
For second error, are you looking for the Task in System.Threading.Tasks?
Full reference is System.Threading.Tasks.Task, or for a using System.Threading.Tasks in your project
Best Regards,
Daniel Zhang


·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.