I have the following code snippet in my feature.xml
<Feature Id="0c272f81-49c0-440a-a544-677d51a8ffe4"
ReceiverAssembly="FeaturedMasterPage, Version 1.0.0.0, Culture=Neutral, PublicKeyToken=9f4da00116c38ec5"
ReceiverClass="FeaturedMasterPage.FeatureEventReciever"
Title="Branding202"
Scope="Web"
Version="1.0.0.0"
Hidden="FALSE"
DefaultResourceFile="core"
xmlns="http://schemas.microsoft.com/sharepoint/">
<ElementManifests>
<ElementManifest Location="Branding202\Module.xml" />
<ElementFile Location="Branding202\Branding202.Master" />
</ElementManifests>
</Feature>
My FeatureEventReciever.cs says:-
using System;
using System.Collections.Generic;
using Microsoft.SharePoint;
using System.Text;
using System.Diagnostics;
namespace FeaturedMasterPage
{
class FeatureEventReciever:SPFeatureReceiver
{
public override void FeatureActivated(SPFeatureReceiverProperties properties)
{
try
{
//My Code
}
catch (Exception)
{
throw;
}
}
public override void FeatureDeactivating(SPFeatureReceiverProperties properties)
{
try
{
//My Code
}
catch (Exception)
{
throw;
}
}
public override void FeatureInstalled(SPFeatureReceiverProperties properties) { }
public override void FeatureUninstalling(SPFeatureReceiverProperties properties) { }
}
}
When i try to deploy the solution...it gives me the following error:-
Error 1 Feature '0c272f81-49c0-440a-a544-677d51a8ffe4' could not be installed because the loading of event receiver assembly "FeaturedMasterPage, Version 1.0.0.0, Culture=Neutral, PublicKeyToken=9f4da00116c38ec5" failed: System.IO.FileLoadException: Could not load file or assembly 'FeaturedMasterPage\, Version 1.0.0.0\, Culture\=Neutral\, PublicKeyToken\=9f4da00116c38ec5' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047) File name: 'FeaturedMasterPage\, Version 1.0.0.0\, Culture\=Neutral\, PublicKeyToken\=9f4da00116c38ec5' at System.Reflection.AssemblyName.nInit(Assembly& assembly, Boolean forIntrospection, Boolean raiseResolveEvent) at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.Load(String assemblyString) at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()
0 0
I have already spent whole day troubleshooting this. I have installed the dll using gacutil.
Any help would be appreciated.