How can I stop Rider from showing the .sln file or .csproj files when I select the solution or project in Rider's Explorer? - rider

In Rider, when I select the solution or a project in its Explorer view, it automatically opens the .sln or .csproj file in the editor. While I sometimes want to look or edit .csproj files, that's the exception rather than the norm.
Can I disable this "feature" of Rider?

You can disable Autoscroll to source in the solution explorer settings (under the gear icon or via solution explorer toolbar).
We have a feature request to customize autoscroll behavior, feel free to track the status:
https://youtrack.jetbrains.com/issue/RIDER-17295
I hope I will find time and fix it in 2019.2 release cycle.

Related

Wrong place of file in solution explorer

When adding a file to Visual Studio, it's not in the right place in the Solution Explorer: It is at the root of the project. Bug is only in the solution explorer, it is in the right directory when checking with windows's explorer.
It happens randomly, not always.
Restarting VS does nothing, unloading and reloading project too. I have to regenerate the solution (with Premake)
Bug only happen with premake generated solutions
So, how to get the file back to his right place ?
My version of VS:

Is there a way to view the errors associated with loading a project file in Rider?

We have a large (466 project) visual studio solution. When using project rider, one of the projects doesn't fully load, and the solution explorer shows (with errors) after the project name. Is there anywhere in Rider to view said errors?
You have to open "Log" tool window:
Also you can run Rider in internal mode in execute "Reload project and show logs" context action from Solution Explorer. It that case Rider will reload a project, collect all information from MsBuild and show log file in editor.

How do I compile vb code to exe?

I have some vb code that is structured like this:
./AssemblyInfo.vb
./WindowsApplication1/AppUtils.vb
./WindowsApplication1/Form1.vb
./WindowsApplication1.Form1.resx
./WindowsApplication1.My/MyApplication.vb
./WindowsApplication1.My/MyComputer.vb
./WindowsApplication1.My/MyProject.vb
./WindowsApplication1.My/MySettings.vb
./WindowsApplication1.My/MySettingsProperty.vb
./WindowsApplication1.My.Resources/Resources.vb
./WindowsApplication1.Resources.resx
./WindowsApplication1.vbproj
I have tried several times trying to create an empty solution and then import the .vb and the .vbproj but I can not stumble on the right combination to get it to expose the build button on the menu so we can build it.
I am not a windows person so googling is difficult because the terminology is difficult to understand: Example: I use the New Project button to create a solution; that is confusing.
In short, I am hoping to get instructions that will cover:
A) Creating a new solution,
B) Importing the code listed above into the solution, and
C) Compiling the code into an .exe.
BTW: I am using Visual Studio 2008.
If you give me you best guess I will edit your answer as I try it and figure out more precise instructions.
[EDIT] When I double click on the .vbproj file on windows explorer visual studio opens and the .vbproj file is displayed as XML. No build button is shown.
[EDIT] When I do File -> Open Project... .vbproj is not listed as a supported extension so there is no way to load the project from that menu item. That menu items does not have a *.* all source option. The .vbproj file has an icon that indicates that windows knows what it is: "Visual Basic Project file". This code is the result of a decompiling an .exe of the original project where the source was lost.
[EDIT] I just followed Joel's advice, but I used VS2005 rather than VS2008 and it was able to find the .vbproj file. Does that make sense? Is there something wrong with my VS2008 that makes it not open .vbproj files or is that to be expected?
[EDIT] The version of VS that CANNOT see the .vbproj is VS2008 9.0.30729.4462. The version of VS that CAN see the .vbproj is VS2005 8.0.50727.762. By "see" I mean when I follow Joel's instructions of using File->Open Project VS will recognize the .vbproj file as something it can open.
When I double click on the .vbproj file on windows explorer visual studio opens and the .vbproj file is displayed as XML
Something is broken with file associations on your Windows system.
You can open Visual Studio first and choose "Open Project/Solution" inside Visual Studio. Doing this will makes sure Visual Studio treats it as a project file, rather than just an XML file, and will allow you to attempt to build the project.
BTW, recent versions of Visual Studio are free. You might be able to fix this by updating to a more recent version.

Edit the .csproj file in Xamarin Studio

I am trying to edit the .csproj file in Xamarin studio. I went to open the .csproj through the directory but it just opens my Xamarin android solution and no file is shown. How can I access the .csproj file in Xamarin studio?
Make sure you open it into the text editor.
In the file open dialog you need to select Source Code Editor in the Open With drop down box.
By default it will open with the Solution Workbench.
Another way to open the .csproj file into the text editor is to right click the project in the Solution window and select Tools - Edit File.

Where is the default Settings file in a Visual Basic Project?

I'm editing a Visual Basic application. I save some settings per user. I need to know where the application configuration is located in Solution Explorer.
If you are looking for the user settings strings, you can see them from the menu:
Project->[YourProject] Properties...
Then select 'Settings' at the side tab.
The project application configuration is under My Project in the Solution explorer, or the project window mentioned above, but the 'Application' tab.
Your settings are in Settings.settings file which is by default hidden in a VB.NET project. The file shows settings properties and their default values.
To show it you can:
Click on Project node in Solution Explorer
Click on Show All Files button on the toolbar
Open My Project node
Double click on Settings.settings to open it in designer
Alternatively as mentioned also by Jim, you can Right Click on Project node and choose Properties, then you can see the settings in Settings tab of project properties.