Skip to content

Changeset added bin\debug for loading WebApiProxy.Tasks.dll #85

Open

Description

@onionhammer

On WebApiProxy-Generate-CSharp command:

Changeset

Add-Type -Path (Join-Path $projectPath "bin\Debug\WebApiProxy.Tasks.dll")

This can lead to errors as WebApiProxy.Tasks.dll isn't built/added to the bin/debug folder

\bin\Debug\WebApiProxy.Tasks.dll' because it does not exist.

Activity

  1. added a commit that references this issue on Feb 25, 2016
  2. onionhammer commented on Mar 1, 2016

    @onionhammer
    CollaboratorAuthor

    Now I'm getting this

    PM> WebApiProxy-Generate-CSharp
    Cannot bind argument to parameter 'Path' because it is null.
        + CategoryInfo          : InvalidData: (:) [Add-Type], ParameterBindingValidationException
        + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.AddTypeCommand
        + PSComputerName        : localhost
    
    Unable to find type [WebApiProxy.Tasks.Models.Configuration]. Make sure that the assembly that contains this type is loaded.
        + CategoryInfo          : InvalidOperation: (WebApiProxy.Tasks.Models.Configuration:TypeName) [], RuntimeException
        + FullyQualifiedErrorId : TypeNotFound
        + PSComputerName        : localhost
    
    Cannot find type [WebApiProxy.Tasks.Infrastructure.CSharpGenerator]: verify that the assembly containing this type is loaded.
        + CategoryInfo          : InvalidType: (:) [New-Object], PSArgumentException
        + FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.NewObjectCommand
        + PSComputerName        : localhost
    
    Generating proxy code...
    You cannot call a method on a null-valued expression.
        + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
        + FullyQualifiedErrorId : InvokeMethodOnNull
        + PSComputerName        : localhost
    
  3. faniereynders commented on Mar 1, 2016

    @faniereynders
    Member

    What version of Powershell & VS are you using?

  4. onionhammer commented on Mar 1, 2016

    @onionhammer
    CollaboratorAuthor

    Visual Studio 2015 on windows 8.1?

  5. faniereynders commented on Mar 2, 2016

    @faniereynders
    Member

    Weird I cannot seem to reproduce this. Just tested it on your config as well and it works. I did however make changes to the package file to include the libs on the correct build configuration inside the project

  6. DigitalDel commented on Sep 9, 2016

    @DigitalDel

    @onionhammer did you ever resolve this? I've now started getting this error as well despite it previously working fine?

  7. DigitalDel commented on Sep 9, 2016

    @DigitalDel

    Problem identified.

    This will occur if you have multiple projects in your VS Solution. I have 3 projects in my Solution:

    • API
    • Class Library
    • MVC Application

    The MVC app is the one on which i am trying to generate the proxy code however when i edited the WebApiProxyCSharp.psm1 file to print out the project path it is returning the path for my API project not the path of the MVC project the package is installed on and which has the references to WebApiProxy.Core and WebApiProxy.Tasks.

    Anyone any advice on how to fix? I did try adding references to WebApiProxy.Core and WebApiProxy.Tasks to the other projects in my solution and but WebApiProxyCSharp.psm1 uses the project path to identify the config and output paths which are obviously in the API project not the MVC project where the package is installed.

    The only solution i can think of at the moment is to install the package on the API project, generate the proxy code there and manually copy the generated file to the correct project but it doesn't make it particularly friendly to work with.

  8. added a commit that references this issue on May 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions