பிரச்சினைக்கான தீர்வு: “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.

இந்த பாசி இணைய உலாவி என்னை காட்டியது என்று பிழை உள்ளது:

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& stackMark, பூலியன் throwOnFileNotFound, பூலியன் forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyRef AssemblyName, ஆதாரம் assemblySecurity, StackCrawlMark& stackMark, பூலியன் forIntrospection)
at System.Reflection.Assembly.InternalLoad(சரம் assemblyString, ஆதாரம் assemblySecurity, StackCrawlMark& stackMark, பூலியன் forIntrospection)
at System.Reflection.Assembly.Load(சரம் assemblyString)
at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()
WRN: சட்டமன்ற பிணைப்பு பதிவு நிறுத்தப்பட்டுள்ளது.
சட்டசபை சேரும் தோல்வியை பதிவு செயல்படுத்த, பதிவகம் மதிப்பு அமைக்க [HKLM மென்பொருள் மைக்ரோசாப்ட் ஃப்யூஷன்!EnableLog] (DWORD) வேண்டும் 1.
குறிப்பு: சட்டசபை சேரும் தோல்வியை பதிவு தொடர்புடைய சில செயல்திறன் தண்டனை இல்லை.
இந்த அம்சத்தை அணைக்க, பதிவகம் மதிப்பு நீக்க [HKLM மென்பொருள் மைக்ரோசாப்ட் ஃப்யூஷன்!EnableLog].

விண்டோஸ் ஷேர்பாயிண்ட் சேவைகள் சிக்கலை.

நான் வேண்டுமென்றே பிழை காரணமாக எப்படி என்று எனக்கு தெரியும்: 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.

நான் Internets தேடியது மற்றும் இந்த காணப்படவில்லை: 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. ஆனாலும் … இது காக் அதை தேட முடியாது.

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(வகை வகை, NonPublic பூலியன்)
at System.Activator.CreateInstance(வகை வகை)
at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()

விண்டோஸ் ஷேர்பாயிண்ட் சேவைகள் சிக்கலை.

Internets ஒரு இறுதி பயணம் நேரம்!

நான் கண்டுபிடிக்க இந்த நேரம், எதிர்பார்த்தபடி போதும், 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. For some reason, 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. பிரான்சிஸ்கோ

    பிரச்சினையின் வேர் ஷேர்பாயிண்ட் தரவுத்தளத்தில் வரிசைப்படுத்தப்பட்டு wsp உள்ளது. நான் உங்கள் பதிவை படித்து அதை உண்மையில் பிரச்சினையை தீர்க்க வேண்டும், அதே நேரத்தில் நாம் நகரும் எல்லாம் ஒரு விருப்பத்தை அல்ல கோப்புகளை பல திட்டங்கள் மற்றும் டஜன் கணக்கான ஒரு பெரிய தீர்வு வேண்டும்.

    உங்கள் காக் அல்லது உங்கள் சட்டசபை மேம்படுத்த எவ்வளவு, நீங்கள் என்ன தருகிறாய் என்று ஷேர்பாயிண்ட் நிறுவப்பட்ட தற்போதைய 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"

    நன்றி!
    பிரான்சிஸ்கோ

  3. Tom Clarkson

    Just spent a couple of hours trying to fix this same issue and found a better solution than simply recreating the project.

    It turned out that for some reason Visual Studio had set the build target to x86 instead of x64 or MSIL – the assembly was in the GAC, just not the same GAC that 64 bit SharePoint was looking in.

ஒரு பதில் விட்டு பிரான்சிஸ்கோ பதிலை நிருத்து

உங்கள் மின்னஞ்சல் முகவரி வெளியிடப்பட்ட முடியாது. தேவையான புலங்கள் குறிக்கப்பட்டன *