I am trying to dynamically load in XNA content into a VSPackage project. We would like to be able to draw a Texture2D to a graphics device control inside of Visual Studio as an add-in. We managed to dynamically load XNA content inside of a form (using this code: http://create.msdn.com/en-US/education/catalog/sample/winforms_series_2) in a separate Windows Form project but now our goal is to implement what we have as an add-in with essentially the same code. The problem we are having is that the code we use to dynamically load in XNA content does not seem to work in VSPackages. When the ContentBuilder is building, it returns an error message that says the importer for the content we are loading (Texture2D) cannot be found. The ContentBuilder class works with different project types, but does not seem to work for VSPackages. Does anyone have any familiarity with implementing XNA inside of a VSPackage? Do you know if it’s even possible to dynamically load Texture2Ds inside of a VSPackage? If not, are there any alternatives?
Thanks