<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>gemini0020</author_name>
  <author_url>https://blog.hatena.ne.jp/gemini0020/</author_url>
  <blog_title>らくの遊び場</blog_title>
  <blog_url>https://raku-lab.hatenablog.jp/</blog_url>
  <categories>
    <anon>C#</anon>
  </categories>
  <description>概要 アプリは実行すると基本的にexeのある場所をカレントディレクトリとし実行されますが、ショートカットから実行した場合その限りではありません。 相対パスで実行するショートカットに %windir%\explorer.exe &quot; を使用していると Directory.GetCurrentDirectory() System.Environment.CurrentDirectory でパスを取得すると、上記のパスになってしまいます。 これではDirectoryクラスを相対パスで使用することが出来ません。 ですのでカレントディレクトリの移動を行う必要があります。 対策 System.AppDoma…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fraku-lab.hatenablog.jp%2Fentry%2F2018%2F11%2F05%2F113547&quot; title=&quot;【C#】ショートカットから起動するとDirectoryクラスのカレントディレクトリが違う問題 - らくの遊び場&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2018-11-05 11:35:47</published>
  <title>【C#】ショートカットから起動するとDirectoryクラスのカレントディレクトリが違う問題</title>
  <type>rich</type>
  <url>https://raku-lab.hatenablog.jp/entry/2018/11/05/113547</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
