How to solve the MSB3721 error of VS2019?

I’m currently working on a relatively large project using cuda and C++, but I’m currently encountering an MSB3721 error. I know MSB3721 is just a very general error, so I increased the verbosity of VS 2019 and recompiled, but I only get the following output:

1>F:ExplicitFEM\element.h(223): warning C4100: “jbMat”: 未引用的形参
1>F:ExplicitFEM\classfactory.h(105): warning C4251: “MX_Sim_Explicit::ClassFactory::nodeList_”: class“std::map<std::basic_string<char,std::char_traits,std::allocator>,MX_Sim_Explicit::Node *(_cdecl *)(int),std::less<std::basic_string<char,std::char_traits,std::allocator>>,std::allocator<std::pair<const std::basic_string<char,std::char_traits,std::allocator>,MX_Sim_Explicit::Node *(cdecl *)(int)>>>”需要有 dll 接口由 class“MX_Sim_Explicit::ClassFactory”的客户端使用
1>F:ExplicitFEM\manager.h(20): warning C4251: “MX_Sim_Explicit::Manager::typeMapNumber
”: class“std::map<int,int,std::less,std::allocator<std::pair<const int,int>>>”需要有 dll 接口由 class“MX_Sim_Explicit::Manager”的客户端使用
1>F:ExplicitFEM\DistributingCoupling.h(27): warning C4251: “MX_Sim_Explicit::DistributingCoupling::weighMethod
”: class“std::basic_string<char,std::char_traits,std::allocator>”需要有 dll 接口由 class“MX_Sim_Explicit::DistributingCoupling”的客户端使用
1>F:ExplicitFEM\classfactory.h(119,39): warning C4251: “MX_Sim_Explicit::ClassFactory::rigidWallList
”: class“std::map<std::string,MX_Sim_Explicit::RigidWall *(__cdecl *)(MX_Sim_Explicit::Domain *),std::lessstd::string,std::allocator<std::pair<const std::string,MX_Sim_Explicit::RigidWall *(_cdecl *)(MX_Sim_Explicit::Domain *)>>>”需要有 dll 接口由 class“MX_Sim_Explicit::ClassFactory”的客户端使用
1>F:ExplicitFEM\classfactory.h(121,36): warning C4251: “MX_Sim_Explicit::ClassFactory::airbagList
”: class“std::map<std::string,MX_Sim_Explicit::Airbag *(__cdecl *)(MX_Sim_Explicit::Domain *),std::lessstd::string,std::allocator<std::pair<const std::string,MX_Sim_Explicit::Airbag *(_cdecl *)(MX_Sim_Explicit::Domain *)>>>”需要有 dll 接口由 class“MX_Sim_Explicit::ClassFactory”的客户端使用
1>F:ExplicitFEM\classfactory.h(123,40): warning C4251: “MX_Sim_Explicit::ClassFactory::equationOfStateList
”: class“std::map<std::string,MX_Sim_Explicit::EquationOfState *(__cdecl *)(int),std::lessstd::string,std::allocator<std::pair<const std::string,MX_Sim_Explicit::EquationOfState *(_cdecl *)(int)>>>”需要有 dll 接口由 class“MX_Sim_Explicit::ClassFactory”的客户端使用
1>F:ExplicitFEM\classfactory.h(125,41): warning C4251: “MX_Sim_Explicit::ClassFactory::coordinateList
”: class“std::map<std::string,MX_Sim_Explicit::CoordinateSystem *(__cdecl *)(int),std::lessstd::string,std::allocator<std::pair<const std::string,MX_Sim_Explicit::CoordinateSystem *(_cdecl *)(int)>>>”需要有 dll 接口由 class“MX_Sim_Explicit::ClassFactory”的客户端使用
1>F:ExplicitFEM\classfactory.h(127,41): warning C4251: “MX_Sim_Explicit::ClassFactory::matAddList
”: class“std::map<std::string,MX_Sim_Explicit::MaterialAddition *(__cdecl *)(int),std::lessstd::string,std::allocator<std::pair<const std::string,MX_Sim_Explicit::MaterialAddition *(__cdecl *)(int)>>>”需要有 dll 接口由 class“MX_Sim_Explicit::ClassFactory”的客户端使用
1>F:ExplicitFEM\parallelunit.h(109,64): warning C4100: “idMap”: 未引用的形参
1>F:ExplicitFEM\parallelunit.h(115,68): warning C4100: “pointArray”: 未引用的形参
1>F:ExplicitFEM\parallelunit.h(121,67): warning C4100: “unitArray”: 未引用的形参
1>F:ExplicitFEM\curve.h(45,71): warning C4100: “num”: 未引用的形参
1>F:ExplicitFEM\curve.h(45,63): warning C4100: “ix”: 未引用的形参
1>F:ExplicitFEM\AdiabaticAirbag.cpp(62,33): warning C4267: “初始化”: 从“size_t”转换到“int”,可能丢失数据
1>F:ExplicitFEM\AdiabaticAirbag.cpp(62,33): warning C4267: “初始化”: 从“size_t”转换到“const int”,可能丢失数据
1>F:ExplicitFEM\AdiabaticAirbag.cpp(59,46): warning C4100: “dt”: 未引用的形参
1>F:ExplicitFEM\AdiabaticAirbag.cpp(86,40): warning C4189: “mzong”: 局部变量已初始化但不引用
1>F:ExplicitFEM\AdiabaticAirbag.cpp(86,51): warning C4101: “vzong”: 未引用的局部变量
1>F:ExplicitFEM\Airbag.cpp(400): warning C4701: 使用了可能未初始化的局部变量“ntn”
1>CUDALINK : nvlink warning : Stack size for entry function ‘_ZN15MX_Sim_Explicit27GpuInitialNodeRigidBodyMassEiPPNS_12SpotWeldUnitE’ cannot be statically determined
1>CUDALINK : nvlink warning : Stack size for entry function ‘_ZN15MX_Sim_Explicit19GpuClearContactPairEiPPNS_11ContactUnitEi’ cannot be statically determined
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\BuildCustomizations\CUDA 11.7.targets(879,9): error MSB3721: 命令““C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\bin\nvcc.exe” -dlink -o x64\Debug\MxSimExplicit.device-link.obj -Xcompiler “/EHsc /W4 /nologo /Od /Fdx64\Debug\vc142.pdb /Zi /RTC1 /MDd " -L"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\bin/crt” -L…\x64\Debug -L"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\lib\x64" -L"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\lib\x64" -L…\packages\metis\Debug cudart_static.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib cublas.lib MxFileTransform.lib metis.lib cudart.lib cudadevrt.lib -gencode=arch=compute_86,code=sm_86 -G --machine 64 “F:ExplicitFEM\x64\Debug\beam1st.cu.obj” “F:ExplicitFEM\x64\Debug\BeamLoad.cu.obj” “F:ExplicitFEM\x64\Debug\BeamLoadGpu.cu.obj” “F:ExplicitFEM\x64\Debug\beamsection.cu.obj” “F:ExplicitFEM\x64\Debug\BelytschkoBeam.cu.obj” “F:ExplicitFEM\x64\Debug\BlatzKo.cu.obj” “F:ExplicitFEM\x64\Debug\BLShell.cu.obj” “F:ExplicitFEM\x64\Debug\boundary.cu.obj” “F:ExplicitFEM\x64\Debug\boundarymanager.cu.obj” “F:ExplicitFEM\x64\Debug\btshell.cu.obj””已退出,返回代码为 1。
1> 36117 个警告
1> 1 个错误
1>
1>已用时间 00:05:56.71

Because there is too much output information, I can’t upload all of them, so only a few representative ones are posted here. I get a slew of warnings and an error MSB3721, and nothing else before MSB3721. How should I find the exact cause of the error and fix it? Is this a bug in my code or is it a problem with my compiler environment?