సమస్య పరిష్కారం: “FileNotFoundException” నా ఫీచర్ స్వీకర్త తో.

I was working on a feature last week that would add some event receivers to a specific list instance. (నేను ఇక్కడ ఆ జాబితా రిసీవర్ గురించి ఒక బిట్ బ్లాగు).

కమాండ్ లైన్ ఉపయోగించి, నాకు తప్పు ఫీచర్ ఇన్స్టాల్ కాలేదు (కానీ రహస్య లోపం కోసం క్రింద చూడండి). When I tried to deploy the feature on the site, MOSS complained of a "FileNotFoundException" తప్పు. This blog entry describes how I solved it.

ఈ MOSS వెబ్ బ్రౌజర్ లో నన్ను చూపించారు లోపం ఉంది:

Feature ‘b2cb42e3-4f0a-4380-aaba-1ef9cd526f20’ could not be installed because the loading of event receiver assembly "xyzzyFeatureReceiver_0" విఫలమైంది: System.IO.FileNotFoundException: Could not load file or assembly ‘xyzzyFeatureReceiver_0’ దాని మీద ఆధారపడటం లేదా ఒక. సిస్టమ్ పేర్కొన్న ఫైలు దొరకలేదా.
ఫైల్ పేరు: ‘xyzzyFeatureReceiver_0’
at System.Reflection.Assembly.nLoad(పేరు AssemblyName, స్ట్రింగ్ కోడ్బేస్, ఎవిడెన్స్ assemblySecurity, అసెంబ్లీ locationHint, StackCrawlMark& మట్టి స్టేక్, బూలియన్ throwOnFileNotFound, బూలియన్ forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyRef AssemblyName, ఎవిడెన్స్ assemblySecurity, StackCrawlMark& మట్టి స్టేక్, బూలియన్ forIntrospection)
at System.Reflection.Assembly.InternalLoad(స్ట్రింగ్ assemblyString, ఎవిడెన్స్ assemblySecurity, StackCrawlMark& మట్టి స్టేక్, బూలియన్ forIntrospection)
at System.Reflection.Assembly.Load(స్ట్రింగ్ assemblyString)
at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()
WRN: అసెంబ్లీ బైండింగ్ లాగింగ్ ఆపివేయబడింది.
అసెంబ్లీ bind వైఫల్యం ఎనేబుల్ కు, సెప్టెంబర్ రిజిస్ట్రీ విలువ [HKLM సాఫ్ట్వేర్ మైక్రోసాఫ్ట్ Fusion!EnableLog] (DWORD) కు 1.
గుర్తు: అసెంబ్లీ bind వైఫల్యం లాగింగ్ సంబంధం కొన్ని పనితీరు పెనాల్టీ ఉంది.
ఈ లక్షణాన్ని ఆఫ్ చేయండి, నమోదు విలువ తొలగించండి [HKLM సాఫ్ట్వేర్ మైక్రోసాఫ్ట్ Fusion!EnableLog].

Windows SharePoint సేవలు సమస్యలను.

నేను ఉద్దేశపూర్వకంగా thatâ లోపం కారణం ఎలా: don’t install the assembly in the GAC. కాని, it was in the GAC. I normally install assemblies into the GAC by dragging them into the c:\windows\assembly folder using windows explorer. I’ve never felt 100% నేను ఎప్పుడూ gacutil ఒక కారణం కోసం ఉనికిలో అనుకున్నాడు సౌకర్యవంతమైన ఆ చేయడం … so I tried that. It made no difference.

నేను ఇంటర్నెట్ల శోధించిన మరియు ఈ పోస్ట్ దొరకలేదు: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2243677&SiteID=1

పోస్టర్ కోడ్ ఇదే మూలం బిట్ ఉపయోగించి సంభవించింది (ఈ జాబితా నుండి ఇన్సైడ్ WSS పుస్తకం నుండి) so that was a hopeful sign. అయితే, ఒక తో అలంకరణ అసెంబ్లీ సలహా [సభ: ] directive didn’t make sense to me. I tried it anyway and I was right. It made no difference.

Then I noticed that my class definition was not public. I made it public and that made no difference.

తర్వాత, I went to the trouble of enabling the "assembly bind failure log" (అందించిన ఉపయోగపడిందా మరియు ఖచ్చితమైన ఆదేశాలను పాటిస్తూ) and this is where things started to get interesting. That log shows me that the runtime is searching everywhere on that server for my assembly. It even appears to be searching for it in my medicine cabinet. కాని … ఇది GAC లో కోసం అన్వేషణ కాదు.

I put on my winter jacket and go searching the Internets again and find that someone has had this problem too. The lengthy discussion in that posting peters off into nothing and I can’t find a solution.

I move my assembly into one of the places the log claims it’s searching and I make a little more progress. I’m rewarded with a new error in the browser when I try to activate the feature:

Failed to create feature receiver object from assembly "xyzzyFeatureReceiver_0", type "Conchango.xyzzyFeatureReceiver" ఫీచర్ కోసం b2cb42e3-4f0a-4380-aaba-1ef9cd526f20: System.ArgumentNullException: విలువ శూన్య ఉండకూడదు.
పారామితి పేరు: రకము
at System.Activator.CreateInstance(రకం రకం, ప్రజలకు బూలియన్)
at System.Activator.CreateInstance(రకం రకం)
at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()

Windows SharePoint సేవలు సమస్యలను.

ఇంటర్నెట్ల ఒక గత ట్రిప్ కోసం సమయం!

నేను కనుగొనేందుకు ఈ సమయం, ఊహించి తగినంత, that MOSS issues this error because the assembly is not in GAC.

నేను ఈ యొక్క ఏదో పాజిటివ్ పొందుటకు మరియు నేను సృష్టించిన కొద్దిగా గర్వపడేందుకు ప్రయత్నించండి అనుకుంటున్నారా MSIL శాసనసభల ఫ్యుజిటివ్, but it’s not working. I’m just plain annoyed. I find myself muttering "chicken or the egg" నా ఊపిరి కింద.

I finally decide to punt. I create an entirely new project and copy/paste the code from the incredible-cloaked-from-the-GAC-assembly non-working project over to this new project. (I look for a build flag called something like "hide from assembly binding if installed in the GAC" కానీ ఒక దొరకలేదా).

నేను ఫీచర్ ఇన్స్టాల్ మరియు సక్రియం మరియు … ఇది పనిచేస్తుంది! ఈ విధంగా, ఆ తర్వాత, I had to basically ‘reboot’ my project. ఈ నేను కంప్యూటర్లు ద్వేషిస్తున్నారు మరొక కారణం.

I did learn something useful from this. I had been installing features using the stsadm command line all day long and been using the "-force" option out of habit. కొన్ని కారణాల కోసం, I did not use the -force option when I installed the new project. ఈ సమయం, నేను నిజానికి, truly forget to copy this new project’s assembly into the GAC. ఫలితంగా, I received that "FielNotFoundException" తప్పు. ఈ సమయం, నేను stsadm నుండి వచ్చింది, not when I tried to activate the feature via the web browser. ఈ విధంగా, -force actually plays two roles. It allows you to re-install an existing feature. It also allows you to install a buggy feature that cannot work at runtime by suppressing the error. It probably says as much in the help somewhere but I never noticed it.

</చివర>

3 "న ఆలోచనలుసమస్య పరిష్కారం: “FileNotFoundException” నా ఫీచర్ స్వీకర్త తో.

  1. ఫ్రాన్సిస్కో

    కూడా, నేను కలిగి నా 2 నేను ఫీచర్ స్వీకర్త న పేరుబరి నామకరణం ఉన్నప్పుడు హిస్టీరిక్ nintendoSIXTYFOURRRR లో ఒక చెడు మార్గం కదలికల గంటల, ట్రాక్ సహాయం మీది లేదా ఎవరితోనూ ప్రారంభమైంది చోట.

  2. ఫ్రాన్సిస్కో

    సమస్య యొక్క మూల SharePoint డేటాబేస్ మోహరించిన WSP ఉంది. నేను మీ పోస్ట్ చదివి, దానిని నిజంగా సమస్య పరిష్కరించడానికి లేదు, అయితే మేము కదిలే ప్రతిదీ ఒక ప్రత్యామ్నాయంగా లేదు ఫైళ్లు అనేక ప్రాజెక్టులు మరియు డజన్ల కొద్దీ తో భారీ పరిష్కారం కలిగి.

    మీరు మీ GAC లేదా మీ అసెంబ్లీ అప్డేట్ ఎంత ఉన్నా, ఏమి మీకు అందిస్తున్న SharePoint ఇన్స్టాల్ ప్రస్తుత WSP అసెంబ్లీ ఉంది.

    మీరు సులభంగా మాత్రమే పరిష్కారం తిరిగి ప్రయత్నిస్తున్న గమనించి చేయవచ్చు (లోపం జరిగే ఇది). Everything happening on "Retracting Time" should be considered "deployed wsp"-only not the project itself.

    నా ప్రత్యామ్నాయాన్ని ఉంది:

    – సెంట్రల్ అడ్మిన్: పరిష్కారం రద్దు
    – stsadm: deletesolution
    – విజువల్ స్టూడియో => ప్రాజెక్ట్ => ప్యాకేజీ
    – stsadm: addsolution-ఫైలు ప్రాజెక్ట్ బిన్ డీబగ్ Project.wsp
    – stsadm: deploysolution-పేరు project.wsp-తక్షణ-allowgacdeployment శక్తి
    – విజువల్ స్టూడియో => రంగంలోకి దింపు

    నేను కూడా మళ్ళీ నియోగించడం నడుస్తున్న ముందు ప్రాజెక్ట్ నుండి బిన్ మరియు డీబగ్ ఫోల్డర్లను తొలగించబడింది, ఏ ప్రభావం కానీ విలువ వ్యాఖ్యానించింది లేకపోవచ్చు.

    రెండు కోసం ఈ రచనలు

    "Feature … ఇన్స్టాల్ చెయ్యడం సాధ్యం కాలేదు కాబట్టి ఈవెంట్ రిసీవర్ అసెంబ్లీ లోడ్"
    మరియు
    "Failed to create feature receiver object from assembly"

    ధన్యవాదాలు!
    ఫ్రాన్సిస్కో

ఒక Reply వదిలి ఫ్రాన్సిస్కో ప్రత్యుత్తరం రద్దు

మీ ఇమెయిల్ చిరునామా ప్రచురితమైన కాదు. లు గుర్తించబడతాయి *