Open
Description
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>