Skip to content

Commit c6c019f

Browse files
authored
Allow non-versioned MSBuild local overrides (#14430)
* Exclude MSBuild files from Prettier * Revert prettierignore * Allow arbitrary XML line length * Allow MSBuild props/targets fork-local overrides * Ignore workspace-local props and targets * Remove redundant EditorConfig entries
1 parent 315ecf5 commit c6c019f

File tree

5 files changed

+16
-12
lines changed

5 files changed

+16
-12
lines changed

.editorconfig

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ indent_size = 4
2222
end_of_line = crlf
2323

2424
# Xml project files
25-
[*.{config,csproj,njsproj,props,targets,vcxitems,vcxproj,vcxproj.filters}]
25+
[*.{config,csproj,csproj.filters,nuspec,props,ruleset,targets,vcxitems,vcxitems.filters,vcxproj,vcxproj.filters}]
2626
indent_size = 2
2727
end_of_line = crlf
2828
insert_final_newline = false
@@ -32,11 +32,6 @@ insert_final_newline = false
3232
indent_size = 2
3333
end_of_line = crlf
3434

35-
# XML config files
36-
[*.{msbuild,props,targets,ruleset,config,nuspec}]
37-
indent_size = 2
38-
end_of_line = crlf
39-
4035
# Shell scripts
4136
[*.{cmd,bat,ps1}]
4237
end_of_line = crlf

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ ipch/
8181
*.tlog/
8282
Ankh.NoLoad
8383
UpgradeLog.htm
84+
Directory.Build.local.props
85+
Directory.Build.local.targets
8486

8587
#MonoDevelop
8688
*.pidb

.vscode/settings.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,5 +150,6 @@
150150
"**/*.{ts,tsx,js,jsx}"
151151
],
152152
"prettier.configPath": ".prettierrc",
153-
"prettier.ignorePath": ".prettierignore"
154-
}
153+
"prettier.ignorePath": ".prettierignore",
154+
"xml.format.maxLineWidth": 0
155+
}

Directory.Build.props

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,7 @@
3030
<MSBuildProjectExtensionsPath Condition="'$(ProjectName)' == ''">$(RootIntDir)\ProjectExtensions\$(MSBuildProjectName)\</MSBuildProjectExtensionsPath>
3131
</PropertyGroup>
3232

33+
<!-- User overrides -->
34+
<Import Project="$(MSBuildThisFileDirectory)Directory.Build.local.props" Condition="Exists('$(MSBuildThisFileDirectory)Directory.Build.local.props')" />
35+
3336
</Project>

Directory.Build.targets

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<!-- This target is used to compute the inputs and outputs for running the `yarn install`. -->
55
<Target
66
Name="ReactNativeYarnInstallInputAndOutputs"
7-
>
7+
>
88
<ItemGroup>
99
<_ReactNativeYarnInstallInputFiles Include="$(MSBuildThisFileDirectory)yarn.lock" />
1010
<_ReactNativeYarnInstallInputFiles Include="$(MSBuildThisFileDirectory)**\package.json" Exclude="$(MSBuildThisFileDirectory)node_modules\**" />
@@ -24,16 +24,16 @@
2424
Inputs="@(_ReactNativeYarnInstallInputFiles)"
2525
Outputs="@(_ReactNativeYarnInstallOutputFiles)"
2626
Condition="'$(DesignTimeBuild)'=='' AND '$(AGENT_NAME)' == ''"
27-
>
27+
>
2828

2929
<Message Text="Running yarn install to fetch latest packages." Importance="High" />
3030
<Message Text="yarn install --frozen-lockfile --mutex file:.yarn-mutex" Importance="High" />
3131
<Exec
3232
ContinueOnError="True"
3333
Command="yarn install --frozen-lockfile --mutex file:.yarn-mutex"
3434
WorkingDirectory="$(MSBuildThisFileDirectory)"
35-
>
36-
<Output TaskParameter="ExitCode" ItemName="_ReactNativeYarnExitCode"/>
35+
>
36+
<Output TaskParameter="ExitCode" ItemName="_ReactNativeYarnExitCode" />
3737
</Exec>
3838

3939
<Message Text="yarn install: Succeeded" Condition="'%(_ReactNativeYarnExitCode.Identity)' == '0'" Importance="High" />
@@ -196,4 +196,7 @@
196196

197197
</Target>
198198

199+
<!-- User overrides -->
200+
<Import Project="$(MSBuildThisFileDirectory)Directory.Build.local.targets" Condition="Exists('$(MSBuildThisFileDirectory)Directory.Build.local.targets')" />
201+
199202
</Project>

0 commit comments

Comments
 (0)