Question

Compile error when trying to use System.Net.Http on added source code

bpm'online community,

I added a new source code that needs System.Net.Http. When I try to publish it, I get these errors:

The type or namespace name 'Http' does not exist in the namespace 'System.Net' (are you missing an assembly reference?)

The type or namespace name 'HttpClient' could not be found (are you missing a using directive or an assembly reference?)

In the Autogenerated code I see the reference to System.Net.Http and if I view it on the Object Browser I see the HttpClient class.

I'm on Version 7.12.0.2656 of bpm'online studio.

Any ideas on what is causing the compile error?

Thanks,

Jose

 

using System;

using System.Text;

using System.Threading;

using System.Threading.Tasks;

using System.IO;

using System.Net.Http;

namespace Terrasoft.Configuration

{

    public static class UsrDownloadImageHelper {

        

        private static readonly UsrLimitedPool httpClientPool =

          new UsrLimitedPool(() => new HttpClient(), client => client.Dispose());

          

        public static async Task DownloadImageFromUcm(string imageId, string pathToSave, CancellationToken cancellationToken)

        {

....

}

Like 1

Like

1 comments

How you resolved this issue? I am facing with the same type of error "The type or namespace name 'Json' does not exist in the namespace 'System.Text' (are you missing an assembly reference?)"

Show all comments