Skip to content

Commit

Permalink
Specify run argument with -- for dotnet watch run command
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Litovchenko committed May 7, 2024
1 parent d7cbb21 commit 0a06a2f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Use the official ASP.NET Core SDK image
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build

# Set the working directory in the container
WORKDIR /app
Expand All @@ -9,6 +9,8 @@ RUN dotnet restore dvcsa.csproj

COPY . .

RUN dotnet dev-certs https --trust

# Build the application
ENTRYPOINT ["dotnet"]
CMD ["watch", "run", "-v", "--project" , "dvcsa.csproj"]
CMD ["watch", "--project" , "dvcsa.csproj", "--verbose", "run", "--","--project" , "dvcsa.csproj"]
2 changes: 1 addition & 1 deletion docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
build: .
ports:
- "8999:9000"
command: ["dotnet", "watch","run", -v, "--project" , "dvcsa.csproj"]
command: ["dotnet", "watch", "--project" , "dvcsa.csproj", "--verbose", "run", "--", "--project" , "dvcsa.csproj"]
volumes:
- .:/app
- /app/obj/ # <- directory won't be mounted
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions dvcsa.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Data.Sqlite.Core" Version="8.0.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.4" />
<PackageReference Include="Microsoft.Data.Sqlite.Core" Version="7.0.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.4" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
</ItemGroup>

Expand Down

0 comments on commit 0a06a2f

Please sign in to comment.