Reputation: 950
Simple things first: I have a .net 4.7.2 clickonce winform application which doesn't start as soon as .net 4.8 (which comes with Windows Updates) is installed. If you uninstall .net 4.8 everything works as expected.
What happens when you click on .appref.ms
shortcut in the start menu, is that it launches the check for new versions and then it dies. So I checked the eventlog and it revealed this:
System.Configuration.ConfigurationErrorsException
at System.Configuration.BaseConfigurationRecord.EvaluateOne(System.String[], System.Configuration.SectionInput, Boolean, System.Configuration.FactoryRecord, System.Configuration.SectionRecord, System.Object)
at System.Configuration.BaseConfigurationRecord.Evaluate(System.Configuration.FactoryRecord, System.Configuration.SectionRecord, System.Object, Boolean, Boolean, System.Object ByRef, System.Object ByRef)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(System.String, Boolean, Boolean, Boolean, Boolean, System.Object ByRef, System.Object ByRef)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(System.String, Boolean, Boolean, Boolean, Boolean, System.Object ByRef, System.Object ByRef)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(System.String, Boolean, Boolean, Boolean, Boolean, System.Object ByRef, System.Object ByRef)
at System.Configuration.BaseConfigurationRecord.GetSection(System.String)
at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(System.String)
at System.Configuration.ConfigurationManager.GetSection(System.String)
at System.ServiceModel.Activation.AspNetEnvironment.GetConfigurationSection(System.String)
at System.ServiceModel.Configuration.ConfigurationHelpers.GetAssociatedSection(System.Configuration.ContextInformation, System.String)
at System.ServiceModel.Configuration.ConfigurationHelpers.GetAssociatedBindingCollectionElement(System.Configuration.ContextInformation, System.String)
at System.ServiceModel.BasicHttpsBinding.ApplyConfiguration(System.String)
at xx.xx.xx.xx.WinClient.Initialize.Execute()
at xx.xx.xx.Bootstrapper.Bootstrapper+<>c.<Run>b__0_4(xx.xx.xx.Bootstrapper.IBootstrapperCommand)
at System.Collections.Generic.List`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].ForEach(System.Action`1<System.__Canon>)
at xx.xx.xx.Bootstrapper.Bootstrapper.Run()
at xx.xx.xx.xx.WinClient.Program.Main()
This looked familiar as I am indeed using BasicHttpsBinding for a SAP webservice reference. So I wanted to debug the code in order to maybe find more details about why these BasicHttpsBindings are not working when the lastest .net version is installed.
Unfortunately the application is working properly when it's being debugged. And to make it even worse... when I directly start the .exe file in the <user>/app
folder it is also working. The only time it is not working is when I start the application with the .appref-ms
shortcut and - obviously - .net 4.8 is installed.
Is there anyone else who encountered this problem with .net 4.8 and could lead me to the right path?
Upvotes: 2
Views: 1536
Reputation: 66
@Schadensbergenzer thanks for reporting this. This sounds like a recent issue which impacts clickonce applications with the October release of a patch for .NET Framework 4.8. Can you try adding the following to your apps config file?
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<AppContextSwitchOverrides value="Switch.System.Reflection.DoNotForceOrderOfConstructors=true"/>
</runtime>
</configuration>
Upvotes: 5