Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copying content files does not work #4531

Closed
andyleejordan opened this issue Dec 8, 2015 · 3 comments
Closed

Copying content files does not work #4531

andyleejordan opened this issue Dec 8, 2015 · 3 comments

Comments

@andyleejordan
Copy link
Member

While it appears implemented in dotnet/cli#61, I can't get my content files to be copied correctly on Linux.

I have (literally, as a test) in my project.json

    "content": [ "foo" ],

And then publish with dotnet publish --framework dnxcore50 --runtime ubuntu.14.04-x64 --output ../../bin, but no foo is in ../../bin.

While the publish succeeds and I get the DLLs, the content files are not copied over (likewise for content sections in projects that this project depends on).

Any ideas? As a workaround right now I added cp steps to the end of my publish script, but content ought to work.

@andyleejordan
Copy link
Member Author

Here's a simple repro:

project.json

{
    "version": "1.0.0-*",
    "content": [ "foo" ],
    "frameworks": {
        "dnxcore50": { }
    }
}

foo

bar

steps

$ uname -a
Linux machine 3.19.0-37-generic dotnet/cli#42~14.04.1-Ubuntu SMP Mon Nov 23 15:13:51 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

$ apt-cache show dotnet
Version: 1.0.16776.1449511470-1

$ dotnet restore
Microsoft .NET Development Utility CoreClr-x64-1.0.0-rc1-16048

  CACHE https://www.myget.org/F/dotnet-core/
  CACHE https://www.nuget.org/api/v2/
Restoring packages for /home/andrew/test/project.json
Writing lock file /home/andrew/test/project.lock.json
Restore complete, 337ms elapsed

NuGet Config files used:
    /home/andrew/.config/NuGet/NuGet.config
    /home/andrew/nuget.config

Feeds used:
    https://www.myget.org/F/dotnet-core/
    https://www.nuget.org/api/v2/

$ dotnet publish --framework dnxcore50 --runtime ubuntu.14.04-x64 --output test-out
Publishing test for DNXCore,Version=v5.0/ubuntu.14.04-x64
Compiling test for DNXCore,Version=v5.0
/home/andrew/test/warning CS2008: No source files specified.
/home/andrew/test/warning CS8021: No value for RuntimeMetadataVersion found. No assembly containing System.Object was found nor was a value for RuntimeMetadataVersion specified t
hrough options.                                                                                                                                                                              

Compilation succeeded.
    2 Warning(s)
    0 Error(s)

Time elapsed 00:00:00.8596204

Published to test-out

$ ls test-out/
test.dll  test.pdb

But foo is missing.

@davidfowl
Copy link
Member

This whole automagic copy feature will go away and instead will be implemented as https://github.com/dotnet/cli/issues/66

@andyleejordan
Copy link
Member Author

Directories of scripts that need to be copied to the output directory with the same folder structure.

Precisely what I need. Thanks for the info @davidfowl! I'll keep working around with my own scripts for now.

@msftgits msftgits transferred this issue from dotnet/cli Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants