locked
Add-In: VSIX package fails to deploy to experimental instance in VS2010 RRS feed

  • Question

  • Hello,

    When I enable "Deploy VSIX content to experimental instance for debugging" in VSIX project properties, my build fails with the following error:

    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\VSSDK\Microsoft.VsSDK.targets(447,5): error MSB3030: Could not copy the file "C:\path\to\INTERMEDIATE_DIRECTORY\plugin_dependency.dll" because it was not found.

    My solution has two projects, Plugin and Plugin_Dependency.

    The error is correct, the plugin_dependency.dll does not exist in the INTERMEDIATE_DIRECTORY, because the library gets placed into the OUTPUT_DIRECTORY directory.

    It seems that the deployment script is attempting to look for my plugin_dependency.dll in the intermediate directory, instead of the output directory. 

    I took a look at Microsoft.VsSDK.targets and it is indeed true: The $(IntermediateOutputPath) variable is used everywhere.

    Why is the intermediate directory being used? Am I forced to make my output directory match the intermediate directory for the "Deploy VSIX content to experimental instance for debugging" switch to work?

    Thanks.


    Friday, June 15, 2012 3:21 PM

Answers

  • Hi Zed03,

    The VS 2010 version of Microsoft.VsSDK.targets should be unaffected by VS 2012 (or the VS 2012 SDK).

    The use of $(IntermediateDirectory) in various places in Microsoft.VsSDK.targets does not relate to where assemblies from project references are used from.  It's only used within a project build for things like working with intermediate versions of pkgdef & vsixmanifest files.

    I wasn't able to reproduce the behavior you're seeing. Here's what I tried:

    1. Install VS 2010 + VS 2010 SDK
    2. Install VS 2012 + VS 2012 SDK
    3. Create a C# VSPackage project in VS 2010
    4. Add a new C# ClassLibrary project to the solution
    5. Add a project reference from the VSPackage project to the ClassLibrary project
    6. Build

    I then observe that when the extension is set up for debugging, the dependency (ClassLibrary1.dll) is correctly copied from the output directory: bin\Debug\ClassLibrary1.dll

    Please let me know if the above didn't properly capture the scenario you're trying.

    Regards,
    Aaron


    http://blogs.msdn.com/aaronmar

    • Proposed as answer by Ego Jiang Thursday, June 28, 2012 5:20 AM
    • Marked as answer by Ego Jiang Thursday, July 5, 2012 1:28 AM
    Monday, June 25, 2012 8:42 PM

All replies

  • Note these problems started after installing VS2012. However, I'm not using the VS2012 devenv nor has this project ever been opened with VS2012.
    Friday, June 15, 2012 3:22 PM
  • Is your dependency listed in references?

    "Programming is an art form that fights back" Cosmos - C# Open Source Managed Operating System http://Cosmos.CodePlex.com

    Saturday, June 16, 2012 2:46 PM
  • Is your dependency listed in references?

    "Programming is an art form that fights back" Cosmos - C# Open Source Managed Operating System http://Cosmos.CodePlex.com

    Yes, project Plugin has project Plugin_Dependency defined as a dependency in solution configuration.
    Monday, June 18, 2012 1:51 PM
  • Hi Zed03,

    Try to build project Plugin_Dependency.

    Remove the reference of plugin_dependency.dll and add it again in your project plugin.

    Best regards,

    Ego

    Tuesday, June 19, 2012 9:26 AM
  • Hi,

    Re-adding the reference to dependency did not fix the issue. Microsoft.VsSDK.targets still looks for the assembly in the intermediate directory, instead of the output directory. 

    Wednesday, June 20, 2012 7:04 PM
  • Hi Zed03,

    The VS 2010 version of Microsoft.VsSDK.targets should be unaffected by VS 2012 (or the VS 2012 SDK).

    The use of $(IntermediateDirectory) in various places in Microsoft.VsSDK.targets does not relate to where assemblies from project references are used from.  It's only used within a project build for things like working with intermediate versions of pkgdef & vsixmanifest files.

    I wasn't able to reproduce the behavior you're seeing. Here's what I tried:

    1. Install VS 2010 + VS 2010 SDK
    2. Install VS 2012 + VS 2012 SDK
    3. Create a C# VSPackage project in VS 2010
    4. Add a new C# ClassLibrary project to the solution
    5. Add a project reference from the VSPackage project to the ClassLibrary project
    6. Build

    I then observe that when the extension is set up for debugging, the dependency (ClassLibrary1.dll) is correctly copied from the output directory: bin\Debug\ClassLibrary1.dll

    Please let me know if the above didn't properly capture the scenario you're trying.

    Regards,
    Aaron


    http://blogs.msdn.com/aaronmar

    • Proposed as answer by Ego Jiang Thursday, June 28, 2012 5:20 AM
    • Marked as answer by Ego Jiang Thursday, July 5, 2012 1:28 AM
    Monday, June 25, 2012 8:42 PM