-
-
Save teyc/facaab93abb422dfd267 to your computer and use it in GitHub Desktop.
MSBuild convention checks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Target Name="AfterBuild"> | |
<Message Text="@(Content)" Importance="high" Condition="%(Content.Extension) == '.sql'" /> | |
<Error Condition="%(Content.Extension) == '.sql'" Text="Nothing should be marked as Content, check your scripts are marked as Embedded Resource" /> | |
</Target> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Target Name="AfterBuild"> | |
<!-- All files in Content directory should be marked Copy if Newer --> | |
<Error Condition="(%(None.CopyToOutputDirectory) != 'PreserveNewest' And %(Content.CopyToOutputDirectory) != 'PreserveNewest') And $([System.Text.RegularExpressions.Regex]::IsMatch('%(RelativeDir)', 'Content.+'))" Text="%(Identity) Items in Content directory must be marked Copy if Newer" /> | |
</Target> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment