@@ -65,6 +65,7 @@ public void RunFinished()
65
65
OpenWelcomePage ( ) ;
66
66
SetStartupProject ( ) ;
67
67
SetUWPAnyCPUBuildableAndDeployable ( ) ;
68
+ SetiOSDeployable ( ) ;
68
69
SetDefaultConfiguration ( ) ;
69
70
}
70
71
@@ -183,17 +184,48 @@ private void SetUWPAnyCPUBuildableAndDeployable()
183
184
}
184
185
}
185
186
187
+ private void SetiOSDeployable ( )
188
+ {
189
+ if ( _dte ? . Solution . SolutionBuild is SolutionBuild val )
190
+ {
191
+ try
192
+ {
193
+ var iOSConfigs = new [ ] {
194
+ GetSolutionConfiguration ( val , "Debug" , "iPhone" ) ,
195
+ GetSolutionConfiguration ( val , "Debug" , "iPhoneSimulator" )
196
+ } . Select ( c => c . SolutionContexts ) ;
197
+
198
+ foreach ( SolutionConfiguration solutionConfiguration2 in val . SolutionConfigurations )
199
+ {
200
+ foreach ( var iOSSolutionContext in iOSConfigs )
201
+ {
202
+ var iOSProject = iOSSolutionContext
203
+ . Cast < SolutionContext > ( )
204
+ . FirstOrDefault ( c => c . ProjectName . EndsWith ( ".iOS.csproj" ) ) ;
205
+ if ( iOSProject != null )
206
+ {
207
+ iOSProject . ShouldDeploy = true ;
208
+ }
209
+ }
210
+ }
211
+ }
212
+ catch ( Exception )
213
+ {
214
+ }
215
+ }
216
+ }
217
+
186
218
private void SetDefaultConfiguration ( )
187
219
{
188
220
try
189
221
{
190
222
if ( _dte ? . Solution . SolutionBuild is SolutionBuild2 val )
191
223
{
192
- var x86Config = val . SolutionConfigurations
193
- . Cast < SolutionConfiguration2 > ( )
194
- . FirstOrDefault ( c => c . Name == "Debug" && c . PlatformName == "x86" ) ;
224
+ var x86Config = val . SolutionConfigurations
225
+ . Cast < SolutionConfiguration2 > ( )
226
+ . FirstOrDefault ( c => c . Name == "Debug" && c . PlatformName == "x86" ) ;
195
227
196
- x86Config ? . Activate ( ) ;
228
+ x86Config ? . Activate ( ) ;
197
229
}
198
230
else
199
231
{
0 commit comments