-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configuration constructor requires full path if relative paths are used to add Configuration files #13
Comments
Are you keeping the parameterless constructor? |
Why isn't this done "by convention"? It seems like the sensible default. |
@adamralph the parameterless constructor remains because not all configurations have anything to do with files on disk. Also fully-qualified paths passed to @bricelam "convention" was based on information from DI that is not available in the |
@dougbu So yes, if We should revert both of these when aspnet/dnx#1253 is resolved. |
@bricelam no, aspnet/dnx#1253 is unrelated since the application base is not the same as the project base needed to find individual configuration files. One example scenario is MVC functional tests which load numerous web sites, many with their own configuration files, into a single application. But the issue is more general... |
The intent is to remove CallContextServiceLocator from as many APIs as we can because it makes them dnx specific. |
When constructing with no path, why can't the current directory be used for relative paths? |
@adamralph what "current directory"? The user's |
So I guess dnx has no static If so, that's perfectly understandable. I can understand the motivation to omit it. |
This is very ugly. We need to pass path where config file is located and all the paths are usually stored in config itself. |
Why are you newing up the config in 54 places? |
I have a class library project which is referenced from ASP.NET project.
This method is called 54 times from different places. In the end I have managed to solve my issue by passing static string variable into this class from startup of my ASP.NET 5 project. |
@davidfowl It seems that the new code you suggest is no longer current. Is that right?
|
@roydukkey IApplicationEnvironment is no longer required. See #88. |
Old code:
This will throw the following exception now:
New code:
The text was updated successfully, but these errors were encountered: