Skip to content

Commit

Permalink
Adds unified settings with migration (#9108)
Browse files Browse the repository at this point in the history
* Add Settings for project system

* Was missing semicolon in strings....

* Strings reflect current guidelines, don't copy settings file to output

* Rename filePrefix/folderPrefix to _xaml.. because the test only covers xaml files, fix package content test

* Update tests/Microsoft.VisualStudio.ProjectSystem.Managed.VS.UnitTests/Setup/SwrTests.cs

Co-authored-by: Melissa Treviño <[email protected]>

* Ignore settings manifest file in CommonFiles test

* Remove settings file from packaging tests

---------

Co-authored-by: Melissa Treviño <[email protected]>
  • Loading branch information
adamint and melytc committed Jun 26, 2023
1 parent d007256 commit 44565c3
Show file tree
Hide file tree
Showing 21 changed files with 1,019 additions and 13 deletions.
1 change: 1 addition & 0 deletions eng/imports/RepoLayout.props
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<VisualStudioSetupInsertionPath>$(VisualStudioSetupOutputPath)Insertion\</VisualStudioSetupInsertionPath>
<VisualStudioSetupIntermediateOutputPath>$(ArtifactsConfigurationDir)VSSetup.obj\</VisualStudioSetupIntermediateOutputPath>
<VisualStudioXamlRulesDir>$(VisualStudioSetupOutputPath)Rules\</VisualStudioXamlRulesDir>
<VisualStudioExtensionSetupDir>$(RepoRoot)setup\</VisualStudioExtensionSetupDir>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -657,3 +657,6 @@ folder "InstallDir:MSBuild\Microsoft\VisualStudio\Managed\zh-Hant"
file source="$(VisualStudioXamlRulesDir)zh-Hant\ResolvedProjectReference.xaml"
file source="$(VisualStudioXamlRulesDir)zh-Hant\ResolvedSdkReference.xaml"
file source="$(VisualStudioXamlRulesDir)zh-Hant\SdkReference.xaml"

folder "Extensions\Microsoft\ManagedProjectSystem\UnifiedSettings"
file source="$(VisualStudioExtensionSetupDir)\ProjectSystemSetup\UnifiedSettings\ManagedProjectSystem.registration.json"
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<!-- This allows passing in MSBuild properties for substitution in SWR files. -->
<PackagePreprocessorDefinitions>$(PackagePreprocessorDefinitions);VisualStudioXamlRulesDir=$(VisualStudioXamlRulesDir)</PackagePreprocessorDefinitions>
<PackagePreprocessorDefinitions>$(PackagePreprocessorDefinitions);VisualStudioXamlRulesDir=$(VisualStudioXamlRulesDir);VisualStudioExtensionSetupDir=$(VisualStudioExtensionSetupDir)</PackagePreprocessorDefinitions>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 4 additions & 0 deletions setup/ProjectSystemSetup/ProjectSystemSetup.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
</PropertyGroup>

<ItemGroup>
<Content Include="UnifiedSettings\ManagedProjectSystem.registration.json">
<IncludeInVSIX>true</IncludeInVSIX>
</Content>

<ProjectReference Include="..\..\src\Microsoft.VisualStudio.ProjectSystem.Managed.VS\Microsoft.VisualStudio.ProjectSystem.Managed.VS.csproj">
<IncludeOutputGroupsInVSIX>BuiltProjectOutputGroup;GetCopyToOutputDirectoryItems;SatelliteDllsProjectOutputGroup;PkgdefProjectOutputGroup</IncludeOutputGroupsInVSIX>
</ProjectReference>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
{
"properties": {
"projectsAndSolutions.sdkStyleProjects.fastUpToDateCheck.enabled": {
"type": "boolean",
"title": "@Setting_FastUpToDateCheck_Enabled_Title;{860A27C0-B665-47F3-BC12-637E16A1050A}",
"default": true,
"requiresRestart": false,
"migration": {
"pass": {
"input": {
"store": "SettingsManager",
"path": "ManagedProjectSystem\\FastUpToDateCheckEnabled"
}
}
}
},
"projectsAndSolutions.sdkStyleProjects.fastUpToDateCheck.loggingLevel": {
"type": "string",
"title": "@Setting_FastUpToDateCheck_LoggingLevel_Title;{860A27C0-B665-47F3-BC12-637E16A1050A}",
"default": "none",
"enum": [
"none",
"minimal",
"info",
"verbose"
],
"enumItemLabels": [
"@Setting_FastUpToDateCheck_LoggingLevel_None;{860A27C0-B665-47F3-BC12-637E16A1050A}",
"@Setting_FastUpToDateCheck_LoggingLevel_Minimal;{860A27C0-B665-47F3-BC12-637E16A1050A}",
"@Setting_FastUpToDateCheck_LoggingLevel_Info;{860A27C0-B665-47F3-BC12-637E16A1050A}",
"@Setting_FastUpToDateCheck_LoggingLevel_Verbose;{860A27C0-B665-47F3-BC12-637E16A1050A}"
],
"requiresRestart": false,
"migration": {
"enumIntegerToString": {
"input": {
"store": "SettingsManager",
"path": "ManagedProjectSystem\\FastUpToDateLogLevel"
},
"map": [
{
"result": "none",
"match": 0
},
{
"result": "minimal",
"match": 1
},
{
"result": "info",
"match": 2
},
{
"result": "verbose",
"match": 3
}
]
}
}
},
"projectsAndSolutions.sdkStyleProjects.fileNestingSettings.ignoreSolutionAndProjectSettings": {
"type": "boolean",
"title": "@Setting_FileNesting_IgnoreSolutionAndProjectSettings_Title;{860A27C0-B665-47F3-BC12-637E16A1050A}",
"default": false,
"requiresRestart": false,
"migration": {
"pass": {
"input": {
"store": "SettingsManager",
"path": "Cps.NestingIgnoreSolutionAndProjectProfiles"
}
}
}
},
"projectsAndSolutions.sdkStyleProjects.multiTargetingSettings.preferSingleTargetBuilds": {
"type": "boolean",
"title": "@Setting_FileNesting_PreferSingleTargetBuilds_Title;{860A27C0-B665-47F3-BC12-637E16A1050A}",
"description": "@Setting_FileNesting_PreferSingleTargetBuilds_Description;{860A27C0-B665-47F3-BC12-637E16A1050A}",
"default": false,
"requiresRestart": false,
"migration": {
"pass": {
"input": {
"store": "SettingsManager",
"path": "ManagedProjectSystem\\PreferSingleTargetBuilds"
}
}
}
}
},

"categories": {
"projectsAndSolutions.sdkStyleProjects": {
"title": "@Settings_Category_SdkStyleProjects;{860A27C0-B665-47F3-BC12-637E16A1050A}"
},
"projectsAndSolutions.sdkStyleProjects.fastUpToDateCheck": {
"title": "@Settings_Category_FastUpToDateCheck;{860A27C0-B665-47F3-BC12-637E16A1050A}",
"order": 1,
"additionalKeywords": [ "futd", "up-to-date", "build" ]
},
"projectsAndSolutions.sdkStyleProjects.fileNestingSettings": {
"title": "@Settings_Category_FileNestingSettings;{860A27C0-B665-47F3-BC12-637E16A1050A}",
"order": 2
},
"projectsAndSolutions.sdkStyleProjects.multiTargetingSettings": {
"title": "@Settings_Category_MultiTargetingSettings;{860A27C0-B665-47F3-BC12-637E16A1050A}",
"order": 3,
"additionalKeywords": [ "build" ]
}
}
}
39 changes: 39 additions & 0 deletions src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/VSPackage.resx
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,43 @@
<data name="27" xml:space="preserve">
<value>.NET Core 2015 Project Files (*.xproj);*.xproj</value>
</data>
<data name="Setting_FastUpToDateCheck_Enabled_Title">
<value>Don't call MSBuild if a project appears to be up to date</value>
</data>
<data name="Setting_FastUpToDateCheck_LoggingLevel_Title">
<value>Logging Level</value>
</data>
<data name="Setting_FastUpToDateCheck_LoggingLevel_None">
<value>None</value>
</data>
<data name="Setting_FastUpToDateCheck_LoggingLevel_Minimal">
<value>Minimal</value>
</data>
<data name="Setting_FastUpToDateCheck_LoggingLevel_Info">
<value>Info</value>
</data>
<data name="Setting_FastUpToDateCheck_LoggingLevel_Verbose">
<value>Verbose</value>
</data>
<data name="Setting_FileNesting_IgnoreSolutionAndProjectSettings_Title">
<value>Ignore solution and project settings</value>
</data>
<data name="Setting_FileNesting_PreferSingleTargetBuilds_Title">
<value>Prefer single-target builds when starting a project</value>
</data>
<data name="Setting_FileNesting_PreferSingleTargetBuilds_Description">
<value>When starting a project that targets multiple frameworks the build time can be reduced by building only a single one.</value>
</data>
<data name="Settings_Category_SdkStyleProjects">
<value>SDK-style projects</value>
</data>
<data name="Settings_Category_FastUpToDateCheck">
<value>Up to date checks</value>
</data>
<data name="Settings_Category_FileNestingSettings">
<value>File nesting settings</value>
</data>
<data name="Settings_Category_MultiTargetingSettings">
<value>Multi-targeting settings</value>
</data>
</root>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 44565c3

Please sign in to comment.