Skip to content

Can't reference package nightly build in project with EnableSdkContainerSupport #299

@flcdrg

Description

@flcdrg

In a project with EnableSdkContainerSupport property set (eg. when created with the Visual Studio Publish wizard), you can't then add a package reference to the nightly build. It fails with the following error:

info : Restoring packages for C:\dev\sandbox\WebApplication10\WebApplication10\WebApplication10.csproj...
info : Package 'Microsoft.NET.Build.Containers' is compatible with all the specified frameworks in project 'C:\dev\sandbox\WebApplication10\WebApplication10\WebApplication10.csproj'.
error: Error while performing Update for package 'Microsoft.NET.Build.Containers'. Cannot edit items in imported files -
error:   Item 'PackageReference' for 'Microsoft.NET.Build.Containers' in Imported file 'C:\Program Files\dotnet\sdk\7.0.200-preview.22628.1\Sdks\Microsoft.NET.Sdk.Web\Sdk\Sdk.props'.

Not sure if this is something that can be fixed, or just will need to be documented to either comment out the property or set it to false.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions