Closed bkoelman closed 5 years ago
According to docs it should be warning, not error. Have you set 'Treat warnings as errors' setting?
Yes I have. Is this something that can be fixed?
Op wo 3 apr. 2019 13:08 schreef Slava Trenogin notifications@github.com:
According to docs https://docs.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu1602 it should be warning, not error. Have you set 'Treat warnings as errors' setting?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/JetBrains/ExternalAnnotations/issues/165#issuecomment-479443859, or mute the thread https://github.com/notifications/unsubscribe-auth/AJ2JlOvkTcIV-EB9tbyt_gi7xdAIIx3vks5vdIuugaJpZM4cY70c .
Try workaround with NoWarn option for NU1602 warning.
I can work around this by adding the next line to project file:
<NoWarn>$(NoWarn);NU1602</NoWarn>
However, I prefer not to burden my users with that. The docs state this is usually a package authoring error. Can you please explain why it is needed in the first place?
Turns out I was too optimistic. After applying this change, I get lots of warnings (WarnAsError disabled) about identity mismatches for the System.Runtime assembly.
7>TestableFileSystem.Fakes.Tests -> E:\Bart\Source\Repos\TestableFileSystem\src\Fakes.Tests\bin\Debug\netcoreapp2.0\TestableFileSystem.Fakes.Tests.dll
7>CSC : warning CS1701: Assuming assembly reference 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' used by 'JetBrains.Annotations' matches identity 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' of 'System.Runtime', you may need to supply runtime policy
7>ActionFactory.cs(8,10,8,17): warning CS1701: Assuming assembly reference 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' used by 'JetBrains.Annotations' matches identity 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' of 'System.Runtime', you may need to supply runtime policy
7>ActionFactory.cs(9,52,9,65): warning CS1701: Assuming assembly reference 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' used by 'JetBrains.Annotations' matches identity 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' of 'System.Runtime', you may need to supply runtime policy
7>ActionFactory.cs(9,68,9,77): warning CS1701: Assuming assembly reference 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' used by 'JetBrains.Annotations' matches identity 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' of 'System.Runtime', you may need to supply runtime policy
...
7>Specs\FakeDirectory\DirectoryRootSpecs.cs(290,13,290,24): warning CS1701: Assuming assembly reference 'System.Runtime, Version=4.0.20.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' used by 'System.Reflection' matches identity 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' of 'System.Runtime', you may need to supply runtime policy
7>Specs\FakeDirectory\DirectoryRootSpecs.cs(290,13,290,24): warning CS1701: Assuming assembly reference 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' used by 'System.Xml.XDocument' matches identity 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' of 'System.Runtime', you may need to supply runtime policy
7>Specs\FakeDirectory\DirectoryRootSpecs.cs(290,13,290,24): warning CS1701: Assuming assembly reference 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' used by 'System.Threading.Tasks' matches identity 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' of 'System.Runtime', you may need to supply runtime policy
To repro, follow these steps:
TreatWarningsAsErrors
to False
and add the next line:
<NoWarn>$(NoWarn);NU1602</NoWarn>
Thanks for addressing this. v10.2.62 is not yet on NuGet. Can you please publish it there too?
Done.
Tried to update NuGet package from 10.2.29 to 10.2.60, which gives the next error: