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

Notification

Icon
Error

Build issues - cannot find version of tons of files
coachrob
#1 Posted : Wednesday, June 19, 2019 4:37:51 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 6/3/2019(UTC)
Posts: 5
Location: United States of America

Was thanked: 1 time(s) in 1 post(s)
I've upgraded my Visual Studio (15.3 or whatever is the latest), I've upgraded my NCrunch (popped for the $79). The NCrunch build won't work. Cannot find a specific version of System.Net.Http along with a bunch of others. I've followed all the steps from the page that's linked in the error. It sill will not build my projects and run my tests.

I can't imagine that I'm alone with this problem (but it's possible I suppose). I've search the forum and cannot find an answer. If this is a duplicate, feel free to close it, but PLEASE send me a link to the solution.

Once you're used to tests running all the time, not having that stinks.

Thank you in advance for any assistance you can provide.
Remco
#2 Posted : Wednesday, June 19, 2019 9:23:02 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,974

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
Hi, thanks for sharing this problem.

To better understand this I'll need to get a bit more information on what is happening inside your build system.

Are you able to produce this problem in a sample project that you can share with me? Are you able to make it happen outside the solution you're developing in?
coachrob
#3 Posted : Friday, June 21, 2019 12:05:05 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 6/3/2019(UTC)
Posts: 5
Location: United States of America

Was thanked: 1 time(s) in 1 post(s)
It would be very challenging for me to put together a project that had enough of my code to illustrate the problem. However, if the below error messages and investigation I've done doesn't get us to a solution, I can do that.

Below are the error messages I'm seeing when I try to re-build with NCrunch so my tests can run again.

I've navigated to the build location for NCrunch and confirmed that there are no files in "bin\debug". The NCrunch URL isn't very helpful in terms of actually troubleshooting the issue.

Thank you in advance for any assistance you can provide.


NCrunch: If you are experiencing problems in getting this project to build, have a look at http://www.ncrunch.net/d...ng_project-build-issues
..\packages\Microsoft.Net.Compilers.3.1.1\tools\Microsoft.CSharp.Core.targets (64, 10): The "AnalyzerConfigFiles" parameter is not supported by the "Csc" task. Verify the parameter exists on the task, and it is a settable public instance property.
..\packages\Microsoft.Net.Compilers.3.1.1\tools\Microsoft.CSharp.Core.targets (59, 5): The "Csc" task could not be initialized with its input parameters.


WARNING - ..\..\..\..\program files (x86)\microsoft visual studio\2017\professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets (2110, 5): MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.Win32.Primitives, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
WARNING - ..\..\..\..\program files (x86)\microsoft visual studio\2017\professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets (2110, 5): MSB3245: Could not resolve this reference. Could not locate the assembly "System.AppContext, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
WARNING - ..\..\..\..\program files (x86)\microsoft visual studio\2017\professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets (2110, 5): MSB3245: Could not resolve this reference. Could not locate the assembly "System.Console, Version=4.0.1.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
WARNING - ..\..\..\..\program files (x86)\microsoft visual studio\2017\professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets (2110, 5): MSB3245: Could not resolve this reference. Could not locate the assembly "System.Diagnostics.Tracing, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
WARNING - ..\..\..\..\program files (x86)\microsoft visual studio\2017\professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets (2110, 5): MSB3245: Could not resolve this reference. Could not locate the assembly "System.Globalization.Calendars, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
WARNING - ..\..\..\..\program files (x86)\microsoft visual studio\2017\professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets (2110, 5): MSB3245: Could not resolve this reference. Could not locate the assembly "System.IO, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
WARNING - ..\..\..\..\program files (x86)\microsoft visual studio\2017\professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets (2110, 5): MSB3245: Could not resolve this reference. Could not locate the assembly "System.IO.Compression.ZipFile, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
WARNING - ..\..\..\..\program files (x86)\microsoft visual studio\2017\professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets (2110, 5): MSB3245: Could not resolve this reference. Could not locate the assembly "System.IO.FileSystem, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
WARNING - ..\..\..\..\program files (x86)\microsoft visual studio\2017\professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets (2110, 5): MSB3245: Could not resolve this reference. Could not locate the assembly "System.IO.FileSystem.Primitives, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
WARNING - ..\..\..\..\program files (x86)\microsoft visual studio\2017\professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets (2110, 5): MSB3245: Could not resolve this reference. Could not locate the assembly "System.Linq, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
WARNING - ..\..\..\..\program files (x86)\microsoft visual studio\2017\professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets (2110, 5): MSB3245: Could not resolve this reference. Could not locate the assembly "System.Linq.Expressions, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
WARNING - ..\..\..\..\program files (x86)\microsoft visual studio\2017\professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets (2110, 5): MSB3245: Could not resolve this reference. Could not locate the assembly "System.Net.Http, Version=4.1.1.3, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
WARNING - ..\..\..\..\program files (x86)\microsoft visual studio\2017\professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets (2110, 5): MSB3245: Could not resolve this reference. Could not locate the assembly "System.Net.Sockets, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
WARNING - ..\..\..\..\program files (x86)\microsoft visual studio\2017\professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets (2110, 5): MSB3245: Could not resolve this reference. Could not locate the assembly "System.Reflection, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
WARNING - ..\..\..\..\program files (x86)\microsoft visual studio\2017\professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets (2110, 5): MSB3245: Could not resolve this reference. Could not locate the assembly "System.Runtime, Version=4.1.1.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
WARNING - ..\..\..\..\program files (x86)\microsoft visual studio\2017\professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets (2110, 5): MSB3245: Could not resolve this reference. Could not locate the assembly "System.Runtime.Extensions, Version=4.1.1.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
Remco
#4 Posted : Friday, June 21, 2019 1:01:46 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,974

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
Thanks for providing these extra error details.

Three years ago a dump of the error messages and a build trace log were often enough to resolve assembly reference issues such as this, but sadly MS have recently piled so much complexity into the build system that it's now almost impossible to analyse referencing issues without a way to accurately reproduce them. I'm sorry as I realise this does ask more of your time, but without a sample project we really don't have any realistic hope of being able to resolve this problem.

The good news is that to reproduce the problem, most likely the imperative source code in your project is completely irrelevant. You'll probably only need to build a sample project that targets the same version of .NET, referencing the same Nuget packages and assemblies in the same way, and using the same build properties declared in the .csproj file. It should be possible to just copy bits out of your failing project until you can trigger the issue.

You can submit small zipped source code samples to us through the NCrunch contact form.
coachrob
#5 Posted : Monday, June 24, 2019 12:18:27 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 6/3/2019(UTC)
Posts: 5
Location: United States of America

Was thanked: 1 time(s) in 1 post(s)
I've uploaded a small subset of my project that exhibits this same behavior.

Thank you in advance for any assistance you can provide.
Remco
#6 Posted : Tuesday, June 25, 2019 7:06:53 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,974

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
Thanks for sending through the sample solution. Using the code you've provided, I've managed to reproduce and isolate the issue.

The problem is being caused by the Microsoft.Net.Compilers package. This package redirects MSBuild to use a different version of the CSharp compiler. For some reason, when MSBuild is invoked via API (under NCrunch), it doesn't resolve the matching version of the CSC MSBuild tasks that are required by this package. I'm not yet sure if this is something that can be fixed. I'll investigate further and will let you know when I learn more.

Is this package required to compile your code? Removing it may resolve the problem.
coachrob
#7 Posted : Tuesday, June 25, 2019 1:09:31 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 6/3/2019(UTC)
Posts: 5
Location: United States of America

Was thanked: 1 time(s) in 1 post(s)
Hello,

I've uploaded an updated version of my project.

As per your recommendation, I've removed the reference to Microsoft.Net.Compilers and the project builds and runs just fine.

There are some remaining errors, hopefully you can help.

Thank you,

Rob
michaelkroes
#8 Posted : Friday, June 28, 2019 4:32:03 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 122 times
Was thanked: 62 time(s) in 59 post(s)
Hi Rob,

Sorry to keep you waiting, took a bit of time to investigate this. I've had a look at the sample project. When I unload the non test project and edit the project file I see the references there are specified like this:

<Reference Include="Microsoft.Win32.Primitives, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Win32.Primitives.4.3.0\lib\net46\Microsoft.Win32.Primitives.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>

The reference include is a different version than the hintpath specifies. Would you mind changing it to:

<Reference Include="Microsoft.Win32.Primitives">
<HintPath>..\packages\Microsoft.Win32.Primitives.4.3.0\lib\net46\Microsoft.Win32.Primitives.dll</HintPath>
<Private>True</Private>
</Reference>

This made the warning go away on my end when I did that for all the references. You can also remove the reference from the UI and add it again, this will correct the issue too.

Could you let us know if this fixes the issue?
coachrob
#9 Posted : Friday, June 28, 2019 1:37:29 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 6/3/2019(UTC)
Posts: 5
Location: United States of America

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

This alone didn't solve my problem. In fact, removing and re-adding the noted NuGet package didn't solve it. I had to do it manually in the project file.
I then had to do this same thing for about a dozen other references and that solved the problem.

When I went back to my full solution, I then had to do this for a few of my other non-test projects and that worked to get NCrunch running again for all of my tests.

In my opinion, you guys could add this process to your documentation for people to self-solve. I imagine lots of others are having this problem as well as they've upgraded .NET versions or whatever over time.

Thank you very much for helping me with this.

Rob

1 user thanked coachrob for this useful post.
michaelkroes on 6/28/2019(UTC)
michaelkroes
#10 Posted : Friday, June 28, 2019 5:33:44 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 122 times
Was thanked: 62 time(s) in 59 post(s)
Hi,

I'm glad everything works again.

I'm sorry I didn't make it more clear that every reference needed changing.

We are going to investigate if it's possible to make a change to the engine so we handle it the same way as Visual Studio handles it.

Michael
michaelkroes
#11 Posted : Tuesday, July 2, 2019 5:07:00 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 122 times
Was thanked: 62 time(s) in 59 post(s)
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.085 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download