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

Notification

Icon
Error

Razor page .Views.dll is not copied to integration test project
tiesmaster
#1 Posted : Monday, January 20, 2020 11:48:30 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/18/2019(UTC)
Posts: 7
Location: Netherlands

Thanks: 3 times
Was thanked: 1 time(s) in 1 post(s)
Hi,

I've stumbled upon another problem with ASP.NET Core integration test. This time copying the Razor Page .Views.dll assembly is going wrong.

Context
In this case, I'm using Razor Pages, and testing them with the ASP.NET Core integration tests. I've reproduced the issue on this repo: https://github.com/tiesm...r/ReproduceNCrunchBug2. When I run this using other tooling, then the tests in UnitTest1 succeeds, however, when I run it from NCrunch it fails with a 404. This is caused because the assembly ReproduceNCrunchBug2.Views.dll is not copied to the integration test output path (as opposed to the main web dll).

I've played a bit with the settings, like enabling copy referenced assemblies to the workspace, as well as changed the instrumentation mode from default to optimized (default still goes to legacy, if I'm not mistaken; great post BTW!!!).

Steps to reproduce:
See the repo: https://github.com/tiesm...er/ReproduceNCrunchBug2

Expected result:
The test returns 200.

Actual result:
The Razor page for the index is not found, so the framework returns a 404.

Version Details:

  • NCrunch: 4.2.0.7
  • VS: 2019 16.4.3
  • .NET Core 3.1.1


Your help is greatly appreciated :)
Remco
#2 Posted : Tuesday, January 21, 2020 11:05:26 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 5,943

Thanks: 777 times
Was thanked: 998 time(s) in 951 post(s)
Thanks for sharing this issue with the sample to reproduce it.

I can confirm that the problem is caused by NCrunch not copying the Views assembly between the workspaces. Doing this manually allows the tests to pass normally. The file isn't being copied by NCrunch as it's an unrecognised secondary output from the build system. We'll need to implement a targeted code change to handle it.

We'll let you know as soon as we have a fix available for this.
1 user thanked Remco for this useful post.
tiesmaster on 1/22/2020(UTC)
michaelkroes
#3 Posted : Friday, January 31, 2020 7:09:02 PM(UTC)
Rank: NCrunch Developer

Groups: Registered
Joined: 9/22/2017(UTC)
Posts: 208
Location: Netherlands

Thanks: 94 times
Was thanked: 43 time(s) in 41 post(s)
1 user thanked michaelkroes for this useful post.
tiesmaster on 2/1/2020(UTC)
tiesmaster
#4 Posted : Saturday, February 1, 2020 9:42:13 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/18/2019(UTC)
Posts: 7
Location: Netherlands

Thanks: 3 times
Was thanked: 1 time(s) in 1 post(s)
Awesome!! Totally fixes the problem. Very happy it's fixed this quickly! Thanks you
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.050 seconds.