Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I found a solution that works for most project types. Many of the default Msbuild targets provided by Microsoft include an option to load BeforeTargets and Aftertargets by placing the targets in question in a specific folder in the Msbuild folder structure.</p> <p>I put a targets file into these folders (naming based on the way the project type expects them, these tend to differ from project type to project type) where I specify the default CodeAnalaysis.rules file. The project can still override these, but if it doesn't the default is used.</p> <p>Sharepoint for example looks for this file:</p> <p><code>$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\SharePointTools\Custom.After.Microsoft.VisualStudio.SharePoint.targets</code></p> <p>These references are stored in msbuild properties such as <code>$(CustomAfterSharePointTargets)</code> which you can extend or override if wanted.</p> <p>My solution is built <a href="http://my.safaribooksonline.com/9780735659827/solution_import_files?reader=html&amp;imagepage=" rel="nofollow noreferrer">upon this feature</a> and <a href="https://stackoverflow.com/questions/3924404/msbuild-custom-after-microsoft-common-targets-for-native-c-projects-in-vs2010">this feature</a>.</p> <p>I put in a request to standardize this more in Visual Studio 11. <a href="http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2793283-standardize-msbuild-wildcard-imports-for-before-af" rel="nofollow noreferrer">Please vote for it</a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload