-
-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Labels
Description
Hello,
I try to make this part from my .csproj working:
<Target Name="CustomPostAfterBuild" AfterTargets="AfterBuild">
<Exec Command="echo Post-Build event: Active configuration is: $(ConfigurationName)" />
<PropertyGroup>
<EmptyCheck>Scripts\dist\*.js</EmptyCheck>
</PropertyGroup>
<Error Condition="'@(EmptyCheck)' == ''" Text="Empty folder $(EmptyCheck)" />
<ItemGroup>
<!-- what ever is in the build folder should be included in the project -->
<Content Include="Scripts\dist\*.js" />
<!--<Content Include="$(MSBuildThisFileDirectory)Scripts\dist\*.js" />-->
</ItemGroup>
</Target>
When I publish my project from visual studio it is ok.
But when I use Invoke-MsBuild from my powershell script it fails.
I got the same problem with my Gulp task but I fixed it by using absolute path.
It's not possible for ItemGroup/Content
Is it a way for command line Invoke-MsBuild to be based on current project publishing ?