locked
Getting System.EntryPointNotFoundException: Unable to find an entry point named 'GetCurrentPackageId' in DLL 'kernel32.dll' RRS feed

  • Question

  • Hi,

    I started getting this exception: System.EntryPointNotFoundException: Unable to find an entry point named 'GetCurrentPackageId' in DLL 'kernel32.dll' 

    after installing .Net 4.5 and VS 2012 when running my .Net 4 application in release mode or from an EXE. but it still run correctly from debug mode (at VS 2010 and VS 2012) !!!

    What is wrong?

    The full stack trace is:

    System.EntryPointNotFoundException: Unable to find an entry point named 'GetCurrentPackageId' in DLL 'kernel32.dll'.
       at Microsoft.Win32.UnsafeNativeMethods._GetCurrentPackageId(Int32& pBufferLength, Byte[] pBuffer)
       at Microsoft.Win32.UnsafeNativeMethods._IsPackagedProcess()
       at Microsoft.Win32.UnsafeNativeMethods.<.cctor>b__0()
       at System.Lazy`1.CreateValue()
       at System.Lazy`1.LazyInitValue()
       at System.Lazy`1.get_Value()
       at System.Xml.Serialization.TempAssembly.LoadGeneratedAssembly(Type type, String defaultNamespace, XmlSerializerImplementation& contract)
       at System.Xml.Serialization.XmlSerializer..ctor(Type type, String defaultNamespace)

    ...

    • Moved by Barry Wang Monday, November 5, 2012 6:30 AM CLR related (From:Visual Studio Setup and Installation)
    Thursday, November 1, 2012 11:34 AM

Answers

All replies

  • Hi K2 dev,

    Thanks for your post.

    This is not a programming forum. Could you please share your project type and programming language here? I'll redirect you to the right forum.

    Regards,


    Barry Wang [MSFT]
    MSDN Community Support | Feedback to us

    Friday, November 2, 2012 5:03 AM
  • Hi,

    Project type is: Windows Forms application.

    Language: C# (.net 4.0)

    Thanks in advance.

    Sunday, November 4, 2012 1:19 PM
  • Hi K2_dev,

    Welcome to the MSDN Forum.

    According to this feedback: http://connect.microsoft.com/VisualStudio/feedback/details/732334/unable-to-find-an-entry-point-named-getcurrentpackageid-in-dll-kernel32-dll 

    It has been closed as be fixed, so please try this newest .net framework, if this issue still exist, please waiting for the fixed version patiently, sorry for any inconvenience.

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Mike Feng Thursday, November 8, 2012 3:30 PM
    Monday, November 5, 2012 6:47 AM
  • Hi,

    I have the latest .Net 4.5 version 4.5.50709 and I still have this issue.

    I hope that Microsoft will release a hot-fix asap.

    Thanks

    Monday, November 12, 2012 12:51 PM