473,503 Members | 1,655 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

app.exe.config and unmanaged code

I have an unmanaged C++ application that is linked with managed C++
and C# libraries. In one of the C# libraries, I have a Settings
file. This seems to load and save just fine to and from the user
settings directory (C:\Documents and Settings\Michael Kelley\Local
Settings\Application Data
\edTesteditor.exe_Url_uvu2olspzeirw25ckveiedbklpgm qaz5\0.0.0.0). Now
I want to have a default file that is loaded if the settings don't
currently exist. After doing some research, it seemed that an
app.exe.config file would do the trick. I copied the user.config in
the user settings directory to the application directory thinking this
would automatically work, but that isn't the case - I get the message
below. Any ideas what I might be doing wrong?

---------------------------
Microsoft Visual Studio
---------------------------
Unable to start program 'c:\tree2\trunk\soft\src\edEditor\edTerrain
\Win32_Debug_edTesteditor\edTesteditor.exe'.

This application has failed to start because the application
configuration is incorrect. Review the manifest file for possible
errors. Reinstalling the application may fix this problem. For more
details, please see the application event log.
---------------------------
OK
---------------------------

Jun 20 '07 #1
1 3247
Any ideas what I might be doing wrong?
>
You can't be copying some user.config file thinking it's going to
replace app.exe.config. An app.exe.config has XML elements in it that a
user.config will not have in it that the program needs, which is causing
your problems.

http://msdn2.microsoft.com/en-us/lib...a0(VS.80).aspx

It seems to me that if you need some default settings in a user.config
file, because some other config file is not there, then you need to put
the default.config in place not replacing app.exe.config.

Maybe, you need to use ConfigurationManager in the .Net 2.0 Framework or
ConfigurationSettings, which is part of the Application Configuration
Block that can be implemented and used with .Net 1.1 Framework; if you
have control of the managed code, use Google and look them up
Jun 20 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
7744
by: José Joye | last post by:
Hello, I have an assembly that is used by a VB6 application. This application can be a normal exe or an ActiveX (called through CCW). My assembly needs to get extra info from a config file. In...
1
529
by: Kevin Lewis | last post by:
Is there .NET framework code that I can call from an assembly (.dll), that will load the settings of a configuration file into the .NET framework. For example you can set up Switches and...
6
3626
by: Vai2000 | last post by:
Hi All, I have created a COM+ Component Foo.dll, I was wondering where I can store its Config File and what should I name it? this COM+ Component calls a WebSvc too! the IDE Created an app.config...
1
1614
by: Sparhawk | last post by:
Hi, my company is going to migrate a large VC++ application to .NET to make use of Windows Forms (the old class library is not updated any more). We are not planning to migrate the rest of the...
2
4165
by: Joseph Geretz | last post by:
Help me understand this, please. I have a Winforms app, lets call it WinApp.exe. I also have a DLL, lets call it WebBroker.dll. The purpose of WebBroker.dll is to broker an interface with a...
1
1487
by: Anthony Yott | last post by:
Folks this may take a little while to explain but here goes. I've got a VS 2005 .NET C# library (lets call it Elvis.dll because I'm sick of seeing Foo) that I created that will be consumed by...
3
3646
by: Andrew | last post by:
I have a class library that has app.config that has <system.diagnostics> that specifies trace listeners. The class library is loaded by a third party unmanaged application. I want the .NET...
0
1246
by: Fainster | last post by:
Hi I have written a c# class library which consumes other .net assemblies (this is called from an unmanaged c++ app). All worked well until the assemblies I consume have been upgraded (existing...
0
950
by: iprogram2008 | last post by:
I have a huge complex app.config and one of the sections in the config is connection strings. I have a dot net class that uses this app.config and a com interop is generated for this dot net class....
0
7086
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7280
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7330
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7460
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5014
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3167
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1512
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.