Comments (4)
Could you show the dependencies you have in the tested project please?
Are there any other dependencies in your test project or just the test framework?
from vstest.
We've updated the .Unsafe library, which was "accidentally" making your project work. At least that is how I understand the problem. Please try adding Microsoft.NET.Test.SDK package reference to your project, or try adding <GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
into your project properties. This should generate the correct redirects, so the library that is trying to load the 4.x.x uses 6.x.x instead of loading the 4.x.x from test platform, and then later silently skipping loading 6.x.x.
from vstest.
https://developercommunity.visualstudio.com/t/Tests-fail-on-VS-1770-but-not-in-176/10441058
from vstest.
Thanks!
Adding <GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
into the test project worked.
A bit surprising as I'd always considered test projects to be libraries only - and binding redirects I thought only operated on exes/hosts. I guess there's some magic- AppDomain/AssemblyLoadContext? - but then wouldn't it be seperated from the test platform too?
Adding a package reference to Microsoft.NET.Test.SDK to the test project didn't help btw.
so the library that is trying to load the 4.x.x uses 6.x.x instead of loading the 4.x.x from test platform,
Ahh that makes sense. The tested project brings in v6, and has the moral equivalent of GenerateBindingRedirectsOutputType
jury rigged binding redirect mechanism using AppDomain.CurrentDomain.AssemblyResolve
because it's an Azure Functions v1 project that doesn't support that normally.
then later silently skipping loading 6.x.x.
How is that possible?
Are there any other dependencies in your test project or just the test framework?
That's the complete project file for the test project.
Another day, another fight with dependencies and assembly binding - I'm unblocked. Thanks again.
from vstest.
Related Issues (20)
- [Support] Grouping Tests by Class Name HOT 10
- Update maxversiontested to Xaml Islands can be used in a VSTest project
- Time is reported incorrectly for xunit when different verbosity is used HOT 2
- Microsoft.NET.Test.Sdk as transitive dependency? HOT 1
- Test Hang in ADO HOT 5
- Cobertura Code Coverage Breaks In Migrating from v17.8 to v17.9 HOT 2
- Make running netfx assemblies via Mono opt-in on non-Windows platforms HOT 1
- When running Tests if I use Test Category it is ignored when running Batch Mode
- testhost.dll is double written HOT 1
- Listing tests broken with terminal logger HOT 1
- Hardcoded TFM is wrong when building from source HOT 2
- Move to 1es templates for official builds
- Eliminate unapproved prebuild exclusions HOT 4
- Generate nuget packages fails on non-Windows
- Avoid writing passed tests in CI when terminal logger is enabled, and don't pass outputs
- Output logs even in the case of success HOT 1
- TestLogger/DataCollector can't be used to log Test Case Start HOT 4
- VSTest target should be bound by a condition HOT 3
- CA2022 errors in src/Microsoft.TestPlatform.CoreUtilities/Helpers/DotnetHostHelper.cs
- Unable to debug individual google tests in visual studio 2022 cmake project
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vstest.