How to change the class with main method in VS for mac - visual-studio-mac

In VS for windows when we right click in the project there is a property option available to change the start up object (list of classes with main methods). However, I could not find it in VS for Mac. I use VS for mac. How to do the same in VS for mac?

In the Solution window, right click the project and select Options.
In the Project Options window select Build - General.
Enter the name of your startup class in the Main Class section and click OK.

Related

Visual Studio 2019 View.SynchroniseClassView not working

In Visual Studio 2019 Enterprise, View.SynchroniseClassView is not working. I have tried adding the button to menu, map keys to View.SynchroniseClassView , but the button remains greyed out.
Is there any known issues with View.SynchroniseClassView ? The worse case scenario is trying to find a way to copy the fully qualified method/property name and search in the class view manually.
As of Visual Studio Version 16.7.1 The issue seems fixed and the position in the tree view of the class view matches the code when invoking the synchronise class view key shortcut or menu entry in the "View > Syncronize Class View"

How to Reset Window Layout in Visual Studio for Mac

Is it possible to reset window layout in Visual Studio for Mac? I am able to do this for Visual Studios on Windows, but not on Mac version.
After piecing together various posts I found only a non-UI way to reset the layout. Starting with this doc: http://www.monodevelop.com/developers/articles/user-profiles/ but instead of using the path "MonoDevelop" use "VisualStudio". So in the case of a Mac the folder to visit is at "~/Library/Preferences/VisualStudio".
Once there I found the "7.0" subfolder had a file named "EditingLayout.xml"... With VS for Mac not running, I deleted that file and started it again. This restored all pads to their default state from what I can tell. In my case the "Application Output" window was still not available as a Pad until I actually did a Debug on a project, and then it was visible again in the View | Pads list (and no longer lost in the UI somewhere).
You can press the view tab to change the different layouts or create one of your own.
Additional informations can be found here:
https://learn.microsoft.com/en-us/visualstudio/mac/customizing-the-ide?view=vsmac-2019
I met this problem also, Visual Studio for Mac can't reset Window Layout in UI. But you can easily customize the Window Layout. Just select "View->Pads/Debug Pads" to decide what window you want to show on the dashboard.
enter image description here
Just to have a more up-to-date answer: when you quit Visual Studio Mac 2019, any changes made to the active layout will be reset to how the layout was saved.
From the Visual Studio Website:"There is always one active layout and any change you make in a layout, such as adding or repositioning a pad, will only change the active layout. Once you close Visual Studio for Mac, the changes you have made will not be saved." Visual Studio Website - Customising The IDE
I've tested it out for Visual Studio Community 2019 for Mac Version 8.7.8 (build 4), and now it really does just reset when you quit the app, unless you have specifically saved any changes as a new layout.

Delphi 10 Seattle do NOT open last used project on start

I'm new to Delphi, coming from Visual Studio it's a simple question (I guess): how do I prevent Delphi 10 Seattle to open last use project(group) when I start the IDE?
I've found some information about the .dsk file and what it does:
The .dsk file records your current settings for:
Desktop layout
Breakpoints
Watch items
Files currently open in the IDE
When you reopen the project later, the .dsk file is read, and your
desktop layout, your breakpoints, and your watches are all restored.
Also, all files that were opened when the project was closed are
opened again, regardless of whether they are used by the project.
I'm fine with that when I open a project. But please do not open it when I start the IDE. Mostly I want to start or open another project than the last one I was working on.
I've searched the options and the internet, but couldn't find a solution. Anyone?
Disable "Project desktop" in the IDE Autosave options (Tools\Options\Envinroment options).
But please do not open it when I start the IDE. Mostly I want to start or open another project than the last one
Granted, I do no have Seattle at hands, I settled in XE2.
But try changing the shortcut.
-np: No welcome page. Does not display the welcome page after starting the IDE. np also stands for No Project. Independently of Environment Options Project desktop the last opened project will not be opened
http://docwiki.embarcadero.com/RADStudio/Tokyo/en/IDE_Command_Line_Switches_and_Options
saving the layout and position of the tool windows like Refactorings,
That is what the "Layout" combo-box on the "Desktop" toolbar does. Unless you want different layouts in different projects. R-click over your IDE's tool buttons or go View|Toolbars menu to turn "Desktop" bar on. Alternatively use View|Desktops menu.

Right-click menu of EXE file

I was wondering if it was possible in Delphi to implement some items added to the right-click menu of an EXE file, specifically a Windows Service Application EXE which has not yet been registered or installed anywhere. The menu options would allow user to install/uninstall the EXE as a windows service. Is this possible? If so, then how? It's OK if it's only compatible with Windows Vista+.
There would be 2 menu items:
Install (or Uninstall)
Start (or Stop)
If you're referring to the Shell Context Menu (the right-click window in Windows Explorer), you cannot. You can add to the menu that will be displayed for all .exe files, but not for an individual one.
You could register a context menu handler for all executables, and then filter the filename passed to see if you needed to handle it or not, but this would mean that for every one of the hundreds (or thousands) of executable files on your machine, your filter would run on the slim chance it was your application that was right-clicked.
A possible workaround would be to put a file with a custom extension in your service's folder, and add a context menu handler for that file instead. When that file is right-clicked, the menu items would simply call your service with the appropriate command-line parameters.
(Of course, the best solution is to use the Control Panel's Services applet to manage your service, which is what it's designed specifically do do.)
It is possible, and you need to write shell extensions for Windows Explorer.
References:
http://delphi.about.com/library/bluc/text/uc071701a.htm
http://www.andreanolanusse.com/en/shell-extension-for-windows-32-bit-and-64-bit-with-delphi-xe2/
http://www.codeproject.com/Articles/441/The-Complete-Idiot-s-Guide-to-Writing-Shell-Extens

How keep the debug layout the same as the desktop layout

I try to have a similar layout during editing as well debugging. When running the program my structure and object inspector disappear. I did create my own desktop speedsetting, set the debug desktop to it as well, but as soon as the program runs structure and obejct inspector disappear. How can I prevent that?
A question related to this: the edit menu changes as well. A right click on a procedure name results in a popup menu with the first item being "find declaration". When debugging the first item is "close page". I find the find declaration item a fast way to find some code. Apart from that it is frustrating to lose one's code because you click "no" on the question to save the information (I know, it's my fault but menu's shouldn't change in my opinion).
Thanks,
Arnold
What version of Delphi? Dialogs and menus change between versions (and even between SKUs of the same version).
For the first, open Tools->Options->Environment Options and uncheck Hide designers on run in the Running group box (D2010, XE, and XE2), or Tools->Options->Environment Options and unchecking Hide designers on run in the Compiling and Running group box (D2007).
For the second: The right-click menu is called a context menu, meaning it displays what is appropriate in the context of when it's being shown. It's entirely appropriate for it to change depending on when and how you're using it; that's the way it's supposed to work.
Right-clicking on a .zip file in Windows Explorer is different than right-clicking on a Word .doc file, because they have different options based on context - a zip file has an 'Extract to...' option that the Word document doesn't have, because 'extracting' a Word document doesn't apply. Same applies to right-clicking a .exe file, which has the Run as Administrator option (Win7), as opposed to right-clicking a .pas file, which doesn't offer that option.

Resources