When I build my project in visual studio it works fine, but when I push to github and it builds there (or I use dotnet build) it does not

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.

New contributor

Shane Salter is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật