-
Notifications
You must be signed in to change notification settings - Fork 519
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
Ref references need to not be copy local #1895
Comments
|
it's in latest alpha. please try it out |
|
For now this is the correct thing to do. In the future I think we need to analyse the It doesn't matter for now as nobody is using fsproj to compile for netcoreapp and it's not recommended either. Exception is the new FAKE which is compiling scripts for netcoreapp and therefore needs this information :( |
|
@matthid Actually, that's exactly what I was doing. I did a full day of experimenting to see if I could compile to .NETStandard using regular fsc, fake, msbuild and paket, just by slightly modifying the fsproj files. And it worked. I managed to produce dlls that were .NETStandard 1.3, meaning they should (in theory) run on .NET Core and .NET regular. The tests failed spectacularly though, cause paket was copying ref-assemblies and xunit was loading them (cause local dir has precedence over framework it would seem). Thus it blew up, and I made this issue. As per my understanding, anything in the |
|
Guys we already analyze runtime folder. And I think I set copylocal to false in recent commit |
|
@forki what we do right now is not enough as we need to parse runtime.json and handle the runtime tree. For example if runtime.json says that 'run-a' includes 'run-b' we need to copy files from the 'run-b' folder to the output, even when we compile for 'run-a'. the runtime.json specifies the dependency tree. for example 'win7-x64' includes 'win-x64' includes 'win' ... but we should threat the strings as black boxes, see https://docs.microsoft.com/en-us/dotnet/articles/core/rid-catalog @Alxandr It only matters if you want to produce and run a netcoreapp application which should run on itself... For a netstandard library and simple usage of it we don't need that... Note that my analysis might be wrong so please correct me in that case... |
|
Hi, This change seems to create another issue. Moreover we can't override it using https://github.com/fsprojects/Paket/blob/master/src/Paket.Core/ProjectFile.fs#L644 let privateSettings =
if relativePath.Contains @"\ref\" then "False"
elif copyLocal then "True" else "False" |
|
@evilz Yeah but copying the dll from the |
|
Maybe always using the |
|
@matthid It's look that the files are exactly the same PS P:\> cd O:\System.ComponentModel.TypeConverter.4.1.0\lib\net45
PS O:\System.ComponentModel.TypeConverter.4.1.0\lib\net45> Get-FileHash -Path .\System.ComponentModel.TypeConverter.dll
Algorithm Hash Path
--------- ---- ----
SHA256 0AD6A7017A54D99E102C17F40EA45D312AAEED96664EA5FF6DE1755BD4F6C6FD O:\System.ComponentModel.Type...
PS O:\System.ComponentModel.TypeConverter.4.1.0\ref\net45> Get-FileHash -Path .\System.ComponentModel.TypeConverter.dll
Algorithm Hash Path
--------- ---- ----
SHA256 0AD6A7017A54D99E102C17F40EA45D312AAEED96664EA5FF6DE1755BD4F6C6FD O:\System.ComponentModel.Type... |
|
@evilz Maybe for this package. But I don't think they need to be the same in all situations... |
|
Can we just force the copy_local to copy the lib from lib folder ? |
|
I think copying the binary from the |
|
@forki thank ! I will test this next monday. |
Description
Trying to build a netstandard application using msbuild, FAKE and paket (yes, it seems it's doable, and not even that hard), I've run into the problem that reference assemblies are being copied to the output directory, which blows up at runtime (when the reference assemblies are loaded, you get an error saying this is a reference assembly basically).
Oh, and if it's not clear, what I'm calling reference assemblies is anything found in a nuget package under the "ref" folder (as opposed to the "lib" folder).
Repro steps
Add System.Runtime as a dependency.
Expected behavior
The ref package should be added as Private: false (Copy local: false, my limited understanding of MSBuild has lead me to believe that these are the same).
Actual behavior
It's added such that it's copied to the output directory.
Known workarounds
Manually fix msbuild file every time you do
paket install.Related information
paket.bootstrapperandpaket.bootstrapper prereleaseThe text was updated successfully, but these errors were encountered: