Visual Studio LightSwitch will not Build
Asked Answered
S

5

5

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.

Spectacular answered 21/9, 2017 at 3:14 Comment(0)
I
4

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.

Ibbie answered 4/10, 2017 at 16:23 Comment(4)
I've found that SSDT 13.0.1601.5 works and that I was having an issue with a newer version of 13.x.Spectacular
@Spectacular hey man, where did you find the v13.0.1601.5 download link? I'm not able to find it anywhere and those "older version of SSDT" pages Microsoft provides are basically useless.Compromise
@Compromise Check Did you try the link TripleDDD posted for 17.2? It was a long time ago, but I thought it was a version that came with visual studio but that if you upgraded it, it would break.Spectacular
Here's a link to the Microsoft page for Previous releases of SSDT learn.microsoft.com/en-us/sql/ssdt/…Spectacular
C
1

Had same issue...
SQL Server Data Tools for Visual Studio 2015 (SSDT)
SSDT version 17.4 (14.0.61712.050) https://go.microsoft.com/fwlink/?linkid=863440
breaks our SSRS,
as does SSDT version 17.3 (14.0.61709.290) https://go.microsoft.com/fwlink/?linkid=858660
Breaks our LightSwich.
https://learn.microsoft.com/en-us/sql/ssdt/previous-releases-of-sql-server-data-tools-ssdt-and-ssdt-bi?view=sql-server-2017
By Trail and Error, found SSDT for VS2015 17.2 Works For both LightSwitch and SSRS
https://go.microsoft.com/fwlink/?linkid=852922

Calvinna answered 9/5, 2018 at 2:35 Comment(0)
S
1

For a Windows 10 machine, with previously installed Visual Studio 2017, the installation of Visual Studio 2015 and running the Lightswitch project, nothing worked, but this:

copy all the content from this location "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\130\Extensions" to "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\140\Extensions"

Found that solution on MSDN.

Smother answered 12/12, 2018 at 16:26 Comment(1)
For me, I didn't have a \130 folder, just a \120, so I tried copying the Extensions from \120 to both \130 and \140 and it eventually worked. First time starting VS2015 after that gave me a error about an extension failing to start, but after that it is starting and compiling fine!Excruciate
E
0

I just faced a similar situation here, but I could not find a version 13.x of SSDT and upgrading to the oldest version available in the Microsoft website didn't help.

The error was fixed when I decided to do some VS pending updates, on of them being the Office Developer Tools for VS, which was updated to

Excruciate answered 17/4, 2018 at 8:10 Comment(0)
W
0

Try by installing microsoft office developer tools for visual studio 2015

https://www.microsoft.com/en-us/download/details.aspx?id=51683

Whisper answered 2/2, 2021 at 14:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.