I'm having problem with MSTest, Here the issue
- Open VS2019
- Make sure that package management is set to [PackageReference]
- Create a .Net Framework test project
- Add Nuget package Microsoft.Extentions.Configuration last version (3.1.3.0)
- Add the code below
- Run test
- ==> Test fail with error [Cannot load file or assembly Microsoft.Extensions.Configuration.Abstractions, Version=3.1.0.0 ...] error
PS : using package.config instead of PackageReference solve the issue. Downgrading to Microsoft.Extentions.Configuration to 3.1.0.0 fixes the issue too
What's the problem here ?
Thanks
using Microsoft.Extensions.Configuration;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
namespace TestProject1
{
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
var configuration = new ConfigurationBuilder().Build();
Assert.IsNotNull(configuration);
}
}
}