AspNetCoreModule icon indicating copy to clipboard operation
AspNetCoreModule copied to clipboard

Fix the log path logic so the .\ isn't required

Open shirhatti opened this issue 8 years ago • 2 comments

From https://github.com/aspnet/AspNetCoreModule/issues/30

shirhatti avatar Nov 17 '16 19:11 shirhatti

They will try to help a little bit with https://github.com/Microsoft/msbuild/issues/1586, where they might make it so that <Content Include> can accept a folder and create the folder even if empty.

The workaround for now is to either do a <Content Include> with globbing for the logs folder and put a dummy file in the folder, or the dev can just do something along the lines of this ...

<Target Name="CreateLogsFolder" AfterTargets="AfterPublish">
  <MakeDir Directories="$(PublishDir)logs" Condition="!Exists('$(PublishDir)logs')" />
  <MakeDir Directories="$(PublishUrl)logs" Condition="!Exists('$(PublishUrl)logs')" />
</Target>

guardrex avatar Jan 19 '17 17:01 guardrex

@pan-wang We believe this is fixed. Could you confirm (and close as needed) please?

muratg avatar Dec 20 '17 22:12 muratg