Invalid Tenant reference

%3CLINGO-SUB%20id%3D%22lingo-sub-35698%22%20slang%3D%22en-US%22%3EInvalid%20Tenant%20reference%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-35698%22%20slang%3D%22en-US%22%3E%3CP%3EHas%20anyone%20encoutner%20the%20following%20error%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CTABLE%3E%3CTBODY%3E%3CTR%3E%3CTD%3E%3CP%3ESeverity%3C%2FP%3E%3C%2FTD%3E%3CTD%3E%3CP%3ECode%3C%2FP%3E%3C%2FTD%3E%3CTD%3E%3CP%3EDescription%3C%2FP%3E%3C%2FTD%3E%3CTD%3E%3CP%3EProject%3C%2FP%3E%3C%2FTD%3E%3CTD%3E%3CP%3EFile%3C%2FP%3E%3C%2FTD%3E%3CTD%3E%3CP%3ELine%3C%2FP%3E%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E%3CP%3EError%3C%2FP%3E%3C%2FTD%3E%3CTD%3E%3CP%3ECS1061%3C%2FP%3E%3C%2FTD%3E%3CTD%3E%3CP%3E'Tenant'%20does%20not%20contain%20a%20definition%20for%20'SiteExists'%20and%20no%20extension%20method%20'SiteExists'%20accepting%20a%20first%20argument%20of%20type%20'Tenant'%20could%20be%20found%20(are%20you%20missing%20a%20using%20directive%20or%20an%20assembly%20reference%3F)%3C%2FP%3E%3C%2FTD%3E%3CTD%3E%3CP%3EProvisioning.Hybrid.Core%3C%2FP%3E%3C%2FTD%3E%3CTD%3E%3CP%3EProvisioning.Hybrid.Core%5CSiteDirectoryManager.cs%3C%2FP%3E%3C%2FTD%3E%3CTD%3E%3CP%3E34%3C%2FP%3E%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20tried%20fining%20the%20right%20dll%20but%2C%20I%20can't%20find%20siteExists%20in%3C%2FP%3E%3CP%3ESharePointPnPCore2013.2.10.1612.0%5Clib%5Cnet45%5CMicrosoft.Online.SharePoint.Client.Tenant.dll%20nor%3C%2FP%3E%3CP%3EMicrosoft.SharePointOnline.CSOM.16.1.5903.1200%5Clib%5Cnet45%5CMicrosoft.Online.SharePoint.Client.Tenant.dll%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-38326%22%20slang%3D%22en-US%22%3ERe%3A%20Invalid%20Tenant%20reference%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-38326%22%20slang%3D%22en-US%22%3EHi%20Pieter%2C%3CBR%20%2F%3EThank's%20for%20replying.%3CBR%20%2F%3E%3CBR%20%2F%3EOverall%2C%20I%20am%20trying%20to%20build%20the%20PnP%2FProvisioning.Hybrid%20solutions%20and%2C%20I%20want%20to%20update%20it%20to%20SP%20On-Prem%202016.%20The%20above%20error%20was%20when%20I%20install%20the%20Provisioning.Hybrid%20and%20tried%20to%20compile.%20The%20Microsoft.Online.SharePoint.TenantAdministration%20was%20reference%20but%2C%20there%20is%20no%20mention%20to%20which%20version%20of%20the%20Microsoft.Online.SharePoint.Client.Tenant.dll%20it%20needs.%3CBR%20%2F%3E%3CBR%20%2F%3EI%20fixed%20the%20error%20using%20NuGet%20Package%20-%20Microsoft.SharePointOnline.CSOM.16.1.5326.1200%3CBR%20%2F%3E%3CBR%20%2F%3EI'm%20having%20hard%20time%20finding%20which%20NuGet%20Package%20should%20be%20used%20with%20you%20use%20a%20PnP%20Solution%2C%20especially%2C%20that%20most%20of%20the%20tools%20used%20to%20build%20the%20solution%20are%20old%20now%2C%20and%20some%20deprecated.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-35768%22%20slang%3D%22en-US%22%3ERe%3A%20Invalid%20Tenant%20reference%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-35768%22%20slang%3D%22en-US%22%3E%3CP%3EYou%20might%20want%20to%20add%20what%20you%20are%20trying%20to%20do%20when%20you%20get%20the%20mesage%20that%20you%20are%20reporting%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Has anyone encoutner the following error?

 

Severity

Code

Description

Project

File

Line

Error

CS1061

'Tenant' does not contain a definition for 'SiteExists' and no extension method 'SiteExists' accepting a first argument of type 'Tenant' could be found (are you missing a using directive or an assembly reference?)

Provisioning.Hybrid.Core

Provisioning.Hybrid.Core\SiteDirectoryManager.cs

34

 

I've tried fining the right dll but, I can't find siteExists in

SharePointPnPCore2013.2.10.1612.0\lib\net45\Microsoft.Online.SharePoint.Client.Tenant.dll nor

Microsoft.SharePointOnline.CSOM.16.1.5903.1200\lib\net45\Microsoft.Online.SharePoint.Client.Tenant.dll

2 Replies
Highlighted

You might want to add what you are trying to do when you get the mesage that you are reporting?

Highlighted
Hi Pieter,
Thank's for replying.

Overall, I am trying to build the PnP/Provisioning.Hybrid solutions and, I want to update it to SP On-Prem 2016. The above error was when I install the Provisioning.Hybrid and tried to compile. The Microsoft.Online.SharePoint.TenantAdministration was reference but, there is no mention to which version of the Microsoft.Online.SharePoint.Client.Tenant.dll it needs.

I fixed the error using NuGet Package - Microsoft.SharePointOnline.CSOM.16.1.5326.1200

I'm having hard time finding which NuGet Package should be used with you use a PnP Solution, especially, that most of the tools used to build the solution are old now, and some deprecated.