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

Regression - paket install removing CopyToOutputDirectory property #1522

Closed
ghost opened this issue Mar 16, 2016 · 13 comments
Closed

Regression - paket install removing CopyToOutputDirectory property #1522

ghost opened this issue Mar 16, 2016 · 13 comments

Comments

@ghost
Copy link

ghost commented Mar 16, 2016

Hi,
I was using version 2.51.4.0 before updating to 2.52.9.0. From now on, when I do paket install, my csproj included items go from:

<ItemGroup>  
<Content Include="filepath">  
  <Paket>True</Paket>  
  <CopyToOutputDirectory>Always</CopyToOutputDirectory>  
</Content>  
...
</ItemGroup>

To:

<ItemGroup>  
<Content Include="filepath">
  <Paket>True</Paket>
</Content>  
...
</ItemGroup>

Effectively removing my "CopyToOutputDirectory" directive... and breaking my build.

@forki
Copy link
Member

forki commented Mar 17, 2016

did you add that manually?

what package are you using? Can I reproduce this?

@ghost
Copy link
Author

ghost commented Mar 17, 2016

In this situation, I installed a home-made nuget component where a couple of DLLs are defined as "content", not as "lib". Doing so, when paket installs it, it adds these xml tags to the csproj. Everything's fine so far.

But from that point, I indeed manually set the "Copy to Output Directory" property for these DLLs with the help of Visual Studio.

@forki
Copy link
Member

forki commented Mar 17, 2016

mhm. then this is not really a regression. you were relying on a bug ;-)

Anyways let's make that work. We need something like http://fsprojects.github.io/Paket/references-files.html#copy_local-settings for content files right?

@ghost
Copy link
Author

ghost commented Mar 17, 2016

I think so because I don't only copy DLLs but other kind of files that are definitely not .Net assemblies, but they are mandatory resources at runtime for my app. - i.e. I could not simply tag as "lib" in my nuget package.

BTW, thanks for your great responsiveness and support @forki.

@forki forki closed this as completed in b18b8b2 Mar 21, 2016
@forki
Copy link
Member

forki commented Mar 21, 2016

so this is implemented. see http://fsprojects.github.io/Paket/nuget-dependencies.html#CopyToOutputDirectory-settings

please let me know if this works for you

@ghost
Copy link
Author

ghost commented Mar 21, 2016

Just got 2.54.0, when I set something like,
nuget jQuery CopyToOutputDirectory: always

I get something like,

Paket version 2.54.0.0
Paket failed with:
        Error in paket.dependencies line 23
  Unknown package settings copytooutputdirectory: always

To work, I must use the property named 'copy_content_to_output_dir' instead of 'CopyToOutputDirectory'.

But doing so everything works as expected.
image

@forki
Copy link
Member

forki commented Mar 21, 2016

lol. I would appreciate a PR to the docs. ;-)

@tsibelman
Copy link
Contributor

@forki Is copy_content_to_output_dir works if specified in line of specific dependency ?

@forki
Copy link
Member

forki commented Apr 3, 2016

it should.

@ghost
Copy link
Author

ghost commented Apr 4, 2016

It works.

nuget COMPONENT ~> VERSION copy_content_to_output_dir: always

@tsibelman
Copy link
Contributor

Thank you, documentation is scarce on this

@tsibelman
Copy link
Contributor

Another question, maybe this feature should not copy items that are of type Compile ?

@forki
Copy link
Member

forki commented Apr 4, 2016

please help to improve it.

2016-04-04 15:55 GMT+02:00 tsibelman [email protected]:

Thank you, documentation is scarce on this


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#1522 (comment)

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