- Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
I have a targets file that i was using on a net452 class library. After converting the classlib to netstandard20, the Target in my targets file wasn't being applied.
This is my targets file:
<Project> <ItemGroup> <AvailableItemName Include="CustomContent" /> </ItemGroup> <ItemGroup> <None Remove="src\*.json" /> </ItemGroup> <ItemGroup> <CustomContent Include="src\*.json" > <CopyToOutputDirectory>Always</CopyToOutputDirectory> </CustomContent> </ItemGroup> <PropertyGroup> <AssignTargetPathsDependsOn> $(AssignTargetPathsDependsOn); IncludeCustomContent; </AssignTargetPathsDependsOn> </PropertyGroup> <Target Name="IncludeCustomContent"> <CreateItem Include="@(CustomContent)" AdditionalMetadata="TargetPath=$(AssemblyName)\%(relativedir)%(Filename)%(Extension)"> <Output ItemName="ContentWithTargetPath" TaskParameter="Include" /> </CreateItem> </Target> </Project>This targets file is imported into my netstandard20 classlib.
I ran dotnet build -v d > d_log.txt and it's output suggested:
Property reassignment: $(AssignTargetPathsDependsOn)="" (previous value: "IncludeCustomContent").
Seems like it's being overridden by the default value in Microsoft.Common.CurrentVersion.targets
- Has something changed in this sdk?
- I noticed that the
AvailableItemNamevalue doesn't show up on the "Build Action" dropdownlist in the file property dialog (for a netstandard project) in VS (15.3.2). IsAvailableItemNamestill supported? - The .json files disappear from the project's solution explorer when using
<CustomContent Include="src\*.json" >. When i use<Content Include="src\*.json" >they show up again. Is this intentional?
Note, i also tried this with Content instead of CustomContent and, although it showed up in the solution explorer, it still didn't work (my IncludeCustomContent Target was not ran)
Metadata
Metadata
Assignees
Labels
No labels