Table of Contents

Class ApsProjsHelper

Namespace
SunamoDevCode.Aps.Projs
Assembly
SunamoDevCode.dll

Helper class for working with All Projects Search (APS) project files.

public class ApsProjsHelper
Inheritance
ApsProjsHelper
Inherited Members
Extension Methods

Fields

Type

Type of the ApsProjsHelper class for reflection purposes.

public static Type Type

Field Value

Type

Methods

AbsoluteToRelativeCsProj(string, string)

Converts absolute project reference paths to relative paths in a .csproj file.

public static Task<XmlDocument> AbsoluteToRelativeCsProj(string csprojPath, string basePath)

Parameters

csprojPath string

Path to the .csproj file.

basePath string

Base path to use for path calculations.

Returns

Task<XmlDocument>

The modified XML document, or null if the file doesn't exist or has errors.

ChangeUapFramework(ILogger, SolutionFolder, string, string)

Changes the UAP (Universal Application Platform) framework version for all projects in a solution.

public static void ChangeUapFramework(ILogger logger, SolutionFolder solutionFolder, string targetFramework, string minFramework)

Parameters

logger ILogger

Logger for error/info messages.

solutionFolder SolutionFolder

The solution folder containing projects to update.

targetFramework string

The target framework version.

minFramework string

The minimum framework version.

RemoveSchema(string)

Removes XML schema from content.

[Obsolete("Used MSBuildProject")]
public static string RemoveSchema(string content)

Parameters

content string

The XML content to process.

Returns

string

The content with schema removed.

ReplacePathWithCsproj(ILogger, List<string>)

Replaces folder paths with their corresponding .csproj file paths.

public static void ReplacePathWithCsproj(ILogger logger, List<string> projectsToAdd)

Parameters

logger ILogger

Logger for error/info messages.

projectsToAdd List<string>

List of project paths to replace.

SaveEmptyFullNetProject(string, string, string)

Creates an empty Full .NET Framework project file from a template.

public static Task SaveEmptyFullNetProject(string csprojPath, string projectName, string projectsBasePath)

Parameters

csprojPath string

Path where the .csproj file will be created.

projectName string

Name of the project.

projectsBasePath string

Base path to the projects directory containing templates.

Returns

Task

SaveEmptyTestProject(string)

Creates an empty SDK-style test project file.

public static Task SaveEmptyTestProject(string csprojPath)

Parameters

csprojPath string

Path where the .csproj file will be created.

Returns

Task