Skip to content

dotnet publish does not copy refs folder #2243

@guylando

Description

@guylando

I run dotnet publish -f net461 -c Release -r win7-x64 -o bin\Release\PublishOutput
I have .NET Command Line Tools (2.1.300-rc1-008673)
The Release build has refs folder.
The PublishOutput doesnt get the refs folder copied in it.
Publishing without refs folder to the server resulting in runtime error of missing assemblies such as:
System.InvalidOperationException: Cannot find reference assembly 'Microsoft.Win32.Primitives.dll' file for package Microsoft.Win32.Primitives.Reference

Other projects in same solution publish with refs folder using same command.
Few days ago doing last publish DID publish with refs folder.

Any idea what is prevents refs folder from being copied to PublishOutput during publish?

Copying previously generated refs folder manually makes things work.
Whats going on?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions