Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Dll not in ncrunch folder
MartinEgli
#1 Posted : Sunday, September 3, 2023 6:55:50 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 9/3/2023(UTC)
Posts: 2
Location: Switzerland

I have a project that accesses dlls from a nuget package. The dll is referenced in the test code via a string. VSTest is running. NCrunch does not run. The dll is not copied to the NCrunch test directory. how can I force the dll to be copied. Normal bin folder contains this dll. You can find the code here. https://github.com/xmolecules/nmolecules
Remco
#2 Posted : Sunday, September 3, 2023 11:37:33 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi, thanks for posting.

Can you share any more specific details about how the DLL is being referenced? Is this using Assembly.LoadFrom? Sorry, I took a quick look through the projects in the link you provided but couldn't find the reference.

Have you tried turning on the 'Copy referenced assemblies to workspace' setting for the projects involved?
MartinEgli
#3 Posted : Sunday, September 3, 2023 4:56:15 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 9/3/2023(UTC)
Posts: 2
Location: Switzerland

Hi

You can run the unit tests. Have you received the failed tests.
The package nMolecules.DDD is referenced in the project.


Quote:


public static async Task VerifyAnalyzerAsync(string source, params DiagnosticResult[] expected)
{
var test = new CSharpTest
{
TestCode = source,
TestState =
{
AdditionalReferences = { "nMolecules.DDD.dll" }
}
};

test.ExpectedDiagnostics.AddRange(expected);
await test.RunAsync(CancellationToken.None);
}
Remco
#4 Posted : Sunday, September 3, 2023 11:14:31 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
When I run the tests locally, they all pass. I can't seem to find the VerifyAnalyzerAsync method in the code you've linked to above.

Can you confirm whether the setting I described above has any impact on the resolution issue?
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.031 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download