Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work in azure function #50

Open
marc-wilson opened this issue Jan 22, 2020 · 0 comments
Open

Doesn't work in azure function #50

marc-wilson opened this issue Jan 22, 2020 · 0 comments

Comments

@marc-wilson
Copy link

marc-wilson commented Jan 22, 2020

I'm trying to create a VssConnection in an Azure Function, but I am presented with the below error after trying to invoke it:

Microsoft.VisualStudio.Services.WebApi: Method not found: 'Newtonsoft.Json.JsonSerializerSettings System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.get_SerializerSettings()'.

public override void Configure(IFunctionsHostBuilder builder)
        {
            builder.Services.AddTransient(x =>
            {
                var url = "<URL>";
                var pat = "<PAT TOKEN>";
                var credentials = new VssBasicCredential(string.Empty, pat);
                return new VssConnection(new Uri(url), credentials);
            });
        }

I also tried doing it without DI and got the same issue.

Function Runtime: 3.0.2009
Target Framework: dotnet core 3.1
OS: Mac Catalina

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant