2005 -> 2008 porting issue

S

Sid Price

I am moving a large application from VB 2005 to 2008 and I have a problem
when I try to run the application either directly or within VS. I get the
following message before the main form load method is called. It appears to
be a DLL issue of some kind but searching has not revealed what the problem
is.

"The applications has failed to start because the application configuration
is incorrect ..."

If I check the event log I see two errors:

1. Syntax error in manifest or policy file "C:\Data
Root\Projects\Pacific\Code\VistaMax\Tools 500
Series\Community_Monitor\CommunityMonitorVer4\Debug\CommunityMonitor.exe.Config"
on line 1.

2. Generate Activation Context failed for C:\Data
Root\Projects\Pacific\Code\VistaMax\Tools 500
Series\Community_Monitor\CommunityMonitorVer4\Debug\CommunityMonitor.exe.
Reference error message: The operation completed successfully.

The config file has the following in it:
<?xml version="1.0" encoding="Windows-1252"?>
<configuration>
<appSettings>
<!-- User application and configured property settings go here.-->
<!-- Example: <add key="settingName" value="settingValue"/> -->
<add key="colDeviceNumber.Width" value="60" />
<add key="colIPAddress.Width" value="60" />
<add key="colMacAddress.Width" value="60" />
<add key="colName.Width" value="60" />
</appSettings>
</configuration>

Any pointers to fixing this would be much appreciated,
Sid.
 
D

dotNetDave

I think the easiest way to fix this is to remove the app.config file and then
create a new one in 2008 and add the settings back. I have run into this in
web apps and that was the fastest way to get back up and running.

David

======================================
David McCarter [Microsoft MVP]
www.dotNetTips.com
David McCarter''''s .NET Coding Standards available at:
http://www.cafepress.com/geekmusicart.1654787045
 
S

Sid Price

Thanks Dave, I had contacted MS support and it turned out to be a problem
with the encoding setting in the app.config file being different to the
encoding generated by VS 2008. VS 2008 was asking for "UTF-8" while the
..config file (below) was using "Windows-1252". When they were both "UTF-8"
the application error went away.
Sid.

dotNetDave said:
I think the easiest way to fix this is to remove the app.config file and
then
create a new one in 2008 and add the settings back. I have run into this
in
web apps and that was the fastest way to get back up and running.

David

======================================
David McCarter [Microsoft MVP]
www.dotNetTips.com
David McCarter''''s .NET Coding Standards available at:
http://www.cafepress.com/geekmusicart.1654787045


Sid Price said:
I am moving a large application from VB 2005 to 2008 and I have a problem
when I try to run the application either directly or within VS. I get the
following message before the main form load method is called. It appears
to
be a DLL issue of some kind but searching has not revealed what the
problem
is.

"The applications has failed to start because the application
configuration
is incorrect ..."

If I check the event log I see two errors:

1. Syntax error in manifest or policy file "C:\Data
Root\Projects\Pacific\Code\VistaMax\Tools 500
Series\Community_Monitor\CommunityMonitorVer4\Debug\CommunityMonitor.exe.Config"
on line 1.

2. Generate Activation Context failed for C:\Data
Root\Projects\Pacific\Code\VistaMax\Tools 500
Series\Community_Monitor\CommunityMonitorVer4\Debug\CommunityMonitor.exe.
Reference error message: The operation completed successfully.

The config file has the following in it:
<?xml version="1.0" encoding="Windows-1252"?>
<configuration>
<appSettings>
<!-- User application and configured property settings go here.-->
<!-- Example: <add key="settingName" value="settingValue"/> -->
<add key="colDeviceNumber.Width" value="60" />
<add key="colIPAddress.Width" value="60" />
<add key="colMacAddress.Width" value="60" />
<add key="colName.Width" value="60" />
</appSettings>
</configuration>

Any pointers to fixing this would be much appreciated,
Sid.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top