Can I set Option Explicit and Option Strict on a Project/Solution level?
Solution 1:
Yes, you can set these options for the entire project in your project's Properties:
- Right-click on your project in the Solution Explorer, and select "Properties" from the context menu.
- Click on the "Compile" tab in the list on the left-hand side.
- Set the values of the comboboxes as desired.
You could also choose to specify these settings globally in the Visual Studio options (although this will only affect new projects, not existing ones):
- In the Visual Studio environment, click on the "Tools" menu and select "Options".
- Expand the "Projects and Solutions" item in the treeview on the left-hand side of the dialog.
- Select the "VB Defaults" item.
- Set your "Default project settings" as desired.
Solution 2:
Well, the obvious place is to look in the project options dialog, and lo and behold: