WSPBuilder does not include my assembly in the WSP

Feb 3, 2010 at 2:46 PM

I am using WSPBuilder on Visual Studio 2010 to create a feature with a feature receiver assembly for SharePoint 2010. When I try to build the WSP using WSP Builder I get this message in the output window:

    The assembly MyAssembly.dll is unmanaged. The assembly will be excluded from the WSP package!
    The defined Project Assembly seems not to be a valid assembly!
    Solution compatibility: SharePoint 2010

The resulting WSP that gets built does not contain my DLL.

My DLL is strongly named, and I cant think of any other obvious reasons why this is happening.
Any idea why WSPBuilder is not able to package my assembly in the WSP?

Mar 17, 2010 at 5:47 AM

What worked for me was the following :

  • Go to your project properties
  • Go to the Application tab
  • Select the .NET Framework 3.5 near the "Target Framework" dropdown
  • Reload the project
  • Rebuild the project
  • Create WSP Package

 

Jan 17, 2011 at 3:29 PM
Edited Jan 17, 2011 at 3:30 PM
robin_meure wrote:

What worked for me was the following :

  • Go to your project properties
  • Go to the Application tab
  • Select the .NET Framework 3.5 near the "Target Framework" dropdown
  • Reload the project
  • Rebuild the project
  • Create WSP Package

 

 

It solves the issue.

Thank you

Mar 31, 2011 at 6:20 PM

What if I need to use .NET Framework 4?

Apr 1, 2011 at 4:40 AM

That's not an option with SharePoint 2010.

(You might do some magic and invoke a service on a different apppool which is running 4.0, but SharePoint 2010 only supports 3.5)

Mar 10, 2013 at 8:47 AM
thanks robin_meure. It worked perfectly for me.