Updating List Column Names via CSOM

Looking to rename list columns programmatically? Couldn’t be easier:

// Site
string webUrl = "https://my-Site.sharepoint.com/";
// Username
string userName = "my.name@my-Site.onmicrosoft.com";
// Password
SecureString password = new SecureString();
password.AppendChar('P');
password.AppendChar('a');
password.AppendChar('s');
password.AppendChar('s');
password.AppendChar('w');
password.AppendChar('o');
password.AppendChar('r');
password.AppendChar('d');

// Running in context of our site
using (var context = new ClientContext(webUrl))
{
// Credentials
context.Credentials = new SharePointOnlineCredentials(userName, password);
// List name
List myList = context.Web.Lists.GetByTitle("Documents");
// Site column in particular
Field siteCol = myList.Fields.GetByTitle("Title");
// Give it a new name
siteCol.Title = "Document Name";
// Update the column
siteCol.Update();
// Update the list
myList.Update();
// Execute!
context.ExecuteQuery();

}

Both X and X contain a file that deploys to the same package location

Ran into this error today. It consumed an embarrassing amount of time to fix. I have been close to chucking computers out the window before, but today was a new record.

So for some reason when I tried to publish or deploy my SharePoint app project I was greeted with:

—— Build started: Project: AddinTest, Configuration: Debug Any CPU ——
C:\Users\[REDACTED]\Source\Workspaces\SharePoint Test App\AddinTest\AddinTest\Features\Feature1\Feature1.feature : error : The following file can not be found: “C:\Users\[REDACTED]\Source\Workspaces\SharePoint Test App\AddinTest\AddinTest\Content\bootstrap-datetimepicker-build.less”.
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========

Continue reading “Both X and X contain a file that deploys to the same package location”