I am trying to create a cloud script for my game. For that I have to use Azure functions and was following this documentation and just installed visual studio 2022 .In the documentation under "Run the function locally" , to run the function I have to press the F5 button. But when I press the nothing happens.After exploring a bit I found that under "Debug" ,"Start Debugging F5" is greyed outScreenShot of Stop Debugging Greyed Out
I searched online and as per this post you have to selected "set as startup project". But no such option exists.The other solution doesn't make sense to me.
Is there a solution to this problem?
Related
I don't know what happens with my Visual Studio 2022. When I create a C++ console project, I can build the project. However, when I do the same thing for C# project, I can not build the project. I look like in the picture. Any help is truly appreciated.
I tried everything I can but it didn't work.
That sounds like a bug. When a new project is created, it should appear in Solution Explorer. However your solution has no projects, and the source file appears in "Miscellaneous Files" (meaning it's not part of a project, and therefore VS won't know how to build it).
Please use the Visual Studio Installer to run a repair on your VS installation. If that doesn't help, use Help | Send feedback | Report a problem and include a recording of the steps you're taking to create a new project. If you link the feedback ticket here, I can make sure it gets looked at by the right people. Thanks.
You need to create a new Console App for creating and running C#
projects
Press F5, choose Debug > Start with debugging from the Visual Studio
menu, or select the green Start arrow and project name on the Visual
Studio toolbar. Or, to run without debugging, press Ctrl+F5 or choose
Debug > Start without debugging from the Visual Studio menu.
The debug type field is greyed out as are the build buttons. I opened a folder in visual studio 2019 with my project and source code files. I have not installed any extensions yet either. I read somewhere to select a startup item but none of the items in the solution explorer are valid except for Gradebook.dll in the debug folder although that doesn't seem to do anything.
Did you try to click the run button or press F5.
If so it should prompt you to select CPU. Then, run it again and it should work.
If that doesn't work try going into "Program.cs" in the Solution Explorer and make sure the Application.Run line is there.
I recently upgraded to Windows 10 and Visual Studio 2019.
Prior to the upgrade, Visual Studio 2017 would always run as Administrator. I did not think much of this, but now that it is gone it is causing me problems.
The primary one is that it will not load my projects that use my local instance of IIS.
I usually launch Visual Studio from my start bar. Right now this goes like this:
Right click on the icon on the start bar and select my solution.
It loads and then I realize that the main project did not load.
Close visual studio, open as admin
Pick my solution and then it loads.
I would really like to only have to do #1 above. Is there someway I can edit the shortcut on the start bar to have it always launch as Administrator?
Turns out that Visual Studio uses different permissions when you click on the list of shortcut options it offers in the start menu. (IE to load a recent solution directly.)
Selecting the Properties->Advanced->"Run as Administrator" did not cause these to run as administrator.
But this did it:
Find devenv.exe (Visual Studio's executable)
Right Click on it and select "Troubleshoot Compatibility".
On the Program Compatibility Troubleshooter window, click on Troubleshoot Program
Check that the program requires additional permissions and click Next
On the next window, click on Test the program… and VS will open as administrator
Click next and then click on Yes, save these settings for this program
Now Visual Studio will ALWAYS run as administrator.
(Taken from: https://ppolyzos.com/2017/08/08/always-run-visual-studio-as-administrator/)
I'm getting an "Unrecognized Guid format" error when I try to open my project in Visual Studio 2015 on a Windows 10 machine (upgraded from Windows 7).
This did not always occur for me. I originally made VS studio open as administrator (because my project needed it at the time) by following the steps in the anwser here: Can you force Visual Studio to always run as an Administrator in Windows 8?
I then decided I wanted to switch back to not having it open as admin. To try and switch back I again ran the compatibility troubleshooter, this time I selected "try recommended settings". After doing this I am now getting the Guid error every time I open my project and I can no longer run it. I even get it if I open VS as admin like I did before.
I even tried uninstalling Visual Studio and reinstalling it but that did not work either.
I am guessing you used to run Visual Studio as Administrator. This did it for me. The answer is to delete the compatibility entry in the registry.
Type Windows+R on the keyboard to open the Run dialog
Type regedit and press enter
Browse to HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
Delete the Visual Studio entry
I fixed this on Windows 10 by using the Troubleshoot compatibility tool. It has to do with an extra checkbox being enabled.
Navigate to devenv.exe by right clicking Visual Studio from start, click
properties, and select "Open File Location...".
Right click on devenv.exe and select "Troubleshoot Compatibility".
Click "Troubleshoot Program"
Uncheck "it worked with older versions of windows"
Click "Next"
Click "Test the program"
Confirm everything opens correctly
Click "Next"
Click "Yes, save these settings for this program"
I use. VS 2013 Express
When debugging, I need to stop automatically on exceptions.
try to follow this.
http://msdn.microsoft.com/en-us/library/d14azbfh.aspx#AddExceptionsCommand
It says I need to add Exceptions command to the Debug menu
On the Tools menu, click Customize.
The Customize dialog box appears.
Click the Commands tab and, in the Menu bar list, click Debug.
Click Add Command.
In Categories in the Add Command dialog box, click Debug.
In Commands, click Exceptions and then click OK.
But in stage 6, in Commands there is no Exeptions
Also I tried to remove Enable just my code, And it didn't work.
Just a FYI ---
Im am using VS Express 2010 (VB) and didn't see the debug exceptions.
Based on the screen shot above I just pushed CRLT-ALT-E and it opened.. (!)
Its a bit unclear to me, if VB 2010 Express has this option or not, or how to unhide it, but the key click combo opened it.
I was then able to turn off the option I needed
In my case the "PInvokeStackImbalance"
enter image description here
Another user has reported the missing 'exceptions' on the 'debug' menu to Microsoft and actually got an acknowlegement from Microsoft (though not from the product team and not confirmation that it is a bug).
https://connect.microsoft.com/VisualStudio/feedback/details/882780/exceptions-comman-missing-in-vs-2013-express-for-web
For what it's worth, you can add your vote to this report at that site; I'm experiencing this problem and I have done so too.
Here's a potential work-around: the 'exceptions' is present in the Visual Studio Express for Desktop. And you can install that edition side-by-side with Web edition. If you can figure out a way to invoke your project executable from the debugger in the Desktop edition, you'd have control over exceptions there.
The exceptions menu isn't shown in Visual Studio Web Developer Express. It is only shown in Visual C# Express.
You can however break on all exceptions. You can try to turn off "Just My Code" debugging, which will catch exceptions thrown in CLR code and linked libraries.
To do this, open Tools -> Options -> Debugging -> General, and uncheck "Just My Code" (or Enable Just My Code).
if it doesn't work try
Debug -> Exceptions -> Common Language Runtime Exceptions - check "when thrown"
if you don't see exceptions try to change your settings following this guide
Refer here for documentation.
update
if it still not working try this
Tools menu >> Import and Export Settings >> Reset all settings. Then choose C# Development Environment.
Many of the customization and integration features for Visual Studio's IDE are not available in the free Express editions, but you should be able to get to the Exceptions menu easily enough without using them.
Press F5 to start debugging, then select Debug / Exceptions... Turn on the check box for "C++ Exceptions" "Thrown". Hit "OK"