-
Notifications
You must be signed in to change notification settings - Fork 525
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
copy_local: false
has no effect (at least with .NET SDK)
#3154
Comments
What should it do?
Roman Kuzmin <[email protected]> schrieb am So., 15. Apr. 2018,
14:36:
… copy_local: false has no effect (at least with .NET SDK, I remember it
used to work some long time ago).
*Environments and steps*
- paket info ~ Paket version 5.156.1
- dotnet --version ~ 2.1.104
In a new empty directory, create a new F# project
dotnet new classlib -lang f#
Edit the project file and replace netstandard2.0 with net462
<TargetFramework>net462</TargetFramework>
Invoke
paket init
Edit paket.dependencies (note copy_local: false)
copy_local: false
framework: net462
source https://www.nuget.org/api/v2
nuget Suave
Edit paket.references
Suave
Invoke
paket install
Now build the project
dotnet build
*Expected behaviour*
bin\Debug\net462 contains DLL and PDB files of our library and nothing
else.
*Actual behaviour*
bin\Debug\net462, in spite of copy_local: false, contains a lot of files
copied from FSharp.Core and Suave.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3154>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADgNJLCOdgU663m-FITJplktOgZK1pCks5toz7fgaJpZM4TVdTr>
.
|
If there is such a way then it should result in assemblies not copied to the output directory during build. If there is no such a way known (is it what the question means?) it would be nice to mention this fact about |
I am not suggesting this but one possible way is to add assembly references in |
The question is: does PackageReferences have a corresponding attribute. If
not we need to feature request it.
Roman Kuzmin <[email protected]> schrieb am So., 15. Apr. 2018,
20:10:
… I am not suggesting this but one possible way is to add assembly
references in
the old fashioned way to projects if copy_local: false. Just in order to
be
able to set their Private to false. Yes, this will make projects less
"clean"
but avoiding redundant copies in several projects in a large solution may
be
important.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3154 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADgNDuTtP0SZa2iqq4offh-VpnVzXw4ks5to40rgaJpZM4TVdTr>
.
|
According to https://docs.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files <PackageReference Include="Suave" Version="2.2.1">
<ExcludeAssets>runtime</ExcludeAssets>
</PackageReference> |
TIL Yes, this does the trick. Thus, one "workaround" is using native .net sdk packaging instead of paket... |
can you please try? But you have to update the Paket.restore.targets file |
urgs that didn't work |
deploying another version. |
Paket 5.156.4 is doing exactly what I expect. The output contains just my library output. Thank you very much! |
I just switched a large solution from old SDK to new SDK and ran into this problem. I have Paket version I have tried looking at the I see that |
I'm building using VS2017 by the way |
copy_local: false
has no effect (at least with "new style" .NET SDK projects, I remember it used to work some long time ago with "old style" .NET Framework projects).Environments and steps
In a new empty directory, create a new F# project
Edit the project file and replace
netstandard2.0
withnet462
Invoke
Edit
paket.dependencies
(notecopy_local: false
)Edit
paket.references
Invoke
Now build the project
Expected behaviour
bin\Debug\net462
contains DLL and PDB files of our library and nothing else.Actual behaviour
bin\Debug\net462
, in spite ofcopy_local: false
, contains a lot of files copied fromFSharp.Core
andSuave
.The text was updated successfully, but these errors were encountered: