I’m sure I’m not the first person to come up with this. Hata hivyo, I haven’t noticed anyone publish a trick like this since I started paying close attention to the community last July. Hivyo, Nilidhani ningependa baada ya kuwa hii haraka na rahisi Debug ncha.
Mimi nina kazi ya receiver tukio hilo kuwa ilianza kuzalisha kosa hili katika 12 mzinga:
Hitilafu ya upakiaji na mbio tukio receiver Conchango.xyzzyEventReceiver katika xyzzy, Version = 1.0.0.0, Utamaduni = neutral, PublicKeyToken = blahbalhbalh. Additional information is below. : Kitu kumbukumbu si kuweka mfano wa kitu.
I didn’t know where I had introduced this bug because I had done too many things in one of my code/deploy/test cycles.
Nilijaribu ufumbuzi huu kupata PDB yangu katika huko pamoja na matumaini kwamba SharePoint ya 12 mzinga bila kuonyesha mpororo, but no luck. I don’t know if it’s possible and if someone does, tafadhali napenda kujua 🙂
Najua inawezekana kuandika ujumbe yako mwenyewe logi kwa 12 mzinga. Frankly, Nilitaka kitu kidogo kidogo inatisha na wepesi kutekeleza.
Ilitokea kwangu kwamba mimi naweza angalau kupata baadhi ya msingi kuwaeleza habari na kuambukizwa na re-kutupa isipokuwa generic kama hii:
kujaribu { UpdateEditionDate(mali); } kukamata (Ubaguzi e) { kutupa mpya Ubaguzi("Dispatcher, UpdateEditionDate(): Ubaguzi: [" + e.ToString() + "]."); }
Hii ilionyesha juu katika 12 mzinga thusly:
Hitilafu ya upakiaji na mbio tukio receiver Conchango.xyzzyEventReceiver katika xyzzy, Version = 1.0.0.0, Utamaduni = neutral, PublicKeyToken = blahblahblah. Additional information is below. : Dispatcher, UpdateEditionDate(): Ubaguzi: [System.NullReferenceException: Kitu kumbukumbu si kuweka mfano wa kitu. at Conchango.xyzzyManagementEventReceiver.UpdateEditionDate(SPItemEventProperties mali) at Conchango.xyzzyManagementEventReceiver.Dispatcher(SPItemEventProperties mali, Kamba eventDescription)].
Kwamba alinipa undani wote mimi zinahitajika kufuatilia kwamba tatizo fulani na mimi kutarajia matumizi yake mengi kwenda mbele.
</mwisho>
Bora bado, kuingiza maktaba magogo kama Enterprise Library au log4net na maisha yako itakuwa rahisi hata.