1>------ Rebuild All started: Project: WebAppDB, Configuration: Debug Any CPU ------
2>------ Rebuild All started: Project: WebApp, Configuration: Debug Any CPU ------
1> C:Program FilesMicrosoft Visual Studio2022CommunityMSBuildCurrentBinRoslyncsc.exe /noconfig /nowarn:1701,1702,2008 /fullpaths /nostdlib+ /errorreport:prompt /warn:4 /define:DEBUG;TRACE /errorendlocation /preferreduilang:en-US /highentropyva+ /reference:"C:Program Files (x86)Reference AssembliesMicrosoftFramework.NETFrameworkv4.7.2mscorlib.dll" /debug+ /debug:full /optimize- /out:objDebugWebAppDB.dll /subsystemversion:6.00 /target:library /warnaserror- /utf8output /langversion:7.3 "C:UsersseiscAppDataLocalTemp.NETFramework,Version=v4.7.2.SqlClrAttributes.cs"
Restored C:UsersseiscSourceReposcapstone_projectWebAppWebApp.csproj (in 102 ms).
Restored C:UsersseiscSourceReposcapstone_projectUnit TestsUnit Tests.csproj (in 124 ms).
1> Loading project references...
1> Loading project files...
1> Building the project model and resolving object interdependencies...
1> Validating the project model...
1> Writing model to C:UsersseiscSourceReposcapstone_projectWebAppDBobjDebugModel.xml...
1> WebAppDB -> C:UsersseiscSourceReposcapstone_projectWebAppDBbinDebugWebAppDB.dll
1> WebAppDB -> C:UsersseiscSourceReposcapstone_projectWebAppDBbinDebugWebAppDB.dacpac
2>C:UsersseiscSourceReposcapstone_projectWebAppViewsRegisterRegister.cshtml(22,15,22,26): warning CS8602: Dereference of a possibly null reference.
2>C:UsersseiscSourceReposcapstone_projectWebAppModelsVoterModel.cs(64,13,64,18): warning CS8602: Dereference of a possibly null reference.
2>C:UsersseiscSourceReposcapstone_projectWebAppModelsVoterModel.cs(121,17,121,22): warning CS8602: Dereference of a possibly null reference.
2>WebApp -> C:UsersseiscSourceReposcapstone_projectWebAppbinDebugnet8.0WebApp.dll
2>Done building project "WebApp.csproj".
3>------ Rebuild All started: Project: Unit Tests, Configuration: Debug Any CPU ------
3>Unit Tests -> C:UsersseiscSourceReposcapstone_projectUnit TestsbinDebugnet8.0Unit Tests.dll
========== Rebuild All: 3 succeeded, 0 failed, 0 skipped ==========
========== Rebuild completed at 2:30 PM and took 02.043 seconds ==========
This is what I get from visual studio when rebuilding the project. It succeeds totally fine. However…
Run dotnet build --no-restore
MSBuild version 17.9.8+b34f75857 for .NET
D:acapstone_projectcapstone_projectWebAppDBWebAppDB.sqlproj(56,3): error MSB4019: The imported project "C:Program Filesdotnetsdk8.0.204MicrosoftVisualStudiov11.0SSDTMicrosoft.Data.Tools.Schema.SqlTasks.targets" was not found. Confirm that the expression in the Import declaration "C:Program Filesdotnetsdk8.0.204\MicrosoftVisualStudiov11.0SSDTMicrosoft.Data.Tools.Schema.SqlTasks.targets" is correct, and that the file exists on disk.
Warning: D:acapstone_projectcapstone_projectWebAppModelsVoterModel.cs(64,13): warning CS8602: Dereference of a possibly null reference. [D:acapstone_projectcapstone_projectWebAppWebApp.csproj]
Warning: D:acapstone_projectcapstone_projectWebAppModelsVoterModel.cs(121,17): warning CS8602: Dereference of a possibly null reference. [D:acapstone_projectcapstone_projectWebAppWebApp.csproj]
Warning: D:acapstone_projectcapstone_projectWebAppViewsRegisterRegister.cshtml(22,15): warning CS8602: Dereference of a possibly null reference. [D:acapstone_projectcapstone_projectWebAppWebApp.csproj]
WebApp -> D:acapstone_projectcapstone_projectWebAppbinDebugnet8.0WebApp.dll
Unit Tests -> D:acapstone_projectcapstone_projectUnit TestsbinDebugnet8.0Unit Tests.dll
Build FAILED.
Warning: D:acapstone_projectcapstone_projectWebAppModelsVoterModel.cs(64,13): warning CS8602: Dereference of a possibly null reference. [D:acapstone_projectcapstone_projectWebAppWebApp.csproj]
Warning: D:acapstone_projectcapstone_projectWebAppModelsVoterModel.cs(121,17): warning CS8602: Dereference of a possibly null reference. [D:acapstone_projectcapstone_projectWebAppWebApp.csproj]
Warning: D:acapstone_projectcapstone_projectWebAppViewsRegisterRegister.cshtml(22,15): warning CS8602: Dereference of a possibly null reference. [D:acapstone_projectcapstone_projectWebAppWebApp.csproj]
D:acapstone_projectcapstone_projectWebAppDBWebAppDB.sqlproj(56,3): error MSB4019: The imported project "C:Program Filesdotnetsdk8.0.204MicrosoftVisualStudiov11.0SSDTMicrosoft.Data.Tools.Schema.SqlTasks.targets" was not found. Confirm that the expression in the Import declaration "C:Program Filesdotnetsdk8.0.204\MicrosoftVisualStudiov11.0SSDTMicrosoft.Data.Tools.Schema.SqlTasks.targets" is correct, and that the file exists on disk.
3 Warning(s)
1 Error(s)
Time Elapsed 00:00:40.97
Error: Process completed with exit code 1.
I get the above from github when trying to build the same code. I know it’s trying to find something from SSDT in order to build my database project, but I have no idea how to get that installed on the github builder. Any advice for how to fix this?
I’ve tried copying files and referencing them within the .sqlproj file and that just changes the error to something else entirely.
Shane Salter is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.