telemetry.TrackTrace("my text"); works on a workspace, but fails in Azure on another workspace

%3CLINGO-SUB%20id%3D%22lingo-sub-808827%22%20slang%3D%22en-US%22%3Etelemetry.TrackTrace(%22my%20text%22)%3B%20works%20on%20a%20workspace%2C%20but%20fails%20in%20Azure%20on%20another%20workspace%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-808827%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20following%20Trace%20(Log)%20is%20being%20shown%20on%20Azure%3A%3C%2FP%3E%3CPRE%3E%20%20%20%20%3CSPAN%20class%3D%22kwd%22%3Epublic%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22kwd%22%3Estatic%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22kwd%22%3Evoid%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22typ%22%3EMain%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22kwd%22%3Estring%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E%5B%5D%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20args%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E)%3C%2FSPAN%3E%0A%20%20%20%20%3CSPAN%20class%3D%22pun%22%3E%7B%3C%2FSPAN%3E%0A%20%20%20%20%20%20%20%20%3CSPAN%20class%3D%22com%22%3E%2F%2F%20Log%20(Trace)%20test%201%3C%2FSPAN%3E%0A%20%20%20%20%20%20%20%20%3CSPAN%20class%3D%22kwd%22%3Evar%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20telemetry%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E%3D%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22kwd%22%3Enew%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22typ%22%3EMicrosoft%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E.%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3EApplicationInsights%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E.%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3ETelemetryClient%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E()%3B%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20%20%20%20%20%20%20%20telemetry%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E.%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3ETrackTrace%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22str%22%3E%22Test%20of%20ApplicationInsights.TelemetryClient()%20on%20Program.cs%22%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E)%3B%3C%2FSPAN%3E%0A%20%20%20%20%20%20%20%20%3CSPAN%20class%3D%22typ%22%3ECreateWebHostBuilder%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3Eargs%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E).%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3EBuild%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E().%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3ERun%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E()%3B%3C%2FSPAN%3E%0A%20%20%20%20%3CSPAN%20class%3D%22pun%22%3E%7D%3C%2FSPAN%3E%3C%2FPRE%3E%3CP%3EUnfortunately%2C%20when%20I%20use%20the%20same%20code%20on%20another%20namespace%20and%20project%20of%20the%20Solution%2C%20I%20got%20the%20following%20error%20on%20Azure%3A%3C%2FP%3E%3CPRE%3E%3CSPAN%20class%3D%22pln%22%3EAI%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3EInternal%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E%3A(%3C%2Fimg%3E%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22pun%22%3E%5B%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3EMicrosoft%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E-%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3EApplicationInsights%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E-%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3EAspNetCore%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E-%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3EStartupBootstrapper%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E%5D%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22typ%22%3ECould%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20not%20load%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3EMicrosoft%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E.%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3EAspNetCore%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E.%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3EApplicationInsights%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E.%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3EHostingStartup%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E.%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22typ%22%3ESystem%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E.%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3EIO%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E.%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3EFileNotFoundException%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E%3A%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22typ%22%3ECould%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20not%20load%20file%20or%20assembly%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22str%22%3E'Microsoft.AspNetCore.ApplicationInsights.HostingStartup%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull'%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E.%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22typ%22%3EThe%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20system%20cannot%20find%20the%20file%20specified%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E.%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22typ%22%3EFile%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20name%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E%3A%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22str%22%3E'Microsoft.AspNetCore.ApplicationInsights.HostingStartup%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull'%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20%20%20at%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3ESystem%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E.%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3EReflection%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E.%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3ERuntimeAssembly%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E.%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3EnLoad%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3EAssemblyName%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20fileName%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22typ%22%3EString%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20codeBase%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22typ%22%3ERuntimeAssembly%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20locationHint%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22typ%22%3EStackCrawlMark%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E%26amp%3B%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20stackMark%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22typ%22%3EIntPtr%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20pPrivHostBinder%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22typ%22%3EBoolean%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20throwOnFileNotFound%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22typ%22%3EIntPtr%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20ptrLoadContextBinder%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20%20%20at%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3ESystem%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E.%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3EReflection%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E.%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3ERuntimeAssembly%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E.%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3EInternalLoadAssemblyName%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3EAssemblyName%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20assemblyRef%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22typ%22%3ERuntimeAssembly%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20reqAssembly%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22typ%22%3EStackCrawlMark%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E%26amp%3B%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20stackMark%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22typ%22%3EIntPtr%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20pPrivHostBinder%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22typ%22%3EBoolean%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20throwOnFileNotFound%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22typ%22%3EIntPtr%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20ptrLoadContextBinder%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20%20%20at%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3ESystem%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E.%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3EReflection%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E.%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3ERuntimeAssembly%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E.%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3EInternalLoad%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3EString%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20assemblyString%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22typ%22%3EStackCrawlMark%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E%26amp%3B%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20stackMark%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22typ%22%3EIntPtr%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20pPrivHostBinder%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20%20%20at%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3ESystem%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E.%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3EReflection%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E.%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3ERuntimeAssembly%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E.%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3EInternalLoad%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3EString%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20assemblyString%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E%2C%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22typ%22%3EStackCrawlMark%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E%26amp%3B%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20stackMark%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20%20%20at%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3ESystem%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E.%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3EReflection%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E.%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3EAssembly%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E.%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3ELoad%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3EString%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20assemblyString%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20%20%20at%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3EMicrosoft%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E.%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3EApplicationInsights%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E.%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3EAssemblyLoader%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E.%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3ELoad%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3EString%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20assemblyName%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E)%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20%20%20at%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3EStartupBootstrapper%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E.%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3EStartup%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E.%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3ETryLoadStartupAssembly%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E(%3C%2FSPAN%3E%3CSPAN%20class%3D%22typ%22%3EString%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%20assemblyName%3C%2FSPAN%3E%3CSPAN%20class%3D%22pun%22%3E)%3C%2FSPAN%3E%3C%2FPRE%3E%3CP%3ENotice%20I've%20tried%20to%20add%20a%20reference%20to%20the%20other%20project%20(I'm%20guessing%20that%20would%20import%20it's%20nuggets%20and%20rest%20of%20things%20needed)%2C%20but%20I%20can't%20because%20it%20says%3A%3C%2FP%3E%3CBLOCKQUOTE%3E%3CP%3Ecyclic%20dependencies%20not%20allowed%3C%2FP%3E%3C%2FBLOCKQUOTE%3E%3CP%3ESo%20I've%20added%20the%20same%20nuggets%20to%20that%20Project%20of%20the%20solution.%20By%20doing%20that%2C%20it%20compiles%20and%20I%20can%20upload%20to%20Azure.%20But%20I%20can%20see%20the%20Trace%20because%20of%20that%20error%3A%3C%2FP%3E%3CDIV%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20917px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F127282i5629A6D936B8EB20%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22oRyzy%22%20title%3D%22oRyzy%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20on%20Visual%20Studio%20for%20Mac%20(which%20is%20actually%20different%20to%20Visual%20Studio%20for%20Windows%20by%20the%20way!).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20am%20I%20doing%20wrong%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENote%20for%20future%20reference%3A%20I'm%20also%20asking%20this%20question%20here%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fstackoverflow.com%2Fquestions%2F57505234%2Fazure-could-not-load-microsoft-aspnetcore-applicationinsights-hostingstartup-s%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fstackoverflow.com%2Fquestions%2F57505234%2Fazure-could-not-load-microsoft-aspnetcore-applicationinsights-hostingstartup-s%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-808827%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Highlighted
Occasional Visitor

The following Trace (Log) is being shown on Azure:

    public static void Main(string[] args)
    {
        // Log (Trace) test 1
        var telemetry = new Microsoft.ApplicationInsights.TelemetryClient();        telemetry.TrackTrace("Test of ApplicationInsights.TelemetryClient() on Program.cs");
        CreateWebHostBuilder(args).Build().Run();
    }

Unfortunately, when I use the same code on another namespace and project of the Solution, I got the following error on Azure:

AI (Internal): [Microsoft-ApplicationInsights-AspNetCore-StartupBootstrapper] Could not load Microsoft.AspNetCore.ApplicationInsights.HostingStartup. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.AspNetCore.ApplicationInsights.HostingStartup, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'Microsoft.AspNetCore.ApplicationInsights.HostingStartup, Culture=neutral, PublicKeyToken=null'   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, IntPtr ptrLoadContextBinder)   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, IntPtr ptrLoadContextBinder)   at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, StackCrawlMark& stackMark, IntPtr pPrivHostBinder)   at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, StackCrawlMark& stackMark)   at System.Reflection.Assembly.Load(String assemblyString)   at Microsoft.ApplicationInsights.AssemblyLoader.Load(String assemblyName)   at StartupBootstrapper.Startup.TryLoadStartupAssembly(String assemblyName)

Notice I've tried to add a reference to the other project (I'm guessing that would import it's nuggets and rest of things needed), but I can't because it says:

cyclic dependencies not allowed

So I've added the same nuggets to that Project of the solution. By doing that, it compiles and I can upload to Azure. But I can see the Trace because of that error:

 

oRyzy

 

I'm on Visual Studio for Mac (which is actually different to Visual Studio for Windows by the way!).

 

What am I doing wrong?

 

Note for future reference: I'm also asking this question here: https://stackoverflow.com/questions/57505234/azure-could-not-load-microsoft-aspnetcore-applicationin...

0 Replies