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

Notification

Icon
Error

Ncrunch nuget PackageReference
danius
#1 Posted : Sunday, January 14, 2018 10:00:52 PM(UTC)
Rank: Member

Groups: Registered
Joined: 7/17/2013(UTC)
Posts: 20
Location: Ireland

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

I have converted all my projects to use PackageReference
and now NCrunch is failing to build. VS builds and restores packages just fine.


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
NCrunch: This project was built on server '(local)'
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\NuGet\15.0\Microsoft.NuGet.targets: The package AutoMapper with version 6.2.2 could not be found in C:\Users\DanielSimonavi??ius\.nuget\packages\. Run a NuGet package restore to download the package.


but the packages do exist?!
C:\Users\DanielSimonavičius\.nuget\packages\automapper>dir /s *.*


Directory of C:\Users\DanielSimonavičius\.nuget\packages\automapper

14/01/2018 21:55 <DIR> .
14/01/2018 21:55 <DIR> ..
14/01/2018 21:55 <DIR> 6.2.2
0 File(s) 0 bytes

Directory of C:\Users\DanielSimonavičius\.nuget\packages\automapper\6.2.2

14/01/2018 21:55 <DIR> .
14/01/2018 21:55 <DIR> ..
14/01/2018 21:55 565,274 automapper.6.2.2.nupkg
14/01/2018 21:55 88 automapper.6.2.2.nupkg.sha512
06/12/2017 15:08 3,854 automapper.nuspec
14/01/2018 21:55 <DIR> lib
3 File(s) 569,216 bytes

Directory of C:\Users\DanielSimonavičius\.nuget\packages\automapper\6.2.2\lib

14/01/2018 21:55 <DIR> .
14/01/2018 21:55 <DIR> ..
14/01/2018 21:55 <DIR> net40
14/01/2018 21:55 <DIR> net45
14/01/2018 21:55 <DIR> netstandard1.1
14/01/2018 21:55 <DIR> netstandard1.3
0 File(s) 0 bytes


.csproj details:

<ItemGroup>
<PackageReference Include="AutoMapper" Version="6.2.2" />
<PackageReference Include="CommonServiceLocator" Version="2.0.2" />
<PackageReference Include="EFInteractiveViews" Version="1.0.1" />
<PackageReference Include="EntityFramework" Version="6.2.0" />
<PackageReference Include="Logify.Alert.Core" Version="1.0.39" />
<PackageReference Include="Logify.Alert.Wpf" Version="1.0.39" />
<PackageReference Include="Unity" Version="5.5.5" />
</ItemGroup>

One thing - the project files are on P: drive, if I try to add "additional files to include", it would not let me: "... Expressions must be relative path of existing file or directory"...

Thanks Daniel
Remco
#2 Posted : Sunday, January 14, 2018 10:09:53 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
Hi Daniel,

Thanks for sharing this problem.

It doesn't make sense to me that MSBuild would be giving you this error under NCrunch.

I think we should try comparing the NCrunch workspace to your foreground solution, and trying to find the point of difference that is causing this.

Try the following:
1. Right click on the failing build in your NCrunch Tests Window.
2. Go to advanced->Browse to workspace
3. Find the generated .csproj file inside the workspace
4. Open a command prompt, try running MSBuild.exe against the .csproj file to see what you get. You can find MSBuild.exe under your VS installation (i.e. C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin)

When dealing with a package reference, the reference from the generated csproj should behave the same way as it does inside your foreground solution. You can freely change the files in the workspace to see if you can find the point of difference causing the failure. The files underneath the 'obj' directory are also very important when experimenting with this - it's possible that there is something wrong with the project.assets.json file.
danius
#3 Posted : Sunday, January 14, 2018 10:21:40 PM(UTC)
Rank: Member

Groups: Registered
Joined: 7/17/2013(UTC)
Posts: 20
Location: Ireland

Thanks: 3 times
Was thanked: 3 time(s) in 3 post(s)
Manual msbuild worked just fine, see below.

could it be that my when ncrunch is unable to parse unicode character in path (note the -> ??)

ncrunch path
The package AutoMapper with version 6.2.2 could not be found in C:\Users\DanielSimonavi??ius\.nuget\packages\. Run a NuGet package restore to download the package.

vs real:
C:\Users\DanielSimonavičius\.nuget\packages\automapper


manual msbuild output (important bits) below:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin>msbuild "C:\Users\DanielSimonavičius\AppData\Local\NCrunch\980\2\WeighLogic.Common\WeighLogic.Common.csproj"
Microsoft (R) Build Engine version 15.5.180.51428 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 14/01/2018 22:15:37.

_CopyAppConfigFile:
Copying file from "App.config" to "bin\Debug\WeighLogic.Common.dll.config".
CopyFilesToOutputDirectory:
Copying file from "obj\Debug\WeighLogic.Common.dll" to "bin\Debug\WeighLogic.Common.dll".
WeighLogic.Common -> C:\Users\DanielSimonavicius\AppData\Local\NCrunch\980\2\WeighLogic.Common\bin\Debug\WeighLogic.C
ommon.dll
Copying file from "obj\Debug\WeighLogic.Common.pdb" to "bin\Debug\WeighLogic.Common.pdb".
NCrunchOutputDataQuery:
#Expression_9b92631122844ad485bc42ed925554b5=bin\Debug\WeighLogic.Common.dll
#Expression_37b1350e0d1c4e1b9fbf28f73c9bf62b=Debug
#Expression_dc684489f49a4508b486108a0cc08041=WeighLogic.Common
#$TargetFrameworkDirectory=;C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6\;;;C:\
Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6\Facades\
#ReferencePath=;C:\Users\DanielSimonavicius\.nuget\packages\automapper\6.2.2\lib\net45\AutoMapper.dll;C:\Users\Daniel
Simonavicius\.nuget\packages\unity\5.5.5\lib\net45\CommonServiceLocator.dll;C:\Program Files (x86)\DevExpress 17.2\Co
mponents\Bin\Framework\DevExpress.Data.v17.2.dll;C:\Program Files (x86)\DevExpress 17.2\Components\Bin\Framework\DevE
xpress.Mvvm.v17.2.dll;C:\Program Files (x86)\DevExpress 17.2\Components\Bin\Framework\DevExpress.Office.v17.2.Core.dl
l;C:\Program Files (x86)\DevExpress 17.2\Components\Bin\Framework\DevExpress.Pdf.v17.2.Core.dll;C:\Program Files (x86
)\DevExpress 17.2\Components\Bin\Framework\DevExpress.Printing.v17.2.Core.dll;C:\Program Files (x86)\DevExpress 17.2\
Components\Bin\Framework\DevExpress.RichEdit.v17.2.Core.dll;C:\Program Files (x86)\DevExpress 17.2\Components\Bin\Fra
mework\DevExpress.RichEdit.v17.2.Export.dll;C:\Program Files (x86)\DevExpress 17.2\Components\Bin\Framework\DevExpres
s.Xpf.CodeView.v17.2.dll;C:\Program Files (x86)\DevExpress 17.2\Components\Bin\Framework\DevExpress.Xpf.Core.v17.2.dl
l;C:\Program Files (x86)\DevExpress 17.2\Components\Bin\Framework\DevExpress.Xpf.Grid.v17.2.Core.dll;C:\Program Files
(x86)\DevExpress 17.2\Components\Bin\Framework\DevExpress.Xpf.Grid.v17.2.dll;C:\Program Files (x86)\DevExpress 17.2\
Components\Bin\Framework\DevExpress.Xpf.Layout.v17.2.Core.dll;C:\Program Files (x86)\DevExpress 17.2\Components\Bin\F
ramework\DevExpress.Xpf.LayoutControl.v17.2.dll;C:\Program Files (x86)\DevExpress 17.2\Components\Bin\Framework\DevEx
press.Xpf.Printing.v17.2.dll;C:\Program Files (x86)\DevExpress 17.2\Components\Bin\Framework\DevExpress.XtraLayout.v1
7.2.dll;C:\Program Files (x86)\DevExpress 17.2\Components\Bin\Framework\DevExpress.XtraPrinting.v17.2.dll;C:\Users\Da
nielSimonavicius\.nuget\packages\entityframework\6.2.0\lib\net45\EntityFramework.dll;C:\Users\DanielSimonavicius\.nug
et\packages\entityframework\6.2.0\lib\net45\EntityFramework.SqlServer.dll;C:\Users\DanielSimonavicius\.nuget\packages
\efinteractiveviews\1.0.1\lib\net45\InteractivePreGeneratedViews.dll;C:\Users\DanielSimonavicius\.nuget\packages\logi
fy.alert.core\1.0.39\lib\net45\Logify.Alert.Core.dll;C:\Users\DanielSimonavicius\.nuget\packages\logify.alert.wpf\1.0
.39\lib\net45\Logify.Alert.Wpf.dll;C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6
\Microsoft.CSharp.dll;C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6\mscorlib.dll
;C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6\PresentationCore.dll;C:\Program F
iles (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6\PresentationFramework.dll;C:\Users\DanielSimon
avicius\AppData\Local\NCrunch\980\2\_ncrunchreferences\Seagull.BarTender.Print.dll;C:\Program Files (x86)\Reference A
ssemblies\Microsoft\Framework\.NETFramework\v4.6\System.ComponentModel.Composition.dll;C:\Program Files (x86)\Referen
ce Assemblies\Microsoft\Framework\.NETFramework\v4.6\System.ComponentModel.DataAnnotations.dll;C:\Program Files (x86)
\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6\System.Core.dll;C:\Program Files (x86)\Reference Assembl
ies\Microsoft\Framework\.NETFramework\v4.6\System.Data.DataSetExtensions.dll;C:\Program Files (x86)\Reference Assembl
ies\Microsoft\Framework\.NETFramework\v4.6\System.Data.dll;C:\Program Files (x86)\Reference Assemblies\Microsoft\Fram
ework\.NETFramework\v4.6\System.dll;C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.
6\System.Drawing.dll;C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6\System.Runtim
e.Serialization.dll;C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6\System.Xaml.dl
l;C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6\System.Xml.dll;C:\Program Files
(x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6\System.Xml.Linq.dll;C:\Users\DanielSimonavicius\.nu
get\packages\unity\5.5.5\lib\net45\Unity.Abstractions.dll;C:\Users\DanielSimonavicius\.nuget\packages\unity\5.5.5\lib
\net45\Unity.Configuration.dll;C:\Users\DanielSimonavicius\.nuget\packages\unity\5.5.5\lib\net45\Unity.Container.dll;
C:\Users\DanielSimonavicius\.nuget\packages\unity\5.5.5\lib\net45\Unity.Interception.Configuration.dll;C:\Users\Danie
lSimonavicius\.nuget\packages\unity\5.5.5\lib\net45\Unity.Interception.dll;C:\Users\DanielSimonavicius\.nuget\package
s\unity\5.5.5\lib\net45\Unity.RegistrationByConvention.dll;C:\Users\DanielSimonavicius\.nuget\packages\unity\5.5.5\li
b\net45\Unity.ServiceLocation.dll;C:\Users\DanielSimonavicius\AppData\Local\NCrunch\980\1\WeighLogic.Plugin.Contracts
\bin\Debug\WeighLogic.Contracts.dll;C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.
6\WindowsBase.dll
#ReferenceCopyLocalPaths=;C:\Users\DanielSimonavicius\.nuget\packages\automapper\6.2.2\lib\net45\AutoMapper.dll;C:\Us
ers\DanielSimonavicius\.nuget\packages\commonservicelocator\2.0.2\lib\net45\CommonServiceLocator.dll;C:\Users\DanielS
imonavicius\.nuget\packages\efinteractiveviews\1.0.1\lib\net45\InteractivePreGeneratedViews.dll;C:\Users\DanielSimona
vicius\.nuget\packages\entityframework\6.2.0\lib\net45\EntityFramework.SqlServer.dll;C:\Users\DanielSimonavicius\.nug
et\packages\entityframework\6.2.0\lib\net45\EntityFramework.dll;C:\Users\DanielSimonavicius\.nuget\packages\logify.al
ert.core\1.0.39\lib\net45\Logify.Alert.Core.dll;C:\Users\DanielSimonavicius\.nuget\packages\logify.alert.wpf\1.0.39\l
ib\net45\Logify.Alert.Wpf.dll;C:\Users\DanielSimonavicius\.nuget\packages\unity\5.5.5\lib\net45\CommonServiceLocator.
dll;C:\Users\DanielSimonavicius\.nuget\packages\unity\5.5.5\lib\net45\CommonServiceLocator.pdb;C:\Users\DanielSimonav
icius\.nuget\packages\unity\5.5.5\lib\net45\Unity.Abstractions.dll;C:\Users\DanielSimonavicius\.nuget\packages\unity\
5.5.5\lib\net45\Unity.Abstractions.pdb;C:\Users\DanielSimonavicius\.nuget\packages\unity\5.5.5\lib\net45\Unity.Config
uration.dll;C:\Users\DanielSimonavicius\.nuget\packages\unity\5.5.5\lib\net45\Unity.Configuration.pdb;C:\Users\Daniel
Simonavicius\.nuget\packages\unity\5.5.5\lib\net45\Unity.Container.dll;C:\Users\DanielSimonavicius\.nuget\packages\un
ity\5.5.5\lib\net45\Unity.Container.pdb;C:\Users\DanielSimonavicius\.nuget\packages\unity\5.5.5\lib\net45\Unity.Inter
ception.Configuration.dll;C:\Users\DanielSimonavicius\.nuget\packages\unity\5.5.5\lib\net45\Unity.Interception.Config
uration.pdb;C:\Users\DanielSimonavicius\.nuget\packages\unity\5.5.5\lib\net45\Unity.Interception.dll;C:\Users\DanielS
imonavicius\.nuget\packages\unity\5.5.5\lib\net45\Unity.Interception.pdb;C:\Users\DanielSimonavicius\.nuget\packages\
unity\5.5.5\lib\net45\Unity.RegistrationByConvention.dll;C:\Users\DanielSimonavicius\.nuget\packages\unity\5.5.5\lib\
net45\Unity.RegistrationByConvention.pdb;C:\Users\DanielSimonavicius\.nuget\packages\unity\5.5.5\lib\net45\Unity.Serv
iceLocation.dll;C:\Users\DanielSimonavicius\.nuget\packages\unity\5.5.5\lib\net45\Unity.ServiceLocation.pdb;C:\Users\
DanielSimonavicius\AppData\Local\NCrunch\980\2\_ncrunchreferences\Seagull.BarTender.Print.dll;C:\Users\DanielSimonavi
cius\AppData\Local\NCrunch\980\1\WeighLogic.Plugin.Contracts\bin\Debug\WeighLogic.Contracts.dll;C:\Users\DanielSimona
vicius\AppData\Local\NCrunch\980\1\WeighLogic.Plugin.Contracts\bin\Debug\WeighLogic.Contracts.pdb
Done Building Project "C:\Users\DanielSimonavicius\AppData\Local\NCrunch\980\2\WeighLogic.Common\WeighLogic.Common.cspr
oj" (default targets).


Build succeeded.

danius
#5 Posted : Sunday, January 14, 2018 10:26:58 PM(UTC)
Rank: Member

Groups: Registered
Joined: 7/17/2013(UTC)
Posts: 20
Location: Ireland

Thanks: 3 times
Was thanked: 3 time(s) in 3 post(s)
btw I'm in a contract with a company here now that may want to get 15x ncrunch licenses since they saw me using it.
They were planning to send a quote request couple months ago.
You're welcome btw :)
Remco
#4 Posted : Sunday, January 14, 2018 10:51:04 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
danius;11691 wrote:
Manual msbuild worked just fine, see below.

could it be that my when ncrunch is unable to parse unicode character in path (note the -> ??)


That is suspect ... I'm going to need to fish up some more info to be sure ..

Would you be able to do the following?
- Submit a bug report after this happens, I can check the log for weird stuff
- Copy/paste the contents of your project.assets.json file as it exists inside the NCrunch workspace here into the forum (or submit via contact form).
- See if you can build a minimal sample project on your machine that can reproduce the issue, perhaps just by trying to reference the same package in a new empty project. This will help to determine if it's project specific or related to your environment

danius;11691 wrote:

btw I'm in a contract with a company here now that may want to get 15x ncrunch licenses since they saw me using it.
They were planning to send a quote request couple months ago.
You're welcome btw :)


Thanks!!! :)
danius
#6 Posted : Sunday, January 14, 2018 11:22:19 PM(UTC)
Rank: Member

Groups: Registered
Joined: 7/17/2013(UTC)
Posts: 20
Location: Ireland

Thanks: 3 times
Was thanked: 3 time(s) in 3 post(s)
I have setup quick console app, and can confirm it's still happening on local machine. Yet the grid node compiles and executes the test.
I suspect the path is the culprit.


This project was successfully built on computers: office.danius****.com
This project failed to build on computers: (local)

Probably not much point giving you sample project. it will simply work under your nuget config.
nuget config -set globalPackagesFolder =P:\Projects\packages solved it for me

I will submit the bug anyway.

Regards,
Daniel
Remco
#7 Posted : Monday, January 15, 2018 3:59:09 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
Thanks Daniel! I agree that the path looks like the problem. I'll see what I can do about reproducing and arranging a fix.
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.086 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download