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
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
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
loggerILoggerLogger for error/info messages.
solutionFolderSolutionFolderThe solution folder containing projects to update.
targetFrameworkstringThe target framework version.
minFrameworkstringThe minimum framework version.
RemoveSchema(string)
Removes XML schema from content.
[Obsolete("Used MSBuildProject")]
public static string RemoveSchema(string content)
Parameters
contentstringThe 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
loggerILoggerLogger for error/info messages.
projectsToAddList<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
csprojPathstringPath where the .csproj file will be created.
projectNamestringName of the project.
projectsBasePathstringBase path to the projects directory containing templates.
Returns
SaveEmptyTestProject(string)
Creates an empty SDK-style test project file.
public static Task SaveEmptyTestProject(string csprojPath)
Parameters
csprojPathstringPath where the .csproj file will be created.