Skip to content

dotnet store fails with "the destination is a folder instead of a file" in 3.0 SDK #3168

@vitek-karas

Description

@vitek-karas

This is based on the repro from dotnet/cli#11223 which can be found here.

Running the dotnet store command described in the repro with .NET Core SDK 3.0.100-preview6-011540 produces error like this:

Microsoft (R) Build Engine version 16.1.65-preview+gc86abee47b for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  Restore completed in 929.46 ms for F:\AppModel\repro\dotnet-core-target-manifest-bug-master\TargetManifestBug.csproj.
C:\Program Files\dotnet\sdk\3.0.100-preview6-011540\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ComposeStore.targets(347,5): error MSB3024: Could not copy the file "F:\AppModel\repro\dotnet-core-target-manifest-bug-master\obj\Debug\netcoreapp2.2\win7-x64\TargetManifestBug.exe" to the destination file "C:\Users\vitkaras\.dotnet\store\x64\netcoreapp2.2\", because the destination is a folder instead of a file. To copy the source file into a folder, consider using the DestinationFolder parameter instead of DestinationFiles. [F:\AppModel\repro\dotnet-core-target-manifest-bug-master\TargetManifestBug.csproj]
  Files were composed in C:\Users\vitkaras\.dotnet\store\x64\netcoreapp2.2\
  The list of packages stored is in C:\Users\vitkaras\.dotnet\store\x64\netcoreapp2.2\artifact.xml

Running the same on .NET Core SDK 2.2.100 (using global.json) works just fine.
Seems like a regression in 3.0.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions