For some reason, this.ServerInfo.SharePointSiteCollectionUrl.ToString() won't work in one of my InfoPath forms. It works just fine in the other ones and all the forms are pretty similar. I have combed my using statements, libraries referenced and code for anything that could cause this.ServerInfo.SharePointSiteCollectionUrl.ToString() to not be found, but I can't find anything.
The error I get is InfoPathTemplate.FormCode' does not contain a definition for 'ServerInfo'
Anyone have any ideas on what might be causing this or some other way to get the site collection url? (I tried using the source parameter of the url, but its not always there)