Last post Jul 26, 2016 11:44 AM by PatriceSc
Jul 25, 2016 04:42 PM|JfBreton|LINK
I had an application buit with DNX that was working fine. I tried to make it works with CLI but I got an error on the startup. The error is :
L'exception System.TypeInitializationException n'a pas été gérée
Message=Une exception a été levée par l'initialiseur de type pour 'System.Diagnostics.DiagnosticSourceEventSource'.
à System.Diagnostics.DiagnosticListener..ctor(String name)
à DSF.Infra.OutilPilotage.Program.Main(String args) dans C:\PROJETS\OutilPilotage\Features\SPRINT2-AUDIENCEURI\Web\DSF.Infra.OutilPilotage\DSF.Infra.OutilPilotage\Program.cs:ligne 25
Message=Méthode introuvable : 'Void System.Diagnostics.Tracing.EventSource..ctor(System.Diagnostics.Tracing.EventSourceSettings)'.
There is the extract of my "project.json" showing the Self-contained settings.
I did a monitoring and I see that the self-contained application load library from my local .NET. Since I target .NET 4.6.1 and I don'T have it installed it crashed. I need self-contained application to don't have to install it on workstation. What is
the correct setting to make it works?
Jul 26, 2016 05:11 AM|lextm|LINK
It is not self-contained if you target .NET Framework, as that's still the traditional deployment approach.
"Self-contained" should only be used when you target .NET Core. Don't use DNX, as that term is dead with .NET Core RC1. RC2 and RTM and the future releases of .NET Core should be clearly distinguished from DNX.
Jul 26, 2016 11:33 AM|JfBreton|LINK
So because I target a traditionnal .NET framework I can't be self-contained? I didn't see that in documentation so anyone can confirm?
Jul 26, 2016 11:44 AM|PatriceSc|LINK
Not sure if really explicit but you could try
Even though they are not explicitely telling that, you have the "old" monolithic Framework that is a hint that the deployment model is to install it (as prevously) and the "new" componentized Framework that allows to install only the bits your need for each