Azure / azure-sdk-for-media-services-extensions

Extension library to azure-sdk-for-media-services
Apache License 2.0
33 stars 23 forks source link

csc is unable to locate the extension assembly in dependency graph with v3.5.2 #31

Closed am11 closed 7 years ago

am11 commented 7 years ago

Minimum steps to repro:

In Windows cmd with dotnet-cli in PATH:

mkdir \temp\test
cd \temp\test
dotnet new

Edit project.json and replace the contents with:

{
  "frameworks": { "net451": {} },
  "dependencies": { "windowsazure.mediaservices.extensions": "3.5.2" }
}

Edit Program.cs and replace the contents with:

using Microsoft.WindowsAzure.MediaServices.Client; 

public class Program {
  public static void Main() {
    IAsset asset = null;
    asset.GetHlsUri();
  }
}

In cmd, running dotnet restore && dotnet build yields:

C:\Program Files\dotnet\dotnet.exe compile-csc @C:\temp\test\obj\Debug\net451\dotnet-compile.rsp returned Exit Code 1
C:\temp\test\Program.cs(6,11): error CS1061: 'IAsset' does not contain a definition for 'GetHlsUri' and no extension method 'GetHlsUri' accepting a first argument of type 'IAsset' could be found (are you missing a using directive or an assembly reference?)

Compilation failed.
    0 Warning(s)
    1 Error(s)

(i.e. IAsset is recognized but not the extension method GetHslUri())

Replace "3.5.2" with "3.3.0" in project.json and run dotnet restore && dotnet build to get:

Compilation succeeded.
    0 Warning(s)
    0 Error(s)
johndeu commented 7 years ago

Roll back to version v3.3.0. There is a broken build right now in 3.5.2. We are working on getting the build fixed.

mconverti commented 7 years ago

@am11 please try again with the latest version of the windowsazure.mediaservices.extensions nuget package (v3.7.0.1). The issue should be fixed now.

am11 commented 7 years ago

I can confirm that the issue is fixed with v3.7.0.1. Thanks @mconverti! 👍 Would be nice to mark the broken version 3.5.2 deprecated, so folks relying on that get the warning.