You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every item will need a Link metadata or else the AssignTargetPath of msbuild will not be able to determine a target path to copy it to (= ""outside of the project cone"").
The 2.0 SDK introduced LinkBase to help set a sensible Link metadata for items created through globbing. It's just a shortcut for Link="wwwroot\%(RecursiveDir)%(Filename)%(Extension)".
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
ID: 59d4dafc-2217-9a7b-4590-27faa85164cd
Version Independent ID: 64b80e80-1c15-c293-466a-918de98e96f6
Extracted from #2642:
<None Update="**/my_pattern/**" CopyToOutputDirectory="PreserveNewest" CopyToPublishDirectory="PreserveNewest" />
- https://stackoverflow.com/questions/44374074/copy-files-to-output-directory-using-csproj-dotnetcore/44378406#44378406CopyToPublishDirectory
is an addition to the SDK-based projects.PreserveNewest
should be preferred overAlways
since latter to be able to build incrementally (-> build time).Content
instead ofNone
for certain paths and patterns.wwwroot\**
,.json
and.config
files.LinkBase
to include content from outside the project folder in a different subdirectory.<Content Include="../shared-configs/**" LinkBase="config/" CopyToOutputDirectory="PreserveNewest" CopyToPublishDirectory="PreserveNewest" />
See dotnet/msbuild#2795 and dotnet/sdk#1246 for info about Link and LinkBase.
Also:
Every item will need a
Link
metadata or else theAssignTargetPath
of msbuild will not be able to determine a target path to copy it to (= ""outside of the project cone"").The 2.0 SDK introduced
LinkBase
to help set a sensibleLink
metadata for items created through globbing. It's just a shortcut forLink="wwwroot\%(RecursiveDir)%(Filename)%(Extension)"
.Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: