Boilerplate WPF App doesn't run in Visual Studio 2017 - c#

I just updated to Visual Studio 2017 Profesional. When I create a no-frills WPF app and start it up in debug, Visual Studio spins for a while and then stops, reporting that the application existed with a code of 0. No window is ever shown. The constructor on the App class is never called.
What is going on? I'm switching back to Visual Studio 2013 in the meantime, but I'd like to get this figured out.
For those of you who voted to close this question, here is how you reproduce:
Launch Visual Studio 2017.
Click File -> New Project.
Select "WPF App (.NET Framework)".
Click OK.
DO NOT CHANGE ANYTHING AT ALL!
Click Start on the Standard toolbar.
After step 4, that is my MCVE. What else do you want?

Related

Windows Forms application option seems to be missing?

I'm learning how to design a Windows Forms Application in Visual Studio 2017. The tutorial asks me to create a new project using the File -> New -> Project option and selecting 'Windows Forms Application' in the new project dialog box.
However, when I explore this option in Visual Basic, my New Project dialog window only has three options, and the Windows Forms Application is not one of them (see screenshot - attached).
Just wondered if anyone might be able to suggest how to get this option to appear? I have tried looking for the correct option in the Visual Studio installer, but I cannot find it their either.
Screenshot attached.
Because you need to install it.
Go to Visual Studio Installer from the start and check the checkbox .NET Desktop Development.
After that restart the VS 2017.
Open Visual Studio Installer, ‘Modify’ your installation and install the ‘.Net Desktop Development’ workload.
Add "Universal Windows Platform development" to your work load
Visual studio community

Visual Studio 2017 stops working when certain forms or user controls are clicked

At the beginning my project was fine and running but after a while i added more User controls and Windows forms to my project Visual studio started to stop working and restart whenever i click certain windows form design or user control design. I tried many solution but i did not get the answer even i installed and reinstalled visual studio 2017 professional. can someone help me with this situation.
i have tried this solution
"I've been able to debug some control designer issues by running a second
instance of VS, then from your first VS instance do a "Debug -> Attach to
Process" and pick "devenv".
but its not working for me.

Missing Windows Form Templates in newly Installed Visual Studio 2015

Good Day Everyone. Above is the image of the templates I have in my newly installed Visual Studio 2015. I installed it yesterday and noticed that some templates are missing. Specifically Windows Form. I don't know why it became like this.
What do you think is the reason behind this? And what should I do. Thanks.
I had a similar problem and solved it by installing the "C++/CLI support" under the Desktop Development with C++.
Steps:
1: click on New Project in Visual Studio 2017
2: click on "Open Visual Studio Installer" which is right above the Name field box
3: when the installer opens, click on "Desktop Development with C++" on the right-hand side.
4: check the "C++/CLI support"
5: Close down Visual Studio 2017
6: click the Modify button at the bottom left.
7: Re-launch VS when it is done.
8: if all has gone right, you should have access to windows forms in c#
The reason may be due to Windows Forms running on a C++ framework. Without the C++/CLI Support installed, the Windows Forms might not run.
Try to:
Close Visual Studio.
Open "visual studio command prompt" and run the following command:
devenv /installvstemplates
Source

New Xamarin Shared Project creation gives errors on Visual Studio 2015

I have Visual Studio Enterprise 2015, with all updates and patches applied. When I build create a new Visual C# project Templates->Cross-Platform->Blank App (Xamarin.Forms Shared) I get the following error:
A problem was encountered creating the sub project '.Windows'. This project requires a Visual Studio update to load. Right-click on the project and choose 'Download Update'.
When I click Ok, a solution and projects are created but there is no .Windows, so I cant right click on it! If I try add the project then I get the same issue.
I would expect that such a simple use case should work out the box. I can find a few workarounds via Googling but I don't want to hack around with projects before I even write a line of code of my first Xamarin application.
Any ideas on what I need to do to get the project creation working properly "out of the box"?
A second puzzler is that the template creates a .WinPhone folder that is empty, should I have a csproj in it?
Close Visual Studio and try to modify it components (Control Panel -> Uninstall a program -> Microsoft Visual Studio -> click on it).
In opened window click on "Modify".
Then find and select "Windows 8.1 and Windows Phone 8.0/8.1 Tools" (in Windows and Web Development)
Then click on "Update".
also make sure the Hyper-V is enabled :
Control Panel -> Uninstall a program, then in left menu "Turn Windows Features on or off" and find "Hyper-V", if it isn't selected, select it and click "ok".

Visual Studio 2013 Not Running Correct Project

I have a multiple project solution in Visual Studio 2013. I'm not sure what caused it, but now when I click run, it runs a different project from the one I currently have set as the StartUp project. The project I'm trying to run and the project visual studio runs instead both work and CAN run. The problem occured when I booted up Visual Studio 2013 today I don't believe much has change since I last ran the project either, as I ran it yesterday.
I've tried closing and opening Visual Studio 2013, resetting my project as the StartUp project, right-clicking -> Debug -> Start new instance. All these did not fix the problem though.
SOLUTION: Rebooting my machine fixed the problem, I have no idea...

Categories