Skip to content

Update Configuration.md - #3251

Merged
sharwell merged 1 commit into
DotNetAnalyzers:masterfrom
mayermart:patch-1
Dec 30, 2020
Merged

sharwell merged 1 commit into
DotNetAnalyzers:masterfrom
mayermart:patch-1

Conversation

@mayermart

Copy link
Copy Markdown
Contributor

I think $(MSBuildThisFileDirectory) can be used to simplify the .props file

$(MSBuildThisFileDirectory) can be used to simplify the .props file
@codecov

codecov Bot commented Nov 27, 2020

Copy link
Copy Markdown

Codecov Report

Merging #3251 (94b6d26) into master (aa26bda) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #3251   +/-   ##
=======================================
  Coverage   94.39%   94.40%           
=======================================
  Files         967      967           
  Lines      108429   108429           
  Branches     3675     3675           
=======================================
+ Hits       102356   102358    +2     
+ Misses       5143     5142    -1     
+ Partials      930      929    -1     

@sharwell

sharwell commented Nov 27, 2020 •

Copy link
Copy Markdown
Member

💭 This seems fine, but I'm not one of the users of this configuration form. It would be good to get a review from one of the original contributors of this section.

/cc @ngeor

@ngeor

ngeor commented Nov 27, 2020

Copy link
Copy Markdown
Contributor

Hi, I haven't worked with .NET pretty much since I did this contribution more than 2 years ago :-(

The configuration sample was about having an external NuGet package ( MyCompany.MyRules.nuget ) that holds StyleCop configuration, so I can share it in multiple projects without copy pasting around the config file.

If this "MSBuildThisFileDirectory" variable somehow points to a NuGet package, go ahead with the changes. If your change is actually in a different direction (copy pasting the stylecop file rules in multiple projects), I think then you should add it to the docs as a new section.

@mayermart

mayermart commented Nov 27, 2020 •

Copy link
Copy Markdown
Contributor Author

The Documentation includes a hint which covers this scenario:

Tip: You can specify a relative path in a targets file that's relative to the targets file and not relative to the original project file.

The NuGet Package i created this way works at least with PackageReference in old-style and sdk-style Projects

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants