Visual Studio打开项目时出现“this project is incompatible with the current version of visual studio”错误

本文解决了一个在VisualStudio2010中遇到的C#工程兼容性问题,详细介绍了如何通过修改项目的Proj文件中的TargetFrameworkVersion值从v4.5到v4.0来解决无法显示项目文件的问题。

1、用Visual Studio2010打开一个C#的工程,打开后,发现项目文件无法显示,提示信息"this project is incompatible with the current version of visual studio",错误如下图所示:

2、解决方法:

找到项目的Proj文件,然后用文本文件方式打开:

 

3、将TargetFrameworkVersion值由v4.5改为v4.0,进行保存

4、重新打开工程之后,可以正常打开

Copied D:\udf\Project1\Project1 est02.c to libudf\src (system "copy "D:\ANSYS2~1\ANSYSI~1\v221\fluent"\fluent22.1.0\src\udf\sconstruct.udf "libudf\win64\2ddp_host\SConstruct" ") ????? 1 ??????? (system "copy "D:\ANSYS2~1\ANSYSI~1\v221\fluent"\fluent22.1.0\src\udf\scons_default.bat "libudf\win64\2ddp_host\scons_test.bat" ") ????? 1 ??????? Files udf_names.c and user_nt.udf in 2ddp_host are up-to-date. (system "copy "D:\ANSYS2~1\ANSYSI~1\v221\fluent"\fluent22.1.0\src\udf\makefile_nt.udf "libudf\win64\2ddp_host\makefile" ") ????? 1 ??????? (chdir "libudf")(chdir "win64\2ddp_host") D:\udf\Project1\Project1\libudf\win64\2ddp_host>rem D:\udf\Project1\Project1\libudf\win64\2ddp_host>rem Copyright 1987-2022 ANSYS, Inc. All Rights Reserved. D:\udf\Project1\Project1\libudf\win64\2ddp_host>rem 'cl.exe' ????????????????????????��???? ????????????? 'clang-cl' ????????????????????????��???? ????????????? scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly File "D:\udf\Project1\Project1\libudf\win64\2ddp_host\SConstruct", line 8, in <module> scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly File "D:\udf\Project1\Project1\libudf\win64\2ddp_host\SConstruct", line 18, in <module> Compiler used is "D:\ANSYS2~1\ANSYSI~1\v221\fluent"\ntbin\clang\bin\clang-cl Linker used is "D:\ANSYS2~1\ANSYSI~1\v221\fluent"\ntbin\clang\bin\lld-link scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly File "D:\udf\Project1\Project1\libudf\win64\2ddp_host\SConstruct", line 152, in <module> Copy("D:\udf\Project1\Project1\libudf\win64\2ddp_host\resolve.exe", "D:\ANSYS2~1\ANSYSI~1\v221\fluent\ntbin\win64\resolve.exe") Copy("D:\udf\Project1\Project1\libudf\win64\2ddp_host\test02.c", "D:\udf\Project1\Project1\libudf\src\test02.c") c_sources ['test02.c', 'udf_names.c'] c_sources_ ['test02.c'] In file included from test02.c:5: In file included from D:\ANSYS2~1\ANSYSI~1\v221\fluent\fluent22.1.0\src\udf\udf.h:22: In file included from D:\ANSYS2~1\ANSYSI~1\v221\fluent\fluent22.1.0\src\main\global.h:266: In file included from D:\ANSYS2~1\ANSYSI~1\v221\fluent\fluent22.1.0\src\storage\var.h:10: D:\ANSYS2~1\ANSYSI~1\v221\fluent\ntbin\clang\10\Include\10.0.18362.0\shared\basetsd.h(322,12): warning: cast to 'void * __ptr32' from smaller integer type 'unsigned long' [-Wint-to-void-pointer-cast] return((void * POINTER_32) (unsigned long) (ULONG_PTR) p); ^ test02.c(79,16): warning: incompatible integer to pointer conversion assigning to 'Thread *' (aka 'struct thread_struct *') from 'int' [-Wint-conversion] tc = CX_Cell_Thread(domain, c); // ?<BD>?<F1>?<CF>?<CC> ^ ~~~~~~~~~~~~~~~~~~~~~~~~~ 2 warnings generated. lld-link: error: undefined symbol: CX_Find_2D_Cell_With_Point >>> referenced by test02.obj:(integrate_boundary_layer) lld-link: error: undefined symbol: CX_Cell_Thread >>> referenced by test02.obj:(integrate_boundary_layer) scons: *** [libudf.dll] Error 1 'nmake' ????????????????????????��???? ????????????? (system "copy "D:\ANSYS2~1\ANSYSI~1\v221\fluent"\fluent22.1.0\src\udf\sconstruct.udf "libudf\win64\2ddp_node\SConstruct" ") ????? 1 ??????? (system "copy "D:\ANSYS2~1\ANSYSI~1\v221\fluent"\fluent22.1.0\src\udf\scons_default.bat "libudf\win64\2ddp_node\scons_test.bat" ") ????? 1 ??????? Files udf_names.c and user_nt.udf in 2ddp_node are up-to-date. (system "copy "D:\ANSYS2~1\ANSYSI~1\v221\fluent"\fluent22.1.0\src\udf\makefile_nt.udf "libudf\win64\2ddp_node\makefile" ") ????? 1 ??????? (chdir "libudf")(chdir "win64\2ddp_node") D:\udf\Project1\Project1\libudf\win64\2ddp_node>rem D:\udf\Project1\Project1\libudf\win64\2ddp_node>rem Copyright 1987-2022 ANSYS, Inc. All Rights Reserved. D:\udf\Project1\Project1\libudf\win64\2ddp_node>rem 'cl.exe' ????????????????????????��???? ????????????? 'clang-cl' ????????????????????????��???? ????????????? scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly File "D:\udf\Project1\Project1\libudf\win64\2ddp_node\SConstruct", line 8, in <module> scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly File "D:\udf\Project1\Project1\libudf\win64\2ddp_node\SConstruct", line 18, in <module> Compiler used is "D:\ANSYS2~1\ANSYSI~1\v221\fluent"\ntbin\clang\bin\clang-cl Linker used is "D:\ANSYS2~1\ANSYSI~1\v221\fluent"\ntbin\clang\bin\lld-link scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly File "D:\udf\Project1\Project1\libudf\win64\2ddp_node\SConstruct", line 152, in <module> Copy("D:\udf\Project1\Project1\libudf\win64\2ddp_node\resolve.exe", "D:\ANSYS2~1\ANSYSI~1\v221\fluent\ntbin\win64\resolve.exe") Copy("D:\udf\Project1\Project1\libudf\win64\2ddp_node\test02.c", "D:\udf\Project1\Project1\libudf\src\test02.c") c_sources ['test02.c', 'udf_names.c'] c_sources_ ['test02.c'] In file included from test02.c:5: In file included from D:\ANSYS2~1\ANSYSI~1\v221\fluent\fluent22.1.0\src\udf\udf.h:22: In file included from D:\ANSYS2~1\ANSYSI~1\v221\fluent\fluent22.1.0\src\main\global.h:266: In file included from D:\ANSYS2~1\ANSYSI~1\v221\fluent\fluent22.1.0\src\storage\var.h:10: D:\ANSYS2~1\ANSYSI~1\v221\fluent\ntbin\clang\10\Include\10.0.18362.0\shared\basetsd.h(322,12): warning: cast to 'void * __ptr32' from smaller integer type 'unsigned long' [-Wint-to-void-pointer-cast] return((void * POINTER_32) (unsigned long) (ULONG_PTR) p); ^ test02.c(79,16): warning: incompatible integer to pointer conversion assigning to 'Thread *' (aka 'struct thread_struct *') from 'int' [-Wint-conversion] tc = CX_Cell_Thread(domain, c); // ?<BD>?<F1>?<CF>?<CC> ^ ~~~~~~~~~~~~~~~~~~~~~~~~~ 2 warnings generated. lld-link: error: undefined symbol: CX_Find_2D_Cell_With_Point >>> referenced by test02.obj:(integrate_boundary_layer) lld-link: error: undefined symbol: CX_Cell_Thread >>> referenced by test02.obj:(integrate_boundary_layer) scons: *** [libudf.dll] Error 1 'nmake' ????????????????????????��???? ????????????? Done.
最新发布
09-24
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

WangLanguager

您的鼓励是对我最大的支持

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值