সমস্যার সমাধান: “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, স্ট্রিং codeBase, প্রমাণ assemblySecurity, এসেম্বলি locationHint, StackCrawlMark& লক্ষ্য গাদা, বুলিয়ান throwOnFileNotFound, বুলিয়ান forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyRef AssemblyName, প্রমাণ assemblySecurity, StackCrawlMark& লক্ষ্য গাদা, বুলিয়ান forIntrospection)
at System.Reflection.Assembly.InternalLoad(পংক্তি স্ট্রিং সমাবেশ, প্রমাণ assemblySecurity, StackCrawlMark& লক্ষ্য গাদা, বুলিয়ান forIntrospection)
at System.Reflection.Assembly.Load(পংক্তি স্ট্রিং সমাবেশ)
at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()
WRN: এসেম্বলি বাঁধাই লগিং বন্ধ পরিণত হয়.
থেকে সমাবেশ বাঁধাই করা ব্যর্থতা কর্মের লগ নির্মাণ করা, রেজিস্ট্রি ভ্যালু সেট [HKLM সফটওয়্যার মাইক্রোসফট Fusion!EnableLog] (DWORD) থেকে 1.
নোট: কয়েকটি কার্যকারিতা শাস্তি সমাবেশ বাঁধাই করা ব্যর্থতা লগিং সঙ্গে যুক্ত আছে.
এই বৈশিষ্ট্যটি বন্ধ করিয়া দেওয়া, রেজিস্ট্রি মান মুছে ফেলুন [HKLM সফটওয়্যার মাইক্রোসফট Fusion!EnableLog].

উইন্ডোজ SharePoint পরিষেবাদি বিষয় ট্রাবলশুট করুন.

আমি জানি কিভাবে ইচ্ছাকৃতভাবে যে ভুল হতে পারে: 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

পোস্টার ঘটেছে একই কোড অর্থাৎ root বিট ব্যবহার করা (ভেতরে এই তালিকা থেকে 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(প্রকার টাইপ, বুলিয়ান nonPublic)
at System.Activator.CreateInstance(প্রকার টাইপ)
at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()

উইন্ডোজ SharePoint পরিষেবাদি বিষয় ট্রাবলশুট করুন.

এক Internets থেকে শেষ ট্রিপ জন্য সময়!

এই সময় আমি জানতে, predictably যথেষ্ট, that MOSS issues this error because the assembly is not in GAC.

আমি এই কিছু ইতিবাচক এবং পেতে একটু গর্বিত যে আমি তৈরী করেছি যেটা মনে চেষ্টা করতে চান MSIL assemblies এর পলায়নপর, 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 আমি বৈশিষ্ট্য রিসিভার নেভিগেশন নামস্থান পালটে যখন hysteric nintendoSIXTYFOURRRR ইন একটি খারাপ পথ মুহূর্তের ঘন্টা, ট্র্যাক সাহায্য করতে পুলিশের বা অন্য কেউ শুরু যেখানে.

  2. ফ্রান্সিসকো

    সমস্যা root-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"

    ধন্যবাদ!
    ফ্রান্সিসকো

  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.

একটি উত্তর ত্যাগ ফ্রান্সিসকো উত্তর বাতিল করুন

আপনার ইমেইল ঠিকানা প্রচার করা হবে না. প্রয়োজনীয় ক্ষেত্রগুলি চিহ্নিত করা আছে *