Feed
Google+
Contact
XING
LinkedIn
Twitter
ICQ
meebo.com

VS - difference between F5 and CTRL + F5, or how to find the error

by Roland Schumacher alias GENiALi 10. Oktober 2008 -- 326 words  -- 1 mal gelesen

That took a lot of nerves now. Actually I should make a release build and the check in. From sheer habit I have launched the executable then times and found that did not want the application. How to not? Well, that was it now to find.

So I put the debug configuration and pressed F5. The application started without errors. A double-click on the EXE or a CTRL + F5, the application did not want. :-(

First I tested then all directories on a read-only. There was nothing read-only.

Because I got only a generic error that unfortunately say anything where what happened I had to painstakingly me browse until I was there where it bum made. I could debug yes. MessageBox.Show ("Hello x") where it still did I looked.

Eventually I ended up here.

protected override DbConnection CreateConnection 
(string connectionString) {
	return new SqlConnection(connectionString);
}}

Now I could everything in a try {} catch() block Pack and see what was exactly the mistake.

System.TypeInitializationException: The type initializer for
"System.Data.SqlClient.SqlConnection" caused an exception.

--System.TypeInitializationException: The type initializer for
"System.Data.SqlClient.SqlConnectionFactory" caused an exception.
--System.TypeInitializationException: The type initializer for
"System.Data.SqlClient.SqlPerformanceCounters" has an exception
gives.
--System.Configuration.ConfigurationErrorsException: The
Unable to initialize configuration system.
--System.Configuration.ConfigurationErrorsException: Unknown
Configuration section "lag.wordplus". (P:\ProjectX\WP.config line 8)
at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors (Boolean)
(ignoreLocal)
When
System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors (ConfigurationSchemaErrors)
(schemaErrors)
at System.Configuration.BaseConfigurationRecord.ThrowIfInitErrors()
at System.Configuration.ClientConfigurationSystem.EnsureInit (String)
(configKey)
-End of inner exception stack trace-
at System.Configuration.ConfigurationManager.PrepareConfigSystem()
at System.Configuration.ConfigurationManager.GetSection (String)
(sectionName)
When
System.Configuration.PrivilegedConfigurationManager.GetSection (String)
(sectionName)
at System.Windows.Forms.WindowsFormsSection.GetSection()
-End of inner exception stack trace-
at System.Data.SqlClient.SqlConnectionFactory.. cctor()
-End of inner exception stack trace-
at system.data.SqlClient.SqlConnection.. cctor()
-End of inner exception stack trace-
at system.data.SqlClient.SqlConnection.. ctor()
at system.data.SqlClient.SqlConnection.. System.String.#ctor (string connectionString)
at LAG.WordPlus.Database.SqlDatabase.CreateConnection (String)
(connectionString) in P:\ProjectX\SqlDatabase.cs:Zeile 23.

Apparently the configuration section "lag.wordplus" not found. There is however. It's safe.

The difference between F5 and CTRL + F5:

CTRL + F5: AppDomain.CurrentDomain.SetupInformation.ConfigurationFile == ANWENDUNGSNAME.config

F5: AppDomain.CurrentDomain.SetupInformation.ConfigurationFile == ANWENDUNGSNAME.vshost.exe.config

Then it gave me the idea look the app.config.
I found there the following.

<!-< configSections >
< section name = "lag.wordplus"
Type = "LAG.WordPlus.Configuration.WordPlusSection, LAG.WordPlus" / >
< / configSections > >

Well, what should I say. <!-> away and it does.

And again an experience richer. :-)

Tags:

Kommentare sind geschlossen

Statistik

Gesamte Posts: 1025
Dieses Jahr: 7
Diesen Monat: 1
Diese Woche: 0
Kommentare: 929
Total Bewertungen: 91
Ø Bewertung: 4,42
Meisten Kommentare
Google+ ... (28)
Beste Ø Bewertung
Tastaturlayout von Visual Stud ... (5)
Meiste Bewertungen
Windows 7 und die ersten Erfah ... (5)

Buttons

Stop Spam Harvesters, Join Project Honey Pot Benutzerprofil von GENiALi connection speed test network connection Bloggeramt.de Slug.ch Blog Verzeichnis und Blog Webkatalog Schumacher Roland Seitwert Valid XHTML 1.0 Transitional

writing