Virtual-environments: image vs2017-win2016 does not contain SharePoint SDK

Created on 10 Mar 2020  路  15Comments  路  Source: actions/virtual-environments

All the description is here
https://github.com/microsoft/azure-pipelines-image-generation/issues/1479

Describe the bug
Error CS0234: The type or namespace name 'SharePoint' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)

Area for Triage:

Question, Bug, or Feature?:
"Bug"

Virtual environments affected

  • [ ] macOS 10.15
  • [ ] Ubuntu 16.04 LTS
  • [ ] Ubuntu 18.04 LTS
  • [x ] Windows Server 2016 R2
  • [ ] Windows Server 2019

Expected behavior
Sharepoint 2013 succefull build (https://github.com/actions/virtual-environments/blob/master/images/win/Windows2016-Readme.md has SharePoint software on it)

Actual behavior

This is piece of azure devops yaml build template that leads to error
jobs:

job: ${{ parameters.jobname }}
displayName: 'Build solution ${{ parameters.solution }}'
timeoutInMinutes: 60
cancelTimeoutInMinutes: 15
pool:
vmImage: 'vs2017-win2016'

Windows enhancement wontfix

Most helpful comment

@VerdonTrigance , good news: https://github.com/actions/virtual-environments/issues/68#issuecomment-602652021
Thank you for your patient and feedback.

All 15 comments

Hello, @VerdonTrigance
Could you please provide steps to reproduce the issue?

Do you need a exact code example? I can do this later. What can I do now is provide these steps:

  1. Create any SharePoint 2013 On-Prem project
  2. Create new Build definition (old style, not yaml) on Azure DevOps for this project with 'vs2017-win2016' azure pipeline agent.
  3. Run build.
  4. Get full stack of such errors:
    `

[error]SpWebConfigComparer.cs(3,28): Error CS0234: The type or namespace name 'Administration' does not exist in the namespace 'Microsoft.SharePoint' (are you missing an assembly reference?)

[error]SPListExtensions.cs(11,28): Error CS0234: The type or namespace name 'Utilities' does not exist in the namespace 'Microsoft.SharePoint' (are you missing an assembly reference?)

[error]SPWebExtensions.cs(12,38): Error CS0234: The type or namespace name 'WebPartPages' does not exist in the namespace 'Microsoft.SharePoint' (are you missing an assembly reference?)

[error]SpUserComparer.cs(9,53): Error CS0246: The type or namespace name 'SPUser' could not be found (are you missing a using directive or an assembly reference?)

`

I guess we need to add some VS components from Office/SharePoint development section. Probably, Microsoft.VisualStudio.Component.Sharepoint.Tools.

It would be great if you can share small example project so we will be able to add component and check that everything works as expected

I guess it would be excessively to provide exact code, so here my 'using' part:

using Microsoft.Office.DocumentManagement;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Publishing;
using Microsoft.SharePoint.Utilities;
using Microsoft.SharePoint.WebPartPages;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web.UI.WebControls.WebParts;
using WebPart = Microsoft.SharePoint.WebPartPages.WebPart;

Also, here are some libraries that might be required for SharePoint development in addition to ordinary SharePoint SDK available in GAC:

  • Microsoft.BusinessData.dll
  • Microsoft.Office.DocumentManagement.dll
  • Microsoft.Office.Policy.dll
  • Microsoft.Office.SecureStoreService.dll
  • Microsoft.Office.Word.Server.dll
  • Microsoft.SharePoint.ApplicationPages.Administration.dll
  • Microsoft.SharePoint.IdentityModel.dll
  • Microsoft.SharePoint.Publishing.dll
  • Microsoft.SharePoint.Taxonomy.dll

As Microsoft says they remove hosted agents on vs2015-win2012r2 on 23 March 2020 wich only one works today with SharePoint 2013. We can't be able to build SharePoint 2013 solution from that date any more.

@VerdonTrigance , moved to the board and prioritized!
cc: @alepauly

I guess it would be excessively to provide exact code, so here my 'using' part:

@VerdonTrigance Hi,
Can you please confirm you are not satisfied with installing the missing component via nuget because of it takes too much time to there are some other reasons?

Also is there any reason preventing you from using win2019 image which already has share point tools installed?

I guess it would be excessively to provide exact code, so here my 'using' part:

@VerdonTrigance Hi,
Can you please confirm you are not satisfied with installing the missing component via nuget because of it takes too much time to there are some other reasons?

Also is there any reason preventing you from using win2019 image which already has share point tools installed?

There is nothing about nuget. All these assemblies are Microsoft SharePoint. Other libraries in the list are unavailable in nuget, for example Microsoft.SharePoint.Taxonomy.dll.

Image win2019 has same problem - there are missing SharePoint 2013 libraries. I may change build definition and provide errors as well.

Here is my log for windows-2019 image in attachment
GitHubIssue.txt

@VerdonTrigance, @dsame (thanks!) looked into this and it seems like we would need to install Sharepoint server. Given the impact to the image and maintenance concerns we're not going to go ahead with that at the moment. Thanks for the suggestion.

@VerdonTrigance, @dsame (thanks!) looked into this and it seems like we would need to install Sharepoint server. Given the impact to the image and maintenance concerns we're not going to go ahead with that at the moment. Thanks for the suggestion.

@alepauly And what does it mean? What would happen at March 23?
You have to prevent from removing old image until new would be ready. Am I right?
https://devblogs.microsoft.com/devops/removing-older-images-in-azure-pipelines-hosted-pools/
https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops
Give any workaround if you won't fix it.

@VerdonTrigance , good news: https://github.com/actions/virtual-environments/issues/68#issuecomment-602652021
Thank you for your patient and feedback.

@VerdonTrigance , good news: #68 (comment)
Thank you for your patient and feedback.

Thank you for making mention.

@VerdonTrigance , good news: #68 (comment)
Thank you for your patient and feedback.

Hey, what is going on?

[error]This job was blocked because it uses the hosted agent vs2015-win2012r2 which was permanently removed on April 2nd, 2020. See https://aka.ms/blocked-hosted-agent for more information.

,##[error]The remote provider was unable to process the request.

Why it has been deleted without providing Sharepoint SDK on a new images?

[error]SpListItemClaim.cs(1,17): Error CS0234: The type or namespace name 'SharePoint' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)

Was this page helpful?
0 / 5 - 0 ratings