Bikram
Bikram

Reputation: 523

source link will download from the internet

I have an existing Azure functions(Version 1 V1).I want to migrate them to Version 2 (V2). Azure Function V1 (.NET 4.61 / WebAPI 2). Azure Function V2 (ASP.NET Core / MVC 6).

I created the AF-V2 and tried to call(class library .dll written in .NET 4.61) from AF-V2: it built successfully.

[FunctionName("MyFunctionV2")]
    public static async Task<IActionResult> Run(
        [HttpTrigger(AuthorizationLevel.Function, "post", Route = "MyFunctionV2")] HttpRequest req,
        ILogger log)
    {
        MyDllClass.InitializeSomething(parameter1, parameter2);//exception encountered here.
        //my codes

When I debug the code, it(MyDllClass.InitializeSomething(parameter1, parameter2);) encountered the following popup stating source link will download from the internet. enter image description here

I have few questions related:

  1. What exactly does source link will download from the internet mean?
  2. How can I call .NET 4.61 classLibrary dll from AF-V2?
  3. I am stuck to google out the exact issue, much appreciated yours help.

Upvotes: 4

Views: 3266

Answers (1)

Murray Foxcroft
Murray Foxcroft

Reputation: 13745

To answer your questions:

What exactly does source link will download from the internet mean?

This means that your code is throwing an exception in one of the underlying framework classes. In order to get the source code for where the error is occurring, Visual Studio needs to download that code, and the source is on the internet. In your screen shot you can see the class where the error occurred, and the link to the git repo that it will be downloaded from.

How can I call .NET 4.61 classLibrary dll from AF-V2?

Unfortunately functions V2 is based on .NET core 2. It does not support the full framework (4.6/4.7 etc). Directly dependant assemblies will also need to be ported to core, or places behind a service interface. I.e. create a RESTful service in 4.7 and call it from your functions.

From supported Azure Functions .NET Run times:

C#
- 1.x GA (.NET Framework 4.7)
- 2.x GA (.NET Core 2)

Upvotes: 5

Related Questions