The problem is I can't do any debugging involving MailLogger because if it is referenced it crashes. I turned off Debug Just My Code, set a breakpoint and tried again but it still crashed. Now I will try the other Core.dll
Edit: Changing out the dll did nothing.
Ranorex fails to run, system.TypeInitializationException
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Ranorex fails to run, system.TypeInitializationException
IMHO you see two separate problems.
When you debug in VS, click the "View Details..." link in the exception box and see all properties for the exception, especially the InnerException property. That should tell you what the real cause for the exception is.
My guess is that either some required DLLs are missing (e.g. in the output directory) or that you reference a wrong version of a Ranorex DLL.
It seems that when running using Ranorex Studio you get a different exception. That exception may be caused by a missing app.config file in the output directory, causing your MailLogger initialization to return null values.
Anyway, Ranorex Studio was able to get that far, so it might have corrected some of your DLL references. Have you tried opening the solution in Ranorex Studio and saving the solution and all projects?
Regards,
Alex
Ranorex Team
When you debug in VS, click the "View Details..." link in the exception box and see all properties for the exception, especially the InnerException property. That should tell you what the real cause for the exception is.
My guess is that either some required DLLs are missing (e.g. in the output directory) or that you reference a wrong version of a Ranorex DLL.
It seems that when running using Ranorex Studio you get a different exception. That exception may be caused by a missing app.config file in the output directory, causing your MailLogger initialization to return null values.
Anyway, Ranorex Studio was able to get that far, so it might have corrected some of your DLL references. Have you tried opening the solution in Ranorex Studio and saving the solution and all projects?
Regards,
Alex
Ranorex Team
Re: Ranorex fails to run, system.TypeInitializationException
The InnerException pointed out a section of the app.config file that wasn't correct. I removed the section and Visual Studio is working again. Ranorex is still seeing the null value error, and I agree that this is an app.config problem still. I've been looking for where the path to locate the app.config file is stored but haven't had any luck. I'm hoping someone can tell me where that is, as it seems to be the root of the problem.
Edit
I had the code display the filepath of the config file using
Console.WriteLine(AppDomain.CurrentDomain.SetupInformation.ConfigurationFile);
and they are not looking in the same place. When I run from Ranorex, the filepath is C:\Program Files (x86)\Ranorex 6.0\Bin\Ranorex.UiaLauncher32.exe.Config , while when run from VS the path is the config file contained in the project. I'm not allowed to edit the config file directly in Ranorex, so the question becomes what do you think I should do.
Edit
I had the code display the filepath of the config file using
Console.WriteLine(AppDomain.CurrentDomain.SetupInformation.ConfigurationFile);
and they are not looking in the same place. When I run from Ranorex, the filepath is C:\Program Files (x86)\Ranorex 6.0\Bin\Ranorex.UiaLauncher32.exe.Config , while when run from VS the path is the config file contained in the project. I'm not allowed to edit the config file directly in Ranorex, so the question becomes what do you think I should do.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Ranorex fails to run, system.TypeInitializationException
Hello jt1,
Usually, the application configuration file is located in the output folder of the project.
<Project>\bin\Debug\<executable name>.exe.Config
Furthermore, there should be an app.config file in the project directory. May I ask to check if those files exist?
Sincerely,
Johannes
Usually, the application configuration file is located in the output folder of the project.
<Project>\bin\Debug\<executable name>.exe.Config
Furthermore, there should be an app.config file in the project directory. May I ask to check if those files exist?
Sincerely,
Johannes
Re: Ranorex fails to run, system.TypeInitializationException
There was no Debug folder in the <Project>\bin folder, so that config file does not exist. There is one in the project directory.
Thank you.
Thank you.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Ranorex fails to run, system.TypeInitializationException
Hi jt1,
In order to analyze the issue, it would be helpful if you could send the compressed Solution to [email protected].
If the file is too large to be sent by email, please send an email to [email protected], too. Then, I will let you know the credentials for our ftp server.
Thank you in advance.
Sincerely,
Johannes
In order to analyze the issue, it would be helpful if you could send the compressed Solution to [email protected].
If the file is too large to be sent by email, please send an email to [email protected], too. Then, I will let you know the credentials for our ftp server.
Thank you in advance.
Sincerely,
Johannes
Re: Ranorex fails to run, system.TypeInitializationException
Hello Johannes,
After talking with my team we decided our solution contains too much sensitive information. We discussed sending it with the information removed but that may alter the solution enough to not be useful for your troubleshooting. What are your thoughts?
Thank you
After talking with my team we decided our solution contains too much sensitive information. We discussed sending it with the information removed but that may alter the solution enough to not be useful for your troubleshooting. What are your thoughts?
Thank you
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Ranorex fails to run, system.TypeInitializationException
Hello jt1,
That depends on which information exactly needs to be removed. As long as the issue remains reproducible with the solution, feel free to remove those parts from the solution. Alternatively, you could try creating a sample solution that illustrates the issue.
In regard to the sensitive information, we could also sign an NDA (Non-disclosure agreement) if it will be required from your side. May I ask to contact us by email to discuss the further steps?
I look forward to hearing from you.
Sincerely,
Johannes
That depends on which information exactly needs to be removed. As long as the issue remains reproducible with the solution, feel free to remove those parts from the solution. Alternatively, you could try creating a sample solution that illustrates the issue.
In regard to the sensitive information, we could also sign an NDA (Non-disclosure agreement) if it will be required from your side. May I ask to contact us by email to discuss the further steps?
I look forward to hearing from you.
Sincerely,
Johannes