Search Results for

    Show / Hide Table of Contents

    Intent.VisualStudio.Projects

    This Intent Architect module adds the Visual Studio Designer to an Intent Architect Application, generates and manages both Visual Studio .sln and .NET .csproj files.

    The .NET Settings stereotype

    The Suppress Warnings property

    Adds a <NoWarn /> element to the .csproj file with the specified value of semi-colon separated codes of warnings to suppress.

    By default this is populated with the value $(NoWarn) which will apply the default suppressed warnings. While this value is set to $(NoWarn), no <NoWarn /> element will be added to the .csproj file.

    ;1561 is automatically appended by some Intent Architect application templates to suppress the Missing XML comment for publicly visible type or member 'Type_or_Member' warning.

    Use top-level statements

    When enabled the Program.cs will no longer generate a class and instead use top-level statements.

    Note

    Requires at least version 6.0.0 of the Intent.Modules.AspNetCore to be installed in order for changes to take effect.

    Use minimal hosting model

    When enabled Startup.cs will no longer be generated and all start-up will be performed in Program.cs by of the new minimal hosting model introduced with .NET 6.

    Note

    Requires at least version 6.0.0 of the Intent.Modules.AspNetCore to be installed in order for changes to take effect.

    The Visual Studio Solution Options stereotype

    This stereo type is applied to Visual Studio Solution elements.

    Solution Name

    By default your Visual Studio Solution name will be the same as your Visual Studio Package name. This properties allows you to explicitly specify the name without changing the package name. This is useful for scenarios where you have a shared VS Solution across Applications.

    Solution Relative Location

    By Default, your Visual Studio Solution solution will be placed in Application's Relative Output Location, this settings allows you to adjust the location of the solution relative to it's default location.

    The Folder Options stereotype

    This stereo type is applied to Solution Folder elements.

    Materialize Folder

    When checked, this option will materialize your logical Visual Studio Solution folders as actual folders on disk.

    Central Package Management

    In .NET, Central Package Management (CPM) allows management of versions of NuGet packages for multiple .csproj from a central Directory.Packages.props file and an MSBuild property.

    To have Intent Architect automatically create and manage a Directory.Packages.props file for a solution, on the Visual Studio Solution Options stereotype, check the Manage Package Versions Centrally property.

    Visual Studio Solution Options Stereotype

    Once enabled, PackageReference items .csproj files will by default no longer add a Version attributes added to them and any existing ones will be removed.

    Once Manage Package Versions Centrally is enabled, several options become available to control where the Directory.Packages.props file is output.

    Visual Studio Solution Options Stereotype

    Available Output Location Options

    • Same as .sln file (default):
      The Directory.Packages.props file will be placed in the same directory as the solution (.sln) file.

    • Relative Path:
      The Directory.Packages.props file will be placed at the specified relative path field value, which is resolved against the solution (.sln) file location.

      • Relative Path field:
        This field is only available when the Output Location is set to Relative Path. For example, setting the value to ../ will result in the output folder being one folder higher than the solution file location.
    • Check Parent Folders:
      The system will check parent directories (starting from the solution file's location) for an existing Directory.Packages.props file. If found, that file will be used; otherwise, a new one will be created in the solution (.sln) file's directory.

      • Only Check Current Git Repository (checkbox):
        This option is available when Check Parent Folders is selected. If enabled, the search will stop at the root of the current Git repository (i.e., the first directory containing a .git folder).

    Managing Project Package Versions

    It is also possible to control the behaviour of a single project by setting the Manage Package Versions property on its stereotype:

    Project .NET Settings stereotype

    The following options are available:

    • (unmanaged) - Intent will not add, change or remove the ManagePackageVersionsCentrally property in the .csproj file.

    • (unspecified) - Intent will ensure there is no ManagePackageVersionsCentrally property in the .csproj file removing it if necessary. Version attributes will be added to PackageReference items depending on whether or not the Solution has the CPM option set.

    • false - Intent will ensure the ManagePackageVersionsCentrally property is present with a value of false and regardless of the the Solution's CPM setting, Version attributes will always be added to PackageReference items.

    • true - Intent will ensure the ManagePackageVersionsCentrally property is present with a value of true and regardless of the the Solution's CPM setting, Version attributes will be removed from PackageReference items.

    Note

    Regardless of the project level's Manage Package Versions setting, unless the solution has Manage Package Versions Centrally set, Intent will not update or manage PackageVersion items for a Directory.Packages.props file.

    • Edit this page
    ☀
    ☾
    In this article
    Back to top Copyright © 2017-, Intent Software Pte Ltd.