# Conflicts: # Source/Platforms/DotNet/NUnit/agents/net40/nunit-agent.exe # Source/Platforms/DotNet/NUnit/agents/net40/nunit.engine.api.dll # Source/Platforms/DotNet/NUnit/agents/net40/nunit.engine.core.dll # Source/Platforms/DotNet/NUnit/agents/net7.0/nunit.agent.addins # Source/Platforms/DotNet/NUnit/nunit.engine.api.dll # Source/Platforms/DotNet/NUnit/nunit.engine.core.dll # Source/Platforms/DotNet/NUnit/nunit.engine.dll # Source/Platforms/DotNet/NUnit/nunit3-console.exe # Source/Platforms/DotNet/NUnit/nunit3-console.exe.config # Source/Platforms/DotNet/NUnit/testcentric.engine.metadata.dll # Source/Tools/Flax.Build/Deps/Downloader.cs # Source/Tools/Flax.Stats/CodeFrame.cs # Source/Tools/Flax.Stats/CodeFrameNode.cs # Source/Tools/Flax.Stats/Flax.Stats.Build.cs # Source/Tools/Flax.Stats/Languages.cs # Source/Tools/Flax.Stats/Program.cs # Source/Tools/Flax.Stats/TaskType.cs # Source/Tools/Flax.Stats/Tools.cs # Source/Tools/FlaxEngine.Tests/TestEditorUtils.cs
56 lines
1.7 KiB
C#
56 lines
1.7 KiB
C#
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
|
|
|
|
using System;
|
|
|
|
namespace Flax.Build.Projects.VisualStudio
|
|
{
|
|
/// <summary>
|
|
/// The generic implementation of the Visual Studio project.
|
|
/// </summary>
|
|
/// <seealso cref="Flax.Build.Projects.Project" />
|
|
public class VisualStudioProject : Project
|
|
{
|
|
/// <summary>
|
|
/// The project unique identifier (from the project file or the generated).
|
|
/// </summary>
|
|
public Guid ProjectGuid;
|
|
|
|
/// <summary>
|
|
/// The project parent folder identifier (used in the solution hierarchy).
|
|
/// </summary>
|
|
public Guid FolderGuid;
|
|
|
|
/// <summary>
|
|
/// Gets the project type unique identifier. Used by the Visual Studio solution file to identify the project type.
|
|
/// </summary>
|
|
public virtual Guid ProjectTypeGuid
|
|
{
|
|
get
|
|
{
|
|
switch (Type ?? Targets[0].Type)
|
|
{
|
|
case TargetType.NativeCpp: return VisualStudioProjectGenerator.ProjectTypeGuids.WindowsVisualCpp;
|
|
case TargetType.DotNet: return VisualStudioProjectGenerator.ProjectTypeGuids.WindowsCSharp;
|
|
case TargetType.DotNetCore: return VisualStudioProjectGenerator.ProjectTypeGuids.WindowsCSharp;
|
|
default: throw new ArgumentOutOfRangeException();
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public override string Path
|
|
{
|
|
get => base.Path;
|
|
set
|
|
{
|
|
base.Path = value;
|
|
|
|
if (ProjectGuid == Guid.Empty)
|
|
{
|
|
ProjectGuid = VisualStudioProjectGenerator.GetProjectGuid(Path);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|