Directory.GetCurrentDirectory .net core 2.2 [pending]

-1

When using Directory.GetCurrentDirectory in version 2.2 of .net core, it is not returning the application path as it worked until version 2.1.

Example:

var config =  new ConfigurationBuilder()
            .SetBasePath(Directory.GetCurrentDirectory())
            .AddJsonFile("appsettings.json")
            .Build();

Until version 2.1 it returned the application path as: (C: \ project \ solution \ xxxx.xxx.MVC), now it returns (C: \ Program Files \ IIS Express). Do you need anything?

    
asked by anonymous 29.12.2018 / 23:01

1 answer

0

I discovered ... The development team actually changed Directory.GetCurrentDirectory in this new release (2.2).

has a discussion with a palliative solution here > > link

The tip is there

Thanks.

    
30.12.2018 / 00:47