Quantcast
Channel: WE MOVED to github.com/nuget. This site is not monitored!
Viewing all articles
Browse latest Browse all 7612

Edited Issue: Remove EnumerableExtensions.Any() [2237]

$
0
0
New extension method EnumerableExtensions.Any() has the same signature as standard extension method System.Linq.Enumerable.Any(). It leads to the build error like this:

The call is ambiguous between the following methods or properties: 'NuGet.EnumerableExtensions.Any<string>(System.Collections.Generic.IEnumerable<string>)' and 'System.Linq.Enumerable.Any<string>(System.Collections.Generic.IEnumerable<string>)'

Steps to reproduce:

1. Add reference to NuGet.Core in your project

2. Try to compile this:




using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Linq;
using NuGet;

namespace TestProject1
{
[TestClass()]
public class Class1Test
{
[TestMethod()]
public void TestTest()
{
var items = new[] { "foo", "bar" };

var result = items.Any();

Assert.IsTrue(result);
}
}
}

Viewing all articles
Browse latest Browse all 7612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>