3

I'm using Visual Studio 2010 to create an add-in. Using the wizard, I went through the dialog and selected fairly standard options (target 4.0, load in startup). The project was then generated, but when I try to debug the add-in, a new instance of VS starts up, and then an exception is thrown:

"ArgumentException crossed a native/managed boundary"
"Cannot find the requested resource"

The StackTrace is sparse:

   at Microsoft.VisualStudio.CommonIDE.ResourceLoader.FindResource[T](String resourceName, Int32 lcid, Func`2 fnConvert)
   at Microsoft.VisualStudio.CommonIDE.ResourceLoader.GetBlob(String resourceName, Int32 lcid, Byte[]& bytes, Int32& count)

Even though I'm attached, this doesn't seem to occur in any of the cs code that exists in the new project.

Any ideas?

soslo
  • 276
  • 2
  • 8
  • I still don't know how to resolve this problem, but I've found a temporary workaround.
    Edit the .AddIn file found in your documents folder, somewhere like: C:\Users\USERNAME\Documents\Visual Studio 2010\Addins\
    Remove the path information in AddIn/Assembly
    Close Visual Studio (it might ask you to disable the new add in - that is ok)
    Copy your AddIn's dll from your project folder into this add-in folder.
    Now you can at least run your add-in - but debugging straight into it using F5 still doesn't work.
    – soslo Jan 17 '11 at 21:55
  • having same problem. Useless workaround IMO since it would take forever to create an addon. – JonSlaughter Apr 19 '11 at 16:52

1 Answers1

3

I had the same problem, I found the answer here:
Microsoft forum post http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/277f3b9f-f66c-4616-a4d3-62ab14f557ef/

My Visual Studio options had a the following option turned on when it is off by default.

Options --> Debugging --> General --> "Break when exceptions cross AppDomain or managed/ native boundries (managed only).

Brian Mains
  • 50,520
  • 35
  • 148
  • 257
Chuck
  • 53
  • 6