0

I have following *.wpp.target file:

 <PropertyGroup>
     <CopyAllFilesToSingleFolderForMsdeployDependsOn>
        ExcludeCustomFilesOrFolders;
        $(CopyAllFilesToSingleFolderForPackageDependsOn);
     </CopyAllFilesToSingleFolderForMsdeployDependsOn>
</PropertyGroup>
<Target Name="ExcludeCustomFilesOrFolders" BeforeTargets="ExcludeFilesFromPackage"> 
     <ItemGroup>
         <ExcludeFromPackageFolders Include="$(MSBuildProjectDirectory)\Media" />
     </ItemGroup>
     <Message Text="Custom Exclude From %0D  Folders: @(ExcludeFromPackageFolders)%0D  Files: @(ExcludeFromPackageFiles)" Importance="high"/>
</Target>

If I run it for the first time out of visual studio 17 Media folder is ignored and not published. After when I comment the line with ExcludeFromPackageFolders node and publish again Media folder is still ignored. It seems that visual studio or msbuild does not refresh changes made inside *.wpp.target file. Do I miss here something or is VS or MSbuild just buggy?

croban
  • 387
  • 2
  • 7
  • I'm with the same problem here. Did you have any progress? – Alexandre Perez Jul 21 '17 at 17:49
  • Well, it seems that every change made is required restart the IDE. I tried and it worked. See: https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/2682126-give-me-a-way-to-flush-the-msbuild-targets-cache – Alexandre Perez Jul 21 '17 at 19:32
  • Unfortunately not, my solution was to kill the msbuild process from task manager what is similar to restarting ide, but that I am not counting as solution ;( – croban Jul 22 '17 at 19:57

2 Answers2

0

Can you try to add /PROFILE to the linker option? Might fix the problem: https://developercommunity.visualstudio.com/content/problem/136703/wpp-trace-missing-from-pdb-files-in-vs-2017.html

AndreiM
  • 815
  • 9
  • 17
0

You have to restart visual studio and reload solution everytime you change it. VS caches it.

Viking
  • 465
  • 3
  • 15