Skip to content
Permalink
Browse files

[Assets] Removed PackageProfile.Platform

  • Loading branch information
xen2 committed Sep 18, 2018
1 parent 8f017b4 commit 68702d5b39b2fc2e94f7a1aa40a00e391b09b465
@@ -40,13 +40,6 @@ public PackageProfile(params AssetFolder[] folders)
}
}

/// <summary>
/// Gets or sets the platform.
/// </summary>
/// <value>The platform.</value>
[DataMember(20)]
public PlatformType Platform { get; set; } = PlatformType.Shared;

/// <summary>
/// Gets the asset directories to lookup.
/// </summary>
@@ -74,7 +67,7 @@ public PackageProfile(params AssetFolder[] folders)
/// <returns>PackageProfile.</returns>
public static PackageProfile NewShared()
{
var sharedProfile = new PackageProfile() { Platform = PlatformType.Shared };
var sharedProfile = new PackageProfile();
sharedProfile.AssetFolders.Add(new AssetFolder("Assets"));
sharedProfile.ResourceFolders.Add("Resources");
return sharedProfile;
@@ -61,7 +61,7 @@ public override async Task<bool> PrepareForRun(PackageTemplateGeneratorParameter

// If there are no executable/shared projects in this package, we can't work on it
var existingPlatformTypesWithExe = new HashSet<PlatformType>(AssetRegistry.SupportedPlatforms.Where(x => File.Exists(ProjectTemplateGeneratorHelper.GeneratePlatformProjectLocation(parameters.Name, parameters.Package, x))).Select(x => x.Type));
if (package.Profile.Platform != PlatformType.Shared)
if (!(package.Container is SolutionProject project) || project.Platform != PlatformType.Shared)
{
parameters.Logger.Error("The selected package does not contain a shared profile");
return false;
@@ -29,11 +29,6 @@ public ProfileViewModel(SessionViewModel session, Package package, PackageProfil
Package = container;
}

/// <summary>
/// Gets the platform of this profile, if defined.
/// </summary>
public PlatformType Platform => profile.Platform;

public PackageViewModel Package { get; }
}
}

0 comments on commit 68702d5

Please sign in to comment.
You can’t perform that action at this time.