You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Central Package Management, the dockerfile generated is missing the required COPY statements for Directory.Build.props (contains the use CPM directive) and Directory.Packages.props. I'm generating the dockerfile with the standard "add new item... / docker support..." menu. I leave the defaults as is: linux, net8, dockerfile etc.
I tried declaring use CPM directly in the csproj but it also fails to add the requisite COPY statements in the dockerfile.
I'm using:
dotnet 8.0
Visual Studio (17.10)
Microsoft.VisualStudio.Azure.Containers.Tools.Targets(1.21.0)
nuget (6.10) -- not sure if this has anything to do with anything
@oising I was just checking, and it looks like we have do have a bug where if the Directory.Build.props file is in the same directory as the build context and project, we won't add the COPY statement. I'll get a fix out for that in 17.12.
Is that the same layout you have in your project that doesn't work or could you tell me the layout of your project with the locations of the solution, project, docker build context, and Directory.Build.props file please and I'll try to repo it.
@oising thank you for getting me that project layout. I fixed a bug we had for looking at files to copy more than 1 directory higher than the project (since yours were in the "groupingfolder") and it should be released in 17.12. Sorry I missed this case initially.
When using Central Package Management, the dockerfile generated is missing the required COPY statements for Directory.Build.props (contains the use CPM directive) and Directory.Packages.props. I'm generating the dockerfile with the standard "add new item... / docker support..." menu. I leave the defaults as is: linux, net8, dockerfile etc.
I tried declaring use CPM directly in the csproj but it also fails to add the requisite COPY statements in the dockerfile.
I'm using:
dotnet 8.0
Visual Studio (17.10)
Microsoft.VisualStudio.Azure.Containers.Tools.Targets(1.21.0)
nuget (6.10) -- not sure if this has anything to do with anything
Directory.Build.props:
Adding the following lines to our dockerfile(s) "fixes" the issue:
The text was updated successfully, but these errors were encountered: