Skip to content
Open
6 changes: 6 additions & 0 deletions csharp/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<Project>
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
</Project>
1 change: 1 addition & 0 deletions csharp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ WORKDIR /usr/src/app

# copy csproj and restore as distinct layers
COPY *.csproj .
COPY Directory.Build.props .
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure it will work, docker root directoy is csharp/carter not csharp

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why its set to csharp/carter? hmm, how do I achieve this now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did ../Directory.build.props but still does not work. any idea?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the easyiest way to do the trick @ShreyasJejurkar is, imho, to use symlinks (create main file is csharp, and create symlinks in all frameworks directory)

RUN dotnet restore

# copy everything else and build app
Expand Down
4 changes: 0 additions & 4 deletions csharp/aspnet-minimal-api/web.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
</Project>
4 changes: 0 additions & 4 deletions csharp/simplify.web/web.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Simplify.Web" Version="4.7.*" />
</ItemGroup>
Expand Down