title: Problems reading a JSON file in another project
body: <p>Problems reading a JSON file in another project</p>
  
  <p>Guys, I'm having trouble reading a certain Json file that is in another project. I did a sample project has that the following structure. Sample.UI.MVC, Sample.Infra.Data, Sample.Domain, Sample.Application.
  In the Sample.UI.MVC layer I initialize in the Startup.cs file a class that is in the Sample.Infra.Data project, which dynamically generates Seeds in my Database. However, an error is occurring because EF Core is trying to fetch the JSON file inside the Sample.UI.MVC layer and not inside Sample.Infra.Data.</p>
  
  <p>I'm using Asp Net Core 2.2 with VS Code
  Seed\Seed.cs</p>
  
  <pre><code>namespace Sample.Infra.Data.Seed
  {
      public class Seed
      {
         private readonly DataContext _context;
         private readonly IHostingEnvironment hostingEnvironment;
         private readonly UserManager&lt;Usuario&gt; _userManager;
  
      public Seed(DataContext context, IHostingEnvironment hostingEnvironment)
      {
          _context = context;
          hostingEnvironment = hostingEnvironment;
          // _userManager = userManager;
  
      }
  
      public void SeedData()
      {
  
          try
          {
              // if (!_userManager.Users.Any())
              // {
  
  
  
              var userData =  File.ReadAllText($"json/UserSeedData.json");
                  var users = JsonConvert.DeserializeObject&lt;List&lt;Usuario&gt;&gt;(userData);
                  AddNewType(users);
              // }
              _context.SaveChanges();
  
          }
          catch (Exception ex)
          {
  
              Console.WriteLine($"erro: {ex.Message}");
          }
       }
     }
  }
  </code></pre>
  
  <p>But I get the error: </p>
  
  <blockquote>
    <p>Could not find a part of the path<br>
    'D:\App\projects\csharp\asp\core\Sample.UI.MVC\json\UserSeedData.json'.</p>
  </blockquote>
  
  <p>Code Seed.cs:</p>
  
  <p><a href="https://i.stack.imgur.com/7mmEu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7mmEu.png" alt="Code Seed.cs"></a></p>
  
  <p>View Folder Json:</p>
  
  <p><a href="https://i.stack.imgur.com/xiO9H.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xiO9H.jpg" alt="View Folder Json"></a></p>