Skip to content

Commit

Permalink
Added support for Shared Code Projects (.shproj)
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentH-Net committed Oct 8, 2015
1 parent d563964 commit 675570c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions NuGet/QuickCross.psm1
Expand Up @@ -385,17 +385,19 @@ function GetProjectPlatform
# Xamarin.iOS: MonoTouch,Version=v1.0

$targetFrameworkName = $targetFrameworkMoniker.Split(',')[0]
switch ($targetFrameworkName)
switch ("$targetFrameworkName")
{
'MonoAndroid' { $platform = 'android' }
'MonoTouch' { $platform = 'ios' }
'Xamarin.iOS' { $platform = 'ios' }
'WindowsPhone' { $platform = 'wp' } # Windows Phone 8 Silverlight
'.NETCore' { $platform = 'ws' } # Windows Store 8
'WindowsPhoneApp' { $platform = 'wpa' } # Windows Phone 8.1
'.NETPortable' { $platform = 'pcl' } # Portable Class Library
'' { $platform = 'shproj' } # Shared Code Project
'none' { $platform = 'none' } # Miscellaneous Files
default {
if ($allowUnknown) { $platform = '' } else { throw "Unsupported target framework: " + $targetFrameworkName }
if ($allowUnknown) { $platform = '' } else { throw "Unsupported target framework: " + $targetFrameworkName + " for project $($project.FullName)" }
}
}

Expand All @@ -421,6 +423,7 @@ function GetProjectType
'ws' { $isApplication = $projectFileContent -match '<\s*OutputType\s*>\s*AppContainerExe\s*</\s*OutputType\s*>' }
'wpa' { $isApplication = $projectFileContent -match '<\s*OutputType\s*>\s*AppContainerExe\s*</\s*OutputType\s*>' }
'pcl' { $isApplication = $null }
'shproj' { $isApplication = $null }
'none' { $isApplication = $null }
default { throw "Unknown platform: " + $platform }
}
Expand Down

0 comments on commit 675570c

Please sign in to comment.