Rebuild started at 2:29 PM...
1>------ Rebuild All started: Project: WebAppDB, Configuration: Debug Any CPU ------
2>------ Rebuild All started: Project: WebApp, Configuration: Debug Any CPU ------
1> C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\csc.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 Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\mscorlib.dll" /debug+ /debug:full /optimize- /out:obj\Debug\WebAppDB.dll /subsystemversion:6.00 /target:library /warnaserror- /utf8output /langversion:7.3 "C:\Users\seisc\AppData\Local\Temp\.NETFramework,Version=v4.7.2.SqlClrAttributes.cs"
Restored C:\Users\seisc\Source\Repos\capstone_project\WebApp\WebApp.csproj (in 102 ms).
Restored C:\Users\seisc\Source\Repos\capstone_project\Unit Tests\Unit 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:\Users\seisc\Source\Repos\capstone_project\WebAppDB\obj\Debug\Model.xml...
1> WebAppDB -> C:\Users\seisc\Source\Repos\capstone_project\WebAppDB\bin\Debug\WebAppDB.dll
1> WebAppDB -> C:\Users\seisc\Source\Repos\capstone_project\WebAppDB\bin\Debug\WebAppDB.dacpac
2>C:\Users\seisc\Source\Repos\capstone_project\WebApp\Views\Register\Register.cshtml(22,15,22,26): warning CS8602: Dereference of a possibly null reference.
2>C:\Users\seisc\Source\Repos\capstone_project\WebApp\Models\VoterModel.cs(64,13,64,18): warning CS8602: Dereference of a possibly null reference.
2>C:\Users\seisc\Source\Repos\capstone_project\WebApp\Models\VoterModel.cs(121,17,121,22): warning CS8602: Dereference of a possibly null reference.
2>WebApp -> C:\Users\seisc\Source\Repos\capstone_project\WebApp\bin\Debug\net8.0\WebApp.dll
2>Done building project "WebApp.csproj".
3>------ Rebuild All started: Project: Unit Tests, Configuration: Debug Any CPU ------
3>Unit Tests -> C:\Users\seisc\Source\Repos\capstone_project\Unit Tests\bin\Debug\net8.0\Unit 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:\a\capstone_project\capstone_project\WebAppDB\WebAppDB.sqlproj(56,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\8.0.204\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" was not found. Confirm that the expression in the Import declaration "C:\Program Files\dotnet\sdk\8.0.204\\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" is correct, and that the file exists on disk.
Warning: D:\a\capstone_project\capstone_project\WebApp\Models\VoterModel.cs(64,13): warning CS8602: Dereference of a possibly null reference. [D:\a\capstone_project\capstone_project\WebApp\WebApp.csproj]
Warning: D:\a\capstone_project\capstone_project\WebApp\Models\VoterModel.cs(121,17): warning CS8602: Dereference of a possibly null reference. [D:\a\capstone_project\capstone_project\WebApp\WebApp.csproj]
Warning: D:\a\capstone_project\capstone_project\WebApp\Views\Register\Register.cshtml(22,15): warning CS8602: Dereference of a possibly null reference. [D:\a\capstone_project\capstone_project\WebApp\WebApp.csproj]
WebApp -> D:\a\capstone_project\capstone_project\WebApp\bin\Debug\net8.0\WebApp.dll
Unit Tests -> D:\a\capstone_project\capstone_project\Unit Tests\bin\Debug\net8.0\Unit Tests.dll
Build FAILED.
Warning: D:\a\capstone_project\capstone_project\WebApp\Models\VoterModel.cs(64,13): warning CS8602: Dereference of a possibly null reference. [D:\a\capstone_project\capstone_project\WebApp\WebApp.csproj]
Warning: D:\a\capstone_project\capstone_project\WebApp\Models\VoterModel.cs(121,17): warning CS8602: Dereference of a possibly null reference. [D:\a\capstone_project\capstone_project\WebApp\WebApp.csproj]
Warning: D:\a\capstone_project\capstone_project\WebApp\Views\Register\Register.cshtml(22,15): warning CS8602: Dereference of a possibly null reference. [D:\a\capstone_project\capstone_project\WebApp\WebApp.csproj]
D:\a\capstone_project\capstone_project\WebAppDB\WebAppDB.sqlproj(56,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\8.0.204\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" was not found. Confirm that the expression in the Import declaration "C:\Program Files\dotnet\sdk\8.0.204\\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.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.
EDIT: I’ve just tried switching to msbuild as suggested, but the issue where it can’t find the SSDT files persists. It also is not able to build my unit testing project as well now.
Run C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe capstone_project.sln /p:Configuration=Release
Microsoft (R) Build Engine version 4.8.9037.0
[Microsoft .NET Framework, version 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
Build started 5/1/2024 8:48:25 PM.
Project "D:\a\capstone_project\capstone_project\capstone_project.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
Building solution configuration "Release|Any CPU".
Project "D:\a\capstone_project\capstone_project\capstone_project.sln" (1) is building "D:\a\capstone_project\capstone_project\WebApp\WebApp.csproj.metaproj" (2) on node 1 (default targets).
D:\a\capstone_project\capstone_project\WebApp\WebApp.csproj.metaproj : warning MSB4078: The project file "WebApp\WebApp.csproj" is not supported by MSBuild and cannot be built.
Done Building Project "D:\a\capstone_project\capstone_project\WebApp\WebApp.csproj.metaproj" (default targets).
Project "D:\a\capstone_project\capstone_project\capstone_project.sln" (1) is building "D:\a\capstone_project\capstone_project\Unit Tests\Unit Tests.csproj.metaproj" (3) on node 1 (default targets).
D:\a\capstone_project\capstone_project\Unit Tests\Unit Tests.csproj.metaproj : warning MSB4078: The project file "Unit Tests\Unit Tests.csproj" is not supported by MSBuild and cannot be built.
Done Building Project "D:\a\capstone_project\capstone_project\Unit Tests\Unit Tests.csproj.metaproj" (default targets).
Project "D:\a\capstone_project\capstone_project\capstone_project.sln" (1) is building "D:\a\capstone_project\capstone_project\WebAppDB\WebAppDB.sqlproj" (4) on node 1 (default targets).
D:\a\capstone_project\capstone_project\WebAppDB\WebAppDB.sqlproj(57,3): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
Done Building Project "D:\a\capstone_project\capstone_project\WebAppDB\WebAppDB.sqlproj" (default targets) -- FAILED.
Done Building Project "D:\a\capstone_project\capstone_project\capstone_project.sln" (default targets) -- FAILED.
Build FAILED.
"D:\a\capstone_project\capstone_project\capstone_project.sln" (default target) (1) ->
"D:\a\capstone_project\capstone_project\WebApp\WebApp.csproj.metaproj" (default target) (2) ->
(Build target) ->
D:\a\capstone_project\capstone_project\WebApp\WebApp.csproj.metaproj : warning MSB4078: The project file "WebApp\WebApp.csproj" is not supported by MSBuild and cannot be built.
"D:\a\capstone_project\capstone_project\capstone_project.sln" (default target) (1) ->
"D:\a\capstone_project\capstone_project\Unit Tests\Unit Tests.csproj.metaproj" (default target) (3) ->
D:\a\capstone_project\capstone_project\Unit Tests\Unit Tests.csproj.metaproj : warning MSB4078: The project file "Unit Tests\Unit Tests.csproj" is not supported by MSBuild and cannot be built.
"D:\a\capstone_project\capstone_project\capstone_project.sln" (default target) (1) ->
"D:\a\capstone_project\capstone_project\WebAppDB\WebAppDB.sqlproj" (default target) (4) ->
D:\a\capstone_project\capstone_project\WebAppDB\WebAppDB.sqlproj(57,3): error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
2 Warning(s)
1 Error(s)
Time Elapsed 00:00:02.38
Error: Process completed with exit code 1.