From 7961c136ce60dfe53da45a147ee819f3942b611f Mon Sep 17 00:00:00 2001 From: hartmannr76 Date: Mon, 28 Aug 2017 04:56:19 -0400 Subject: [PATCH] Add and use Directory.Build.props throughout the project and include fix for watcher --- Directory.Build.props | 10 ++++++++++ Dockerfile | 1 + src/WatchRunDocker.csproj | 8 +++----- 3 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 Directory.Build.props diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 0000000..c0eee2a --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,10 @@ + + + $(MSBuildThisFileDirectory) + Debug + false + $(RepositoryRootDirectory)\build\$(MSBuildProjectName)\$(Configuration)\bin\ + $(RepositoryRootDirectory)\build\$(MSBuildProjectName)\$(Configuration)\obj\ + <_WatchTarget>$(MSBuildProjectDirectory)\obj\$(MSBuildProjectFile).dotnetwatch.g.targets + + \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index e6dc635..7ad1119 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,7 @@ ENV DOTNET_USE_POLLING_FILE_WATCHER 1 # WORKDIR /app RUN mkdir /app COPY ./src/*.csproj /app +COPY ./Directory.Build.props / WORKDIR /app RUN dotnet restore diff --git a/src/WatchRunDocker.csproj b/src/WatchRunDocker.csproj index 93d766d..33034b3 100644 --- a/src/WatchRunDocker.csproj +++ b/src/WatchRunDocker.csproj @@ -2,6 +2,7 @@ Exe netcoreapp2.0 + <_WatchTarget>$(MSBuildProjectDirectory)\obj\$(MSBuildProjectFile).dotnetwatch.g.targets @@ -10,9 +11,6 @@ - - ..\build\$(AssemblyName)\obj - $(BaseIntermediateOutputPath)$(Configuration)\ - $(BaseIntermediateOutputPath)$(PlatformName)\$(Configuration)\ - + + \ No newline at end of file