添加多个项目
同学们接下来会有这种需求:把完成作业和随堂练习区分开来,这时候没有必要建两个solution(一个VS,一次只能开一个solution)。
你可以在一个solution下面建两个项目。只需要在solution上点击右键:Add - New Project即可。
solution和project
VS用solution来归纳管理projects:一个solution下可以有多个project。
在文件夹中打开solution(即打开solution所在的文件夹),我们就会发现:solution对应这一个.sln文件。这个文件可以用记事本打开,里面记录的主要就是这个solution里面包含了哪些项目。
而一个project就对应着一个文件夹,该文件夹下又有一个.csproj文件。该文件一样可以用记事本打开,里面记录的主要就是这个project里面包含的各种文件,以及其他配置。
当我们在project中添加一个文件(夹)时,其实做了两件事:
在project所在文件夹中添加文件(夹)
在.csproj文件中添加记录,标明新添加的文件(夹)属于该project
要证明这一点,可以:
通过windows文件管理窗口在项目文件夹中添加一个新的文件,比如fg.txt,
然后在VS中查看,找不到fg.txt的
在VS的solution explorer中,点击:Show All Files
(演示:)
通常来说,solution下所有项目都放在当前文件夹下。
folder/solution folder
设置启动项
插入:solution 和 project,以便于代码管理,暂时理解成类似于“文件夹”和“文件”的关系
可删除:.vs/obj/bin
项目 :.sln(solution) .csproj (CSharpProject)
添加project(tips: 善用Git比较)
solution folder:虚拟
remove project:删除与solution的关联,并不
选择启动项目
https://github.com/users/fghdfghdfg5/projects/952
https://github.com/users/fghdfghdfg5/projects/953
https://github.com/users/fghdfghdfg5/projects/954
https://github.com/users/fghdfghdfg5/projects/955
https://github.com/users/fghdfghdfg5/projects/956
https://github.com/users/fghdfghdfg5/projects/957
https://github.com/users/fghdfghdfg5/projects/958
https://github.com/users/fghdfghdfg5/projects/959
https://github.com/users/fghdfghdfg5/projects/960
https://github.com/users/fghdfghdfg5/projects/961
https://github.com/users/fghdfghdfg5/projects/962
https://github.com/users/fghdfghdfg5/projects/963
https://github.com/users/fghdfghdfg5/projects/964
https://github.com/users/fghdfghdfg5/projects/965
https://github.com/users/fghdfghdfg5/projects/966
https://github.com/users/fghdfghdfg5/projects/967
https://github.com/users/fghdfghdfg5/projects/968
https://github.com/users/fghdfghdfg5/projects/969
https://github.com/users/fghdfghdfg5/projects/970
https://github.com/users/fghdfghdfg5/projects/971
https://github.com/users/fghdfghdfg5/projects/972
https://github.com/users/fghdfghdfg5/projects/973
https://github.com/users/fghdfghdfg5/projects/974
https://github.com/users/fghdfghdfg5/projects/975
https://github.com/users/fghdfghdfg5/projects/976
https://github.com/users/fghdfghdfg5/projects/977
https://github.com/users/fghdfghdfg5/projects/978
https://github.com/users/fghdfghdfg5/projects/979
https://github.com/users/fghdfghdfg5/projects/980
https://github.com/users/fghdfghdfg5/projects/981
https://github.com/users/fghdfghdfg5/projects/982
https://github.com/users/fghdfghdfg5/projects/983
https://github.com/users/fghdfghdfg5/projects/984
https://github.com/users/fghdfghdfg5/projects/985
https://github.com/users/fghdfghdfg5/projects/986
https://github.com/users/fghdfghdfg5/projects/987
https://github.com/users/fghdfghdfg5/projects/988
https://github.com/users/fghdfghdfg5/projects/989
https://github.com/users/fghdfghdfg5/projects/990
https://github.com/users/fghdfghdfg5/projects/991
https://github.com/users/fghdfghdfg5/projects/992
https://github.com/users/fghdfghdfg5/projects/993
https://github.com/users/fghdfghdfg5/projects/994
https://github.com/users/fghdfghdfg5/projects/995
https://github.com/users/fghdfghdfg5/projects/996
https://github.com/users/fghdfghdfg5/projects/997
https://github.com/users/fghdfghdfg5/projects/998
https://github.com/users/fghdfghdfg5/projects/999
https://github.com/users/fghdfghdfg5/projects/1000
https://github.com/users/fghdfghdfg5/projects/1001
https://github.com/users/fghdfghdfg5/projects/1002
https://github.com/users/fghdfghdfg5/projects/1003
https://github.com/users/fghdfghdfg5/projects/1004
https://github.com/users/fghdfghdfg5/projects/1005
https://github.com/users/fghdfghdfg5/projects/1006
https://github.com/users/fghdfghdfg5/projects/1007
https://github.com/users/fghdfghdfg5/projects/1008
https://github.com/users/fghdfghdfg5/projects/1009
https://github.com/users/fghdfghdfg5/projects/1010
https://github.com/users/fghdfghdfg5/projects/1011
https://github.com/users/fghdfghdfg5/projects/1012
https://github.com/users/fghdfghdfg5/projects/1013
https://github.com/users/fghdfghdfg5/projects/1014
https://github.com/users/fghdfghdfg5/projects/1015
https://github.com/users/fghdfghdfg5/projects/1016
https://github.com/users/fghdfghdfg5/projects/1017
https://github.com/users/fghdfghdfg5/projects/1018
https://github.com/users/fghdfghdfg5/projects/1019
https://github.com/users/fghdfghdfg5/projects/1020
https://github.com/users/fghdfghdfg5/projects/1021
https://github.com/users/fghdfghdfg5/projects/1022
https://github.com/users/fghdfghdfg5/projects/1023
https://github.com/users/fghdfghdfg5/projects/1024
https://github.com/users/fghdfghdfg5/projects/1025
https://github.com/users/fghdfghdfg5/projects/1026
https://github.com/users/fghdfghdfg5/projects/1027
https://github.com/users/fghdfghdfg5/projects/1028
https://github.com/users/fghdfghdfg5/projects/1029
https://github.com/users/fghdfghdfg5/projects/1030
https://github.com/users/fghdfghdfg5/projects/1031
https://github.com/users/fghdfghdfg5/projects/1032
https://github.com/users/fghdfghdfg5/projects/1033
https://github.com/users/fghdfghdfg5/projects/1034
https://github.com/users/fghdfghdfg5/projects/1035
https://github.com/users/fghdfghdfg5/projects/1036
https://github.com/users/fghdfghdfg5/projects/1037
https://github.com/users/fghdfghdfg5/projects/1038
https://github.com/users/fghdfghdfg5/projects/1039
https://github.com/users/fghdfghdfg5/projects/1040
https://github.com/users/fghdfghdfg5/projects/1041
https://github.com/users/fghdfghdfg5/projects/1042
https://github.com/users/fghdfghdfg5/projects/1043
https://github.com/users/fghdfghdfg5/projects/1044
https://github.com/users/fghdfghdfg5/projects/1045
https://github.com/users/fghdfghdfg5/projects/1046
https://github.com/users/fghdfghdfg5/projects/1047
https://github.com/users/fghdfghdfg5/projects/1048
https://github.com/users/fghdfghdfg5/projects/1049
https://github.com/users/fghdfghdfg5/projects/1050
https://github.com/users/fghdfghdfg5/projects/1051
https://github.com/users/fghdfghdfg5/projects/1052
https://github.com/users/fghdfghdfg5/projects/1053
https://github.com/users/fghdfghdfg5/projects/1054
https://github.com/users/fghdfghdfg5/projects/1055
https://github.com/users/fghdfghdfg5/projects/1056
https://github.com/users/fghdfghdfg5/projects/1057
https://github.com/users/fghdfghdfg5/projects/1058
https://github.com/users/fghdfghdfg5/projects/1059
https://github.com/users/fghdfghdfg5/projects/1060
https://github.com/users/fghdfghdfg5/projects/1061
https://github.com/users/fghdfghdfg5/projects/1062
https://github.com/users/fghdfghdfg5/projects/1063
https://github.com/users/fghdfghdfg5/projects/1064
https://github.com/users/fghdfghdfg5/projects/1065
https://github.com/users/fghdfghdfg5/projects/1066
https://github.com/users/fghdfghdfg5/projects/1067
https://github.com/users/fghdfghdfg5/projects/1068
https://github.com/users/fghdfghdfg5/projects/1069
https://github.com/users/fghdfghdfg5/projects/1070
https://github.com/users/fghdfghdfg5/projects/1071
https://github.com/users/fghdfghdfg5/projects/1072
https://github.com/users/fghdfghdfg5/projects/1073
https://github.com/users/fghdfghdfg5/projects/1074
https://github.com/users/fghdfghdfg5/projects/1075
https://github.com/users/fghdfghdfg5/projects/1076
https://github.com/users/fghdfghdfg5/projects/1077
https://github.com/users/fghdfghdfg5/projects/1078
https://github.com/users/fghdfghdfg5/projects/1079
https://github.com/users/fghdfghdfg5/projects/1080
https://github.com/users/fghdfghdfg5/projects/1081
https://github.com/users/fghdfghdfg5/projects/1082
https://github.com/users/fghdfghdfg5/projects/1083
https://github.com/users/fghdfghdfg5/projects/1084
https://github.com/users/fghdfghdfg5/projects/1085
https://github.com/users/fghdfghdfg5/projects/1086
https://github.com/users/fghdfghdfg5/projects/1087