Skip to content

Commit

Permalink
Merge pull request #1 from hartmannr76/fixNetCore2
Browse files Browse the repository at this point in the history
Merge for fix dotnet core 2 watch run
  • Loading branch information
alexsandro-xpt authored Aug 28, 2017
2 parents 7812082 + 7961c13 commit 4f02a8d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
10 changes: 10 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" TreatAsLocalProperty="OutDir;Configuration">
<PropertyGroup>
<RepositoryRootDirectory>$(MSBuildThisFileDirectory)</RepositoryRootDirectory>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<OutputPath>$(RepositoryRootDirectory)\build\$(MSBuildProjectName)\$(Configuration)\bin\</OutputPath>
<BaseIntermediateOutputPath>$(RepositoryRootDirectory)\build\$(MSBuildProjectName)\$(Configuration)\obj\</BaseIntermediateOutputPath>
<_WatchTarget>$(MSBuildProjectDirectory)\obj\$(MSBuildProjectFile).dotnetwatch.g.targets</_WatchTarget>
</PropertyGroup>
</Project>
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 3 additions & 5 deletions src/WatchRunDocker.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<_WatchTarget>$(MSBuildProjectDirectory)\obj\$(MSBuildProjectFile).dotnetwatch.g.targets</_WatchTarget>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="2.0.0" />
Expand All @@ -10,9 +11,6 @@
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.DotNet.Watcher.Tools" Version="2.0.0" />
</ItemGroup>
<PropertyGroup>
<BaseIntermediateOutputPath>..\build\$(AssemblyName)\obj</BaseIntermediateOutputPath>
<IntermediateOutputPath Condition=" '$(PlatformName)' == 'AnyCPU' ">$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath>
<IntermediateOutputPath Condition=" '$(PlatformName)' != 'AnyCPU' ">$(BaseIntermediateOutputPath)$(PlatformName)\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<!-- This is a temporary workaround suggested to handle a known issue with watcher -->
<Import Project="$(_WatchTarget)" Condition="Exists('$(_WatchTarget)')" />
</Project>

0 comments on commit 4f02a8d

Please sign in to comment.