atifaziz / NCrontab

Crontab for .NET

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NCrontab.Signed 3.3.2 Nuget says Could not find a part of the path when compiling VB.NET solution

rrodriguez1975 opened this issue · comments

I have a Windows Service application made with VB.NET and .NET Framework 4.5 that was compiling and working successfully until I have installed NCrontab Signed 3.3.2.

I have installed NCrontab package through Nuget package manager console by using below command:

Install-Package ncrontab.signed -Version 3.3.2

Nuget has added below references to my project under packages folder ..\packages\ncrontab.signed.3.3.2\lib\net35\NCrontab.Signed.dll:

NCrontab.Signed Version 3.3.2.0

Once package installed, my VB.NET project is not compiling anymore.

It outputs below error:

Restoring NuGet package ncrontab.signed.3.3.2.
  Adding package 'ncrontab.signed.3.3.2' to folder 'D:\MyProjects\WindowsService\MyService\ \packages'
  ADVERTENCIA: 'could not find a part of the path 'D:\MyProjects\WindowsService\MyService\ \packages\NCrontab.Signed.3.3.2'.'
D:\MyProjects\WindowsService\MyService\.nuget\NuGet.targets(100,9): error : could not find a part of the path 'D:\MyProjects\WindowsService\MyService\ \packages\NCrontab.Signed.3.3.2'.
D:\MyProjects\WindowsService\MyService\.nuget\NuGet.targets(100,9): error MSB3073: Command ""D:\MyProjects\WindowsService\MyService\.nuget\NuGet.exe" install "D:\MyProjects\WindowsService\MyService\packages.config" -source ""  -NonInteractive -RequireConsent -solutionDir "D:\MyProjects\WindowsService\MyService\ "" exited with code 1.

It seems Nuget is adding a white space in the path.... I do not know why... I have tried changing the space after $(SolutionDir) to a backslash in nuget.targets replacing below line:

<PaddedSolutionDir Condition=" '$(OS)' == 'Windows_NT'">"$(SolutionDir) "</PaddedSolutionDir>
with this one:

<PaddedSolutionDir Condition=" '$(OS)' == 'Windows_NT'">"$(SolutionDir)\"</PaddedSolutionDir>

but it does not work, same error appearing....

I am using Visual Studio 2013 and Nuget v2.12.0.817 (last available for VS2013).

Please, help me.

I have posted this in stackoverflow:

This problem has to do with NuGet, which according to @nkolev92, seems to have been fixed with NuGet.Build 2.12.1. I am closing this issue as its unrelated to this project. Your best option is to post the issue to the @NuGet team instead.