8000 Setting <IsPublishable>false</IsPublishable> should force PublishIISAssets to false. · Issue #42048 · dotnet/sdk · GitHub
[go: up one dir, main page]

Skip to content
Setting <IsPublishable>false</IsPublishable> should force PublishIISAssets to false. #42048
Open
@inikulshin

Description

@inikulshin

I have the following my.csproj:

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFrameworks>net6.0</TargetFrameworks>
    <IsPublishable>false</IsPublishable>
  </PropertyGroup>

  ...
</Project>

When I run msbuild -t:publish my.csproj I get this error:

C:\Program Files\dotnet\sdk\8.0.205\Sdks\Microsoft.NET.Sdk.Publish\targets\TransformTargets\Microsoft.NET.Sdk.Publish.TransformFiles.targets(50,5): error MSB4044: The "TransformWebConfig" task was not given a value for the required parameter "TargetPath". [my.csproj]

My workaround was to add

    <PublishIISAssets>false</PublishIISAssets>

to my.csproj, but I think it should be set to false implicitly in Microsoft.NET.Sdk.Publish.targets:

    <PublishIISAssets Condition="'$(IsPublishable)' == 'false'
             Or '$(PublishIISAssets)' == ''">false</PublishIISAssets>

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0