@@ -18,132 +18,132 @@ local project = p.project
1818local wks , prj
1919
2020function suite .setup ()
21- p .action .set (" vs2005" )
22- wks , prj = test .createWorkspace ()
21+ p .action .set (" vs2005" )
22+ wks , prj = test .createWorkspace ()
2323 configurations { " Debug" , " Release" , " Distribution" }
24- language " C#"
24+ language " C#"
2525end
2626
2727local function targetFrameworkPrepare ()
28- local cfg = test .getconfig (prj , " Debug" )
29- dn2005 .netcore .targetFramework (cfg )
28+ local cfg = test .getconfig (prj , " Debug" )
29+ dn2005 .netcore .targetFramework (cfg )
3030end
3131
3232local function targetFrameworkVersionPrepare ()
33- local cfg = test .getconfig (prj , " Debug" )
34- dn2005 .targetFrameworkVersion (cfg )
33+ local cfg = test .getconfig (prj , " Debug" )
34+ dn2005 .targetFrameworkVersion (cfg )
3535end
3636
3737local function projectConfigurationsPrepare ()
38- dn2005 .projectConfigurations (prj )
38+ dn2005 .projectConfigurations (prj )
3939end
4040
4141local function prepareNetcore ()
42- dn2005 .projectElement (prj )
42+ dn2005 .projectElement (prj )
4343end
4444
4545local function prepareProjectProperties ()
46- local localProj = test .getproject (wks , 1 )
46+ local localProj = test .getproject (wks , 1 )
4747
48- dn2005 .prepare (cs2005 )
49- dn2005 .projectProperties (localProj )
48+ dn2005 .prepare (cs2005 )
49+ dn2005 .projectProperties (localProj )
5050end
5151
5252function suite .targetFrameworkProperty_framework ()
53- dotnetframework " 4.7.2"
54- targetFrameworkPrepare ()
55- test .isemptycapture ()
53+ dotnetframework " 4.7.2"
54+ targetFrameworkPrepare ()
55+ test .isemptycapture ()
5656end
5757
5858function suite .targetFrameworkProperty_core ()
59- dotnetframework " netcoreapp2.2"
60- targetFrameworkPrepare ()
61- test .capture [[
59+ dotnetframework " netcoreapp2.2"
60+ targetFrameworkPrepare ()
61+ test .capture [[
6262 <TargetFramework>netcoreapp2.2</TargetFramework>
6363 ]]
6464end
6565
6666function suite .targetFrameworkProperty_standard ()
67- dotnetframework " netstandard1.2"
68- targetFrameworkPrepare ()
69- test .capture [[
67+ dotnetframework " netstandard1.2"
68+ targetFrameworkPrepare ()
69+ test .capture [[
7070 <TargetFramework>netstandard1.2</TargetFramework>
71- ]]
71+ ]]
7272end
7373
7474function suite .targetFrameworkVersionProperty_framework ()
75- dotnetframework " 4.7.2"
76- targetFrameworkVersionPrepare ()
77- test .capture [[
75+ dotnetframework " 4.7.2"
76+ targetFrameworkVersionPrepare ()
77+ test .capture [[
7878 <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
79- ]]
79+ ]]
8080end
8181
8282function suite .targetFrameworkVersionProperty_core ()
83- dotnetframework " netcoreapp2.2"
84- targetFrameworkVersionPrepare ()
85- test .isemptycapture ()
83+ dotnetframework " netcoreapp2.2"
84+ targetFrameworkVersionPrepare ()
85+ test .isemptycapture ()
8686end
8787
8888function suite .targetFrameworkVersionProperty_standard ()
89- dotnetframework " netstandard1.2"
90- targetFrameworkVersionPrepare ()
91- test .isemptycapture ()
89+ dotnetframework " netstandard1.2"
90+ targetFrameworkVersionPrepare ()
91+ test .isemptycapture ()
9292end
9393
9494function suite .project_element_standard ()
95- dotnetframework " netstandard1.2"
96- prepareNetcore ()
97- test .capture [[
95+ dotnetframework " netstandard1.2"
96+ prepareNetcore ()
97+ test .capture [[
9898<Project Sdk="Microsoft.NET.Sdk">
99- ]]
99+ ]]
100100end
101101
102102function suite .project_element_core ()
103- dotnetframework " netcoreapp1.2"
104- prepareNetcore ()
105- test .capture [[
103+ dotnetframework " netcoreapp1.2"
104+ prepareNetcore ()
105+ test .capture [[
106106<Project Sdk="Microsoft.NET.Sdk">
107- ]]
107+ ]]
108108end
109109
110110function suite .project_element_net5 ()
111- dotnetframework " net5.0"
112- prepareNetcore ()
113- test .capture [[
111+ dotnetframework " net5.0"
112+ prepareNetcore ()
113+ test .capture [[
114114<Project Sdk="Microsoft.NET.Sdk">
115- ]]
115+ ]]
116116end
117117
118118function suite .project_element_framework ()
119- dotnetframework " 4.7.2"
120- prepareNetcore ()
121- test .capture [[
119+ dotnetframework " 4.7.2"
120+ prepareNetcore ()
121+ test .capture [[
122122<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
123- ]]
123+ ]]
124124end
125125
126126function suite .allowUnsafeProperty_core ()
127- dotnetframework " netcoreapp2.2"
128- clr " Unsafe"
129- prepareProjectProperties ()
130- test .capture [[
127+ dotnetframework " netcoreapp2.2"
128+ clr " Unsafe"
129+ prepareProjectProperties ()
130+ test .capture [[
131131 <PropertyGroup>
132132 <OutputType>Exe</OutputType>
133133 <AppDesignerFolder>Properties</AppDesignerFolder>
134134 <TargetFramework>netcoreapp2.2</TargetFramework>
135135 <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
136136 <EnableDefaultCompileItems>false</EnableDefaultCompileItems>
137137 </PropertyGroup>
138- ]]
138+ ]]
139139end
140140
141141function suite .implicitUsings_on ()
142- p .action .set (" vs2022" )
143- dotnetframework " net10.0"
144- enableimplicitusings " On"
145- prepareProjectProperties ()
146- test .capture [[
142+ p .action .set (" vs2022" )
143+ dotnetframework " net10.0"
144+ enableimplicitusings " On"
145+ prepareProjectProperties ()
146+ test .capture [[
147147 <PropertyGroup>
148148 <OutputType>Exe</OutputType>
149149 <AppDesignerFolder>Properties</AppDesignerFolder>
@@ -152,15 +152,15 @@ function suite.implicitUsings_on()
152152 <EnableDefaultCompileItems>false</EnableDefaultCompileItems>
153153 <ImplicitUsings>true</ImplicitUsings>
154154 </PropertyGroup>
155- ]]
155+ ]]
156156end
157157
158158function suite .implicitUsings_off ()
159- p .action .set (" vs2022" )
160- dotnetframework " net10.0"
161- enableimplicitusings " Off"
162- prepareProjectProperties ()
163- test .capture [[
159+ p .action .set (" vs2022" )
160+ dotnetframework " net10.0"
161+ enableimplicitusings " Off"
162+ prepareProjectProperties ()
163+ test .capture [[
164164 <PropertyGroup>
165165 <OutputType>Exe</OutputType>
166166 <AppDesignerFolder>Properties</AppDesignerFolder>
@@ -169,7 +169,22 @@ function suite.implicitUsings_off()
169169 <EnableDefaultCompileItems>false</EnableDefaultCompileItems>
170170 <ImplicitUsings>false</ImplicitUsings>
171171 </PropertyGroup>
172- ]]
172+ ]]
173+ end
174+
175+ function suite .multiple_target_dotnet_frameworks ()
176+ p .action .set (" vs2022" )
177+ dotnetframework { " net8.0" , " net10.0" }
178+ prepareProjectProperties ()
179+ test .capture [[
180+ <PropertyGroup>
181+ <OutputType>Exe</OutputType>
182+ <AppDesignerFolder>Properties</AppDesignerFolder>
183+ <TargetFrameworks>net8.0;net10.0</TargetFrameworks>
184+ <Configurations>Debug;Release;Distribution</Configurations>
185+ <EnableDefaultCompileItems>false</EnableDefaultCompileItems>
186+ </PropertyGroup>
187+ ]]
173188end
174189
175190function suite .project_element_configurations ()
0 commit comments