Skip to content

Add ruleset as input to fast up to date #2464

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 21, 2017
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ private void OnProjectChanged(IProjectSubscriptionUpdate e)
_isDisabled = disableFastUpToDateCheckString != null && string.Equals(disableFastUpToDateCheckString, TrueValue, StringComparison.OrdinalIgnoreCase);

_msBuildProjectFullPath = e.CurrentState.GetPropertyOrDefault(ConfigurationGeneral.SchemaName, ConfigurationGeneral.MSBuildProjectFullPathProperty, _msBuildProjectFullPath);

foreach (var referenceSchema in ReferenceSchemas)
{
if (e.ProjectChanges.TryGetValue(referenceSchema, out var changes) &&
Expand Down Expand Up @@ -282,6 +283,7 @@ private HashSet<string> CollectInputs(Logger logger)
var inputs = new HashSet<string>();

AddInput(logger, inputs, _msBuildProjectFullPath, "project file");

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whitespace

AddInputs(logger, inputs, _imports, "import");

foreach (var pair in _items)
Expand Down
5 changes: 5 additions & 0 deletions src/Targets/Microsoft.Managed.DesignTime.targets
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
<SuppressOutOfDateMessageOnBuild Condition="'$(SuppressOutOfDateMessageOnBuild)' == ''">true</SuppressOutOfDateMessageOnBuild>
</PropertyGroup>

<!-- If the project we're compiling has a ruleset, make sure we check it for up-to-date checks. -->
<ItemGroup Condition="'$(CodeAnalysisRuleSet)' != ''">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure to verify that this doesn't do anything wonky in the old PS (the designtime targets are imported by non-SDK projects as well).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't look like the old PS took rulesets into account for fast up to date, so this will add it there, too. I'll check to make sure it doesn't change anything, but I assume it's OK to extend the old PS as well?

<UpToDateCheckInput Include="$(CodeAnalysisRuleSet)" />
</ItemGroup>

<!--
Locate the approriate localized xaml resources based on the language ID or name.

Expand Down