Код: Выделить всё
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 ==========
Код: Выделить всё
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.
Я пробовал копировать файлы и ссылаться на них в файле .sqlproj, но это полностью меняет ошибку на что-то другое.
Подробнее здесь: https://stackoverflow.com/questions/784 ... h-to-githu