<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: erkn</title>
    <description>The latest articles on DEV Community by erkn (@erkantaylan).</description>
    <link>https://dev.to/erkantaylan</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F265415%2F77160f74-cabf-440e-9010-2e7533561601.jpeg</url>
      <title>DEV Community: erkn</title>
      <link>https://dev.to/erkantaylan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/erkantaylan"/>
    <language>en</language>
    <item>
      <title>make npmi</title>
      <dc:creator>erkn</dc:creator>
      <pubDate>Fri, 07 Feb 2025 10:07:00 +0000</pubDate>
      <link>https://dev.to/erkantaylan/make-npmi-534p</link>
      <guid>https://dev.to/erkantaylan/make-npmi-534p</guid>
      <description>&lt;p&gt;I get bored pretty easily when I do repetitive things and try to automate them, this is one of them, I use WSL1, and run &lt;code&gt;npm i&lt;/code&gt; a lot, but directory buried under couple of paths from the root of .git my options are &lt;code&gt;npm --prefix /path/to/project i&lt;/code&gt; or &lt;code&gt;cd /path/to/project; npm i&lt;/code&gt; both requires to typing the path by hand. Also another problem is npm is not a exe, it is a .bat file which you cannot run directly from WSL1, you need to switch to cmd by typing cmd.exe or open new tab, which requires mouse movement. So I have been annoyed for a while and now I had half an hour to fix the problem. The solution is&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight make"&gt;&lt;code&gt;&lt;span class="nv"&gt;TARGET_DIR&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; /path/to/projec
&lt;span class="nl"&gt;npmi&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
    &lt;span class="nb"&gt;cd&lt;/span&gt; &lt;span class="p"&gt;$(&lt;/span&gt;TARGET_DIR&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; cmd.exe /c &lt;span class="s2"&gt;"npm.cmd i"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>automation</category>
      <category>devops</category>
      <category>makefile</category>
      <category>make</category>
    </item>
    <item>
      <title>[001] Create WPF Projects Like a PRO</title>
      <dc:creator>erkn</dc:creator>
      <pubDate>Tue, 05 Nov 2019 23:11:28 +0000</pubDate>
      <link>https://dev.to/erkantaylan/001-create-wpf-projects-like-a-pro-12ba</link>
      <guid>https://dev.to/erkantaylan/001-create-wpf-projects-like-a-pro-12ba</guid>
      <description>&lt;p&gt;I wonder what was I taking when I write this. &lt;/p&gt;

&lt;p&gt;~~&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TL;DR;&lt;/strong&gt; Read only &lt;strong&gt;bold&lt;/strong&gt; ones you fat.&lt;/p&gt;

&lt;p&gt;I bet, you didn't know you can do like this.&lt;/p&gt;

&lt;p&gt;[1] A purpose to open a WPF project&lt;/p&gt;

&lt;p&gt;[2] JetBrains Rider (No Tonny, Visual Studio is bad for your health.)&lt;/p&gt;

&lt;p&gt;[3] Open Rider ♥&lt;/p&gt;

&lt;p&gt;[4] Click New Solution&lt;/p&gt;

&lt;h4&gt;
  
  
  [5] Select &lt;code&gt;.Net Core&lt;/code&gt; (But sir I don't want dotnet core, I want my project in normal regular &lt;code&gt;NetFramework X.Y&lt;/code&gt; bla bla bla...) Just select the fucking &lt;code&gt;DotNet Core Desktop Application&lt;/code&gt; I will get there alright.
&lt;/h4&gt;

&lt;p&gt;[6] Check &lt;code&gt;Create .git&lt;/code&gt; and thank me now.&lt;/p&gt;

&lt;p&gt;[7] Finally, hit the &lt;code&gt;Create&lt;/code&gt; button (Do not forget to give a name to your $0.0F project.)&lt;/p&gt;

&lt;h4&gt;
  
  
  [8] Open the &lt;code&gt;[projectname].csproj&lt;/code&gt; file. We have work to do.
&lt;/h4&gt;

&lt;h4&gt;
  
  
  [9] Change &lt;code&gt;&amp;lt;TargetFramework&amp;gt;&lt;/code&gt; to &lt;code&gt;&amp;lt;TargetFrameworks&amp;gt;&lt;/code&gt; for supporting more customer and earn more money and do more writing of course.
&lt;/h4&gt;

&lt;h4&gt;
  
  
  [10] Since you don't want to write with &lt;code&gt;.Net Core&lt;/code&gt; remove &lt;code&gt;netcoreapp3.1&lt;/code&gt; and write &lt;code&gt;net48&lt;/code&gt;
&lt;/h4&gt;

&lt;p&gt;[11] For now, you should be able to Build and Run your project and see the worthless Window. Well done!&lt;/p&gt;

&lt;p&gt;You might want to add multiple projects for your &lt;code&gt;Business&lt;/code&gt; or &lt;code&gt;Core&lt;/code&gt; or &lt;code&gt;BLL&lt;/code&gt; for your garbage code. &lt;/p&gt;

&lt;h4&gt;
  
  
  [12] Guess next step. When you are creating new project you will always use &lt;code&gt;.NetCore&lt;/code&gt; alrigt.
&lt;/h4&gt;

&lt;p&gt;To understand the reasion you can create a regular project and compare &lt;code&gt;*.csproj&lt;/code&gt; files.&lt;/p&gt;

&lt;h4&gt;
  
  
  [13] Go create a &lt;code&gt;.NetCore ClassLibrary&lt;/code&gt; and repeat [8], [9] and [10]
&lt;/h4&gt;

&lt;h4&gt;
  
  
  [14] When you are create a class library on Rider, it does not automatically adds &lt;code&gt;&amp;lt;UseWPF&amp;gt;true&amp;lt;/UseWPF&amp;gt;&lt;/code&gt; like it adds on &lt;code&gt;DesktopApplication&lt;/code&gt; so add it.
&lt;/h4&gt;

&lt;h4&gt;
  
  
  [15] Also same goes for &lt;code&gt;Sdk="Microsoft.NET.Sdk.WindowsDesktop"&lt;/code&gt; too.
&lt;/h4&gt;

&lt;h4&gt;
  
  
  [16] As last step before write your own code create a class named &lt;code&gt;AssemblyInfo.cs&lt;/code&gt; with filled with code:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;using System.Windows;

[assembly: ThemeInfo(
    ResourceDictionaryLocation.None,
    ResourceDictionaryLocation.SourceAssembly 
)]

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you are good to go.&lt;/p&gt;

&lt;p&gt;If you do not do step [14] or [15] or [16] Rider cannot build and complain that you suck and do not deserve to use &lt;code&gt;JetBrains Rider&lt;/code&gt; so you should go back to use &lt;code&gt;Visual Studio&lt;/code&gt; like every regular boring developers do. (When Rider fixes this problem, this paragraph will destroy itself.).&lt;/p&gt;

&lt;p&gt;~~&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>rider</category>
      <category>wpf</category>
      <category>xaml</category>
    </item>
  </channel>
</rss>
