microsoft / RdlMigration

Tool that converts RDL from a SQL Server Reporting Services Server or Power BI Report server and published to a Power BI premium workspace
MIT License
110 stars 44 forks source link

Type cast error when attempting to build the code #18

Closed ericpadelford closed 4 years ago

ericpadelford commented 4 years ago

I am getting this error when attempting to build the code:

Severity Code Description Project File Line Suppression State Error CS0266 Cannot implicitly convert type RdlMigration.ReportServerApi.ReportingService2010' to 'RdlMigration.ReportServerApi.IReportingService2010'. An explicit conversion exists (are you missing a cast?) RdlMigration C:\Users\XXXXXXX\Documents\RdlMigration-master\RdlMigration\RdlFileIO.cs 33 Active

Referring to this line of code:

In RdlFileIO.cs

Line 32-38

    public RdlFileIO(string urlEndpoint)
    {
        server = new ReportServerApi.ReportingService2010
        {
            Url = urlEndpoint + SoapApiConstants.SOAPApiExtension,
            UseDefaultCredentials = true
        };
    }
gboreki commented 4 years ago

Hi Eric, did you got unblocked?

I haven't seen this error, you can try to force the casting although that should not be necessary: server = (ReportServerApi.IReportingService2010) new ReportServerApi.ReportingService2010

gboreki commented 4 years ago

closed as no repro.