Paket (in library and console) add reference for System.Windows.Forms / WindowsBase
See original GitHub issueDescription
paket 5.172.1
We’re having jobs every night that removes paket.lock
and run paket install
then fake build
Most of our libs are Owin
or technology/framework
agnostic
We also have few sample bootstrapping WebApi within Console app
Actual behavior
I’m starting to see diff like this :
<Choose>
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And $(TargetFrameworkVersion) == 'v4.6.2'">
<ItemGroup>
<Reference Include="System.Windows">
<Paket>True</Paket>
</Reference>
<Reference Include="System.Windows.Forms">
<Paket>True</Paket>
</Reference>
<Reference Include="WindowsBase">
<Paket>True</Paket>
</Reference>
<Reference Include="System.Reactive">
<HintPath>..\..\packages\System.Reactive\lib\net46\System.Reactive.dll</HintPath>
<Private>True</Private>
<Paket>True</Paket>
</Reference>
</ItemGroup>
</When>
</Choose>
Expected behavior
It should not start adding GAC reference in csproj, especially
WindowsBase
System.Windows.Forms
System.Windows
Known workarounds
Manually delete them, in EACH csproj one by one This one is trully fearsome
I would recommand Paket BLOCKING the paket install
with a Yes/No
question (with an opt out like --force)
This prompt explain the WHY it is adding a GAC reference … especially big one like this …
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Library requires reference to System.Windows.Forms
The problem being that any library or executable that references the utilities library must now have a reference to System.Windows.Forms as well ...
Read more >Cannot reference System.Windows.Forms. ...
First, please right-click Add-Reference and then choose the Assemblies tab. 267113-image.png. Second, please input System.Windows.Forms.
Read more >Make it easier to reference WinForms and other libraries in ...
Yes, I know that console apps and WinForms apps are two separate entities, but it is very convenient to be able to mix...
Read more >How to add reference to system.windows.media in .NET 6 ...
I was trying to include them in a .Net 6 class library to use them across multiple projects, But I couldn't add reference...
Read more >How to add a reference to the System.Windows.Forms lib from ...
In this video, I'll show you how to add a reference to the System. Windows. Forms library from a .NET Core WPF project....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is in the
.nuspec
file of System.Reactive 4.0.0:So Paket works as expected here. I just wonder why System.Reactive depends on some Windows-specific assemblies. Version 3.1.1 doesn’t depend on them, not even indirectly.
thx i missed tha, i was tired … my bad
i’ll check the lib and console using netcoreapp / netstandard because it leaks in projects.assets.json as this sln don’t use paket … closing this issue