Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio LightSwitch will not Build

I'm working with an old C# LightSwitch HTML project that connects to SharePoint and I need to make a few changes. Unfortunately not enough to justify migrating to another technology/platform, but anyways...

I fire up my Visual Studio 2015 and the project won't build. I've of course googled for and tried everything I can think of and long story short even if I create a new C# LightSwitch HTML project and try to build it, it fails. Here's the error I get:

An exception occurred when building the database for the application. An error occurred during deployment plan generation. Deployment cannot continue. Error SQL0: Required contributor with id 'Microsoft.LightSwitch.DataRetentionDeploymentPlanModifier.v5.0' could not be loaded. Error SQL0: Required contributor with id 'Microsoft.LightSwitch.LocalDbLocationModifier.v5.0' could not be loaded. GraphicsApp C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\LightSwitch\v5.0\Microsoft.LightSwitch.targets 160

If I go to line 160 (double-clicking on the error) I see this (Starting at line 160):

<BuildSchema Inputs="@(ServerMetadataFiles)"
             ServerGeneratedMetadataFiles="@(ServerGeneratedMetadataFiles)"
             Collation="$(DatabaseCollation)"
             DatabaseProject="@(_DatabaseProject)"
             ProjectPath="$(MSBuildProjectFullPath)"
             OutputDirectory="Bin\Data"
             SqlExpressInstanceName="$(SqlExpressInstanceName)"
             ExternalDataSources="@(ServerExternalDataSources)"
             Condition="'$(SkipBuildSchema)' == ''"/>

I've tried searching everything I can think of but I'm not finding anything that even sounds remotely the same except this link. But it's talking about V4 and only says that the solution was to:

"right clicking on the project in solution explorer... [and] upgrade the project"

But that doesn't help me at all because I don't see any option to upgrade anything and again I have the same exact problem on the brand new project I create.

like image 215
LorneCash Avatar asked Sep 21 '17 03:09

LorneCash


1 Answers

Do you know what version of SQL Server Data Tools (SSDT) you have installed?

The latest update 14.0.61707.300 breaks LightSwitch with that error.

You could try uninstalling SSDT and installing the previous version.

like image 178
Michael Squelch Avatar answered Nov 14 '22 21:11

Michael Squelch