Change app icon of exe in JetBrains Rider - exe

I searched the IDE and online but didn't find anything so I'm asking:
Is there any way to change the application icon of the executable file for the current project in JetBrains Rider?

For now, Rider doesn't have UI for that, but you can do it from code. Press F4 on a project or Select "Edit 'YourProjectFile'" from the right-click menu to edit the project file and add these lines into the Project element:
<PropertyGroup>
<ApplicationIcon>YourIcon.ico</ApplicationIcon>
</PropertyGroup>
YourIcon.ico is the project directory based path where your icon is located.

Related

Setting PYTHONPATH in PyCharm per project [duplicate]

I have a directory that I use for my PYTHONPATH: c:\test\my\scripts\. In this directory, I have some modules I import. It works well in my Python shell.
How do I add this directory path to PyCharm, so I can import what is in that directory?
Out of data, see Duane's answer below.
You need to go to the Main PyCharm Preferences, which will open up a separate window. In the left pane, choose Project:... > Project Interpreter. Now, in the main pane on the right, click the settings symbol (gear symbol) next to the field for "Project Interpreter". Choose More or Show All in the menu that pops up. Now in the final step, pick the interpreter you are using for this project and click on the tree symbol at the bottom of the window (hovering over the symbol reveals it as "Show paths for the selected interpreter"). Add your path by click in the "plus" symbol.
It took me ages to find, so I hope the detailed instructions will help. Further details are available in the PyCharm docs.
It is good practice to have __init__.py in each subfolder of the module you are looking to add, as well as making your project folder a 'Source Root'. Simply right-click on the folder in the path bar and choose 'Mark Directory as ...'
For Pycharm Community 2019.3
File
Settings
Project
Project Interpreter
Cog in top right => Show all
Select the interpreter
On the right toolbar, there are 5 icons, bottom one looks like a folder tree, click it
Press plus +
Select directory, press OK
In PyCharm Community 2019.2/2019.3 (and probably other versions), you can simply:
right-click any folder in your project
select "Mark Directory As"
select "Sources Root"
Modules within that folder will now be available for import. Any number of folders can be so marked.
The following answer is for PyCharm 2022.1.3+ (Professional Edition).
Open up Preferences (mac: ⌘ + ,)
Click on Project and then Project Interpreter
Click on the three vertical dots and the on Show All...
Choose your interpreter and then click on the directory structure icon
Click on the + icon and add the path you need to add to PYTHONPATH.
That's it!
enter image description here
you can go to setting in pycharm
and set interpreter python

Missing project.gradle in Android View

In Android Studio, project.gradle file is not show when in Android View, but is when in Project view
Android View
Project View
How can I fix this ??
From the Gradle Tool Window in Android Studio (View > Tool Window > Gradle),
Right click on the the project's Gradle config with (root) next to its name.
Click on Ignore Gradle project,
and right click again then click on Unignore Gradle project.
The trigger to this 'buggy' phenomenon actually lies outside your project folder.
Assuming a project name of 'SilverBirch', try this:
(a) Close the project in Android Studio 3.0.1.
(b) Rename your project folder (inside the workspace folder) to 'SilverBitch'
(c) Re-open it via Android Studio (you obviously can't do so using 'recent projects')
(d) You should get a window titled Import Gradle Projects with text that reads: The modules below are not imported from Gradle anymore. Check those to be removed from the ide project too:
(e) Tick the (old) project name and click OK.
(f) At last your 'Android' view shows build.gradle(Project:SilverBitch)
(g) Repeat whole process, renaming back to original.
Alternatively, if you're insane, do this:
Locate the project.dat file AND folder for your project - it will have a path that looks something like this (assuming Windows)
C:\Users\<userid>\.AndroidStudio3.0\system\gradle\Projects\5be1ee38\project.dat
[The system-generated hex-string container name will vary, but the file is always project.dat]
The first line of this file references the 'missing' build.gradle and will clearly identify the owning project.
Delete the file AND its containing folder then re-open the project via Android Studio.
Because googling 'project.dat' yielded nothing, and because I made a rude assumption that this contained only system-generated data, and because I couldn't resist 'seeing what happens' I actually deleted
the entire Projects file [C:\Users\<userid>\.AndroidStudio3.0\system\gradle\Projects]
So far, so good - no serious side-effects yet! Maybe those plugins needed re-specifying anyway? etc.
Close Android Studio -> Remove project .idea folder -> Open Android Studio -> Open your project. This worked for me!
NOTE: when you remove .idea folder you will also lose project related preferences (such as XML code style for project)
Right Click on "Gradle Scripts"
Click Load/Unload modules
Load unloaded project module
Done
In my case, I found that my project.iml located in project/.idea
So I move it to project/
and change one line like following:
<module fileurl="file://$PROJECT_DIR$/My_Project.iml" filepath="$PROJECT_DIR$/My_Project.iml" />
the old one should look like this:
<module fileurl="file://$PROJECT_DIR$/.idea/My_Project.iml" filepath="$PROJECT_DIR$/.idea/My_Project.iml" />
After that, go back to android studio, every thing seems perfect!
This worked for me:
In your root project folder, open the *.iml file, and make sure that the value in module external.linked.project.id=, the *.iml filename, and the project directory name are all the same.
Now my build.gradle (Project: X) shows.
This worked for me.
Simply go to your AndroidStudioProjects Directory.
Search for your Project
Rename it with some other name
Strat your Android Studio, and then Import Project (Gradle, Eclipse ADT, etc.)
mode. let the Gradle Build Finish.
And that's it.

How to show Android Gradle Plugin update dialog again

I've updated Android Studio and the dialog for Gradle Plugin update appeared. I've accidentally clicked Don't show again for this project. How can I display the dialog again?
According to this answer you should look for a file .idea/workspace.xml in the project directory and remove property line below.
<component name="PropertiesComponent">
...
<property name="show.do.not.ask.upgrade.gradle.plugin.version" value="2.2.0" />
...
</component>
Also, it's related to a specific gradle version, so if you update it once, you'll see the dialog again the next time.
inside the project directory open the file .idea/workspace.xml
find the line (search for upgrade word)
<property name="sync.plugin.last.upgrade.timestamp" value="154032093109" />
if you change this to a smaller integer like 15403293109 (removing one number from middle) will make the last check date to a previous time and the upgrading dialog will be visible again.
In Android Studio Project, Go to
-> File -> Settings -> Version Control -> Confirmation
Here you will see "Display Options dialog when these commands are invoked".
Now enable the check box "Update". That's all.
With the build.gradle file open in Android Studio, hover your mouse over the yellow text and choose "More actions..." -> "Invoke Upgrade Assistant"

Android Studio project folders not showing

I am unable to see the folders that are physically existing, this is the case.
But in actual fact I have other folders as welll
So what can I do?
Above your the file directory view in Android Studio is a drop down which currently is most likely set to Android. Change it to Project and you should be able to see all your files.
I tried the all the approaches mentioned above but can't fix rather than fix it by a hardcore approach -
Step 1. Close your Android studio.
Step 2. Delete .gradle and .idea folder from your project directory.
Step 3. Open your project and you will see the files again.
go to View menu then click tool window then after click on project
view->toolwindow->project
it worked for me
for me doing the following works:
from menu go to: View--->tool windows ---> Project
then click the little gears icon (settings) you will see an option to change the empty middle packages. it looks like this:
disable "Hide Empty Middle Packages" under the Project View settings dropdown and then it should make everything show up.
If anyone ever does what I did maybe this will help:
Android Studio does not like it when module names begin with a number. I was learning from some tutorials and named the first module "1-name" and the next one "2-name". Setup was fine and it ran, but only the "Gradle" Scripts entry would show in the navigation window in "Android" mode.

Add existing xaml files to visual studio 2012

I want to add a folder containing xaml and cs files plus other directories to a different project on VS. For some reason when I drag the folder from windows explorer to the project where I will like to place that directory visual studio will not let me. Because of that I am manually adding each file and every time I encounter a directory I have to create it. Maybe it is because I am using team foundation server.
Anyways I am adding the files manually so I click on the folder that I want to add the files on visual studio then click on add existing files. Then I select the xaml and code behind file:
when I click add the files get added but visual studio does not recognize that Bytes.xaml.cs is the code behind!
Do I have to manually add a window then copy and paste the contents of the file?
Edit your .csproj file to add a "DependentUpon" element below your "Compile" element for the .xaml.cs file so that it will appear "inside" the .xaml file not simply below it.:
<Compile Include="BytesDisplay\SubControls\Bytes.xaml.cs">
<DependentUpon>Bytes.xaml</DependentUpon>
</Compile>
To easily edit the .csproj file:
Right-click the project and select "Unload Project"
Right-click the project node again and select "Edit [projectname].csproj"
Edit the XML, then close the file
Right-click the project node again and select "Reload Project"
If you drag-and-drop the .xaml file from Windows Explorer into the Solution Explorer window, it will automatically add the .xaml with the code-behind .cs file.
thanks for the write-up. If you edit the xaml and .cs files class declaration to match without class collisions - then when you add the .xaml file it will pick up the .xaml.cs automatically if it is on the same folder. (vs 2013)

Resources