You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Paket does not overwrite Framework References (ex.: System.IO.Compression) #2811
Expected: the FW reference is removed and a reference to the nuget is added
Actual: the FW reference is NOT removed, and a reference to the nuget is NOT added.
Workaround:
I can manually remove <Reference Include="System.IO.Compression" /> from the project file (or same via gui).
If I then rerun paket install, it adds the reference to the nuget.
yes we did that and had the -hard switch for exactly that. And while removing the switch I set all locations to true. So I assume it should actually replace the reference
Just hit this again, this time with an FSharp.Core.
The issue is two-fold:
the old references are not removed
the new references are not added!
And the worst part is that, at the moment, the failure is silent and only manifests at runtime with an assembly mismatch.
I propose, as a quick fix, to solve #2. On the next compile, the user will get a warning like this and can then remove the pre-existing reference themselves.
1>C:\Program Files (x86)\Microsoft Visual Studio\Preview\Professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2052,5): warning MSB3243: No way to resolve conflict between "System.IO.Compression, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System.IO.Compression, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". Choosing "System.IO.Compression, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" arbitrarily.
1> Consider app.config remapping of assembly "System.IO.Compression, Culture=neutral, PublicKeyToken=b77a5c561934e089" from Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.1\System.IO.Compression.dll] to Version "4.1.2.0" [C:\Users\lr\Source\Repos\Paket_SystemIOCompression\packages\System.IO.Compression\lib\net46\System.IO.Compression.dll] to solve conflict and get rid of warning.
1> Paket_SystemIOCompression -> C:\Users\lr\Source\Repos\Paket_SystemIOCompression\Paket_SystemIOCompression\bin\Debug\Paket_SystemIOCompression.exe
Activity
matthid commentedon Oct 2, 2017
I'm not even sure this is a bug, we do not touch user entries by design.
0x53A commentedon Oct 2, 2017
Nuget does remove the FW reference and adds the reference into the packages dir if you install the package.
And I'm pretty sure I have seen paket remove the default reference to FSharp.Core when you add the nuget package?
forki commentedon Oct 2, 2017
yes we did that and had the -hard switch for exactly that. And while removing the switch I set all locations to true. So I assume it should actually replace the reference
0x53A commentedon Mar 10, 2018
Just hit this again, this time with an FSharp.Core.
The issue is two-fold:
And the worst part is that, at the moment, the failure is silent and only manifests at runtime with an assembly mismatch.
I propose, as a quick fix, to solve #2. On the next compile, the user will get a warning like this and can then remove the pre-existing reference themselves.
What do you think?
don't not add duplicated references
0x53A commentedon Mar 10, 2018
--hardwas removed with 24e08ed (3.0.0-alpha098).I have tested that 2.58.3.0 has the same behavior, so it is not a regression.