Skip to content
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

No way to specify app.config with console runner #246

Closed
CharliePoole opened this issue Jun 27, 2017 · 6 comments
Closed

No way to specify app.config with console runner #246

CharliePoole opened this issue Jun 27, 2017 · 6 comments
Assignees
Milestone

Comments

@CharliePoole
Copy link
Collaborator

@cyanite commented on Tue Jun 27 2017

Using nunit-console runner on individual dll's, there is no way to specify the app.config file to use. To do that you have to create an .nunit file and use configfile="app.config". There should be a command line option to do this.

We have a huge number of dll's which require assembly redirects and we don't have config files written for each of them, but only for our executables.

@CharliePoole
Copy link
Collaborator Author

If you don't use any command-line option, then nunit uses <yourtest>.dll.config. Doesn't this work in your situation?

@cyanite
Copy link
Contributor

cyanite commented Jun 29, 2017

@CharliePoole yes it can work, but the problem is that we would like to not copy 800 identical .config files (for the 800 dll's), so while we do have a kind of work-around, it would be great if you could specify this on the command line. This is for easier use in automated harvesting scripts that we use.

Sorry for opening the issue in the wrong project.

@cyanite
Copy link
Contributor

cyanite commented Jun 29, 2017

Another issue is when you mention multiple dll's on the command line. As far as I can see no app.config is loaded in that case.

@CharliePoole
Copy link
Collaborator Author

I see the problem. It would not be out of the question, in my view, for us to add a --configfile option. What we can't do - or at least I don't want to do - is have the option repeat and apply to the previous or following assembly. We do not have any position-dependency in the command-line now and I don't think we want to introduce it. So the option would apply to every assembly, which is what you want.

WRT multiple dlls on the command-line, we should be using the properly named (test.dll.config) file that is located in the same directory as the assembly. If not, it's a bug.

@ChrisMaddock
Copy link
Member

I've labelled this as a feature to go on the backlog. It makes sense to me that you can access this functionality, which already exists for using in NUnit projects, directly from the command line. @nunit/engine-team - please shout up if anyone disagrees!

@cyanite - providing nobody objects, would you be interested in doing a PR for this? The functionality in the Engine already exists, it should just be a matter of exposing that to the command line, I think.

@debasisj
Copy link

it would be great if nunit can include app.config in the command

@CharliePoole CharliePoole self-assigned this Jan 12, 2018
@rprouse rprouse added this to the 3.8 milestone Jan 26, 2018
josiahpeters pushed a commit to josiahpeters/cake that referenced this issue Sep 19, 2018
…p.config files

- Modified NUnit3Settings class to support new ConfigurationFile property that maps to --configfile=app.config for the nunit-console runner
- In the 3.8.0 release of the nunit-console runner, a new command line argument was added that supports loading the app.config file from an alternative path or file.
- Here is the new 3.8.0 feature: nunit/nunit-console#246
josiahpeters pushed a commit to josiahpeters/cake that referenced this issue Sep 19, 2018
…p.config files

- Modified NUnit3Settings class to support new ConfigurationFile property that maps to --configfile=app.config for the nunit-console runner
- In the 3.8.0 release of the nunit-console runner, a new command line argument was added that supports loading the app.config file from an alternative path or file.
- Here is the new 3.8.0 feature: nunit/nunit-console#246
josiahpeters pushed a commit to josiahpeters/cake that referenced this issue Sep 19, 2018
…p.config files

- Modified NUnit3Settings class to support new ConfigurationFile property that maps to --configfile=app.config for the nunit-console runner
- In the 3.8.0 release of the nunit-console runner, a new command line argument was added that supports loading the app.config file from an alternative path or file.
- Here is the new 3.8.0 feature: nunit/nunit-console#246
josiahpeters pushed a commit to josiahpeters/cake that referenced this issue Sep 25, 2018
…p.config files

- Modified NUnit3Settings class to support new ConfigurationFile property that maps to --configfile=app.config for the nunit-console runner
- In the 3.8.0 release of the nunit-console runner, a new command line argument was added that supports loading the app.config file from an alternative path or file.
- Here is the new 3.8.0 feature: nunit/nunit-console#246
josiahpeters pushed a commit to josiahpeters/cake that referenced this issue Sep 27, 2018
…p.config files

- Modified NUnit3Settings class to support new ConfigurationFile property that maps to --configfile=app.config for the nunit-console runner
- In the 3.8.0 release of the nunit-console runner, a new command line argument was added that supports loading the app.config file from an alternative path or file.
- Here is the new 3.8.0 feature: nunit/nunit-console#246
josiahpeters pushed a commit to josiahpeters/cake that referenced this issue Sep 27, 2018
- Modified NUnit3Settings class to support new ConfigurationFile property that maps to --configfile=app.config for the nunit-console runner
- In the 3.8.0 release of the nunit-console runner, a new command line argument was added that supports loading the app.config file from an alternative path or file.
- Here is the new 3.8.0 feature: nunit/nunit-console#246
josiahpeters pushed a commit to josiahpeters/cake that referenced this issue Oct 2, 2018
- Modified NUnit3Settings class to support new ConfigFile property that maps to --configfile=app.config for the nunit-console runner
- In the 3.8.0 release of the nunit-console runner, a new command line argument was added that supports loading the app.config file from an alternative path or file.
- Here is the new 3.8.0 feature: nunit/nunit-console#246
devlead added a commit to cake-build/cake that referenced this issue Oct 2, 2018
* josiahpeters-josiahpeters-feature/GH-2297:
  GH2297 - Extended NUnit3Settings to support alternative app.config files - Modified NUnit3Settings class to support new ConfigFile property that maps to --configfile=app.config for the nunit-console runner - In the 3.8.0 release of the nunit-console runner, a new command line argument was added that supports loading the app.config file from an alternative path or file. - Here is the new 3.8.0 feature: nunit/nunit-console#246
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants