Message: Please specify a nuspec or project file to use

Sep 26, 2011 at 11:31 AM

When I run build.cmd in commandline, I got this message. 

  Everything is Ok  Attempting to build package from 'NuGet.CommandLine.nuspec'.  Successfully created package 'J:\Michael Sync\NuGet-Myfork\bin\NuGet\Console\  NuGet.CommandLine.1.6.0.0.nupkg'.  Please specify a nuspec or project file to use.J:\Michael Sync\NuGet-Myfork\Build\Build.proj(191,9): error MSB3073: The command ""J:\Michael Sync\NuGet-Myfork\Build\..\bin\NuGet\Console\NuGet.exe" pack -oJ:\Michael Sync\NuGet-Myfork\Build\..\bin\NuGet\Server -Build -p Configuration=Release -Symbols -exclude **\NuGet.Core.*" exited with code 1.

How should I fix it?

In this article http://docs.nuget.org/docs/contribute/contributing-to-nuget, there are some dead links. 

 

  1. If you plan to make large submissions (anything larger than a small bug fix or feature), set up your environment for code reviews.
  2. the code submission process and 
Coordinator
Sep 26, 2011 at 9:58 PM

I just pushed a fix to the docs. Thanks for the report!

Sep 27, 2011 at 4:46 AM

Thanks Haacked!! 

 

I can't build the source.. What do I need to do in order to build the source? Thanks.

 

Everything is Ok  Attempting to build package from 'NuGet.CommandLine.nuspec'.  Successfully created package 'J:\Michael Sync\NuGet-Myfork\bin\NuGet\Console\  NuGet.CommandLine.1.6.0.0.nupkg'.  Please specify a nuspec or project file to use.J:\Michael Sync\NuGet-Myfork\Build\Build.proj(191,9): error MSB3073: The command ""J:\Michael Sync\NuGet-Myfork\Build\..\bin\NuGet\Console\NuGet.exe" pack -oJ:\Michael Sync\NuGet-Myfork\Build\..\bin\NuGet\Server -Build -p Configuration=Release -Symbols -exclude **\NuGet.Core.*" exited with code 1.

Coordinator
Sep 27, 2011 at 4:59 PM

Hmmm, can you create an issue and attach a project that reproduces this issue?

Sep 27, 2011 at 5:05 PM

I just download the source code from my folk https://hg01.codeplex.com/forks/michaelsync/msyncwillmakeyoubetter .. My fork is very fresh one and I created it just before posting my first message. So, I can say that my fork is exactly like what you guys have   https://hg01.codeplex.com/nuget

Here is the steps to reproduce. 

  1. Close the source code of nuget.
  2. Run cmd as an admin
  3. Go go the folder where I close the repository
  4. type "build.cmd"
    Observe:   I got this error. 

    Everything is Ok  Attempting to build package from 'NuGet.CommandLine.nuspec'.  Successfully created package 'J:\Michael Sync\NuGet-Myfork\bin\NuGet\Console\  NuGet.CommandLine.1.6.0.0.nupkg'.  Please specify a nuspec or project file to use.J:\Michael Sync\NuGet-Myfork\Build\Build.proj(191,9): error MSB3073: The command ""J:\Michael Sync\NuGet-Myfork\Build\..\bin\NuGet\Console\NuGet.exe" pack -oJ:\Michael Sync\NuGet-Myfork\Build\..\bin\NuGet\Server -Build -p Configuration=Release -Symbols -exclude **\NuGet.Core.*" exited with code 1.
Coordinator
Sep 27, 2011 at 5:32 PM

Try running

Nuget u –self

First.

From: michaelsync [email removed]
Sent: Tuesday, September 27, 2011 9:05 AM
To: Phil Haack
Subject: Re: Message: Please specify a nuspec or project file to use [nuget:273835]

From: michaelsync

I just download the source code from my folk https://hg01.codeplex.com/forks/michaelsync/msyncwillmakeyoubetter .. My fork is very fresh one and I created it just before posting my first message. So, I can say that my fork is exactly like what you guys have https://hg01.codeplex.com/nuget

Here is the steps to reproduce.

1. Close the source code of nuget.

2. Run cmd as an admin

3. Go go the folder where I close the repository

4. type "build.cmd"
Observe: I got this error.

Everything is Ok Attempting to build package from 'NuGet.CommandLine.nuspec'. Successfully created package 'J:\Michael Sync\NuGet-Myfork\bin\NuGet\Console\ NuGet.CommandLine.1.6.0.0.nupkg'. Please specify a nuspec or project file to use.J:\Michael Sync\NuGet-Myfork\Build\Build.proj(191,9): error MSB3073: The command ""J:\Michael Sync\NuGet-Myfork\Build\..\bin\NuGet\Console\NuGet.exe" pack -oJ:\Michael Sync\NuGet-Myfork\Build\..\bin\NuGet\Server -Build -p Configuration=Release -Symbols -exclude **\NuGet.Core.*" exited with code 1.

Sep 27, 2011 at 5:46 PM

I'm confused. Is this an error that happens while building NuGet itself? If so, how would 'nuget -u self' be necessary? :)

Sep 27, 2011 at 5:53 PM
Edited Sep 27, 2011 at 5:54 PM

Yes. I got this error while building NuGet. 

 

I tried compiling it again on other machine after cloning my fork that I didn't even touch yet.. 

I got this error and a lot of warnings  on other machine.. 

  Running Code Analysis...MSBUILD : error : CA0053 : Unable to load rule assembly 'c:\michael sync\nuget\myfork\fxcop\microsoft.powershell.codeanalysis.dll': Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. [C:\Michael Sync\NuGet\MyFork\src\VsConsole\Console.Types\Console.Types.csproj]

And

MSBUILD : error : CA1704 : Microsoft.Naming : Correct the spelling of 'Auth' in member name 'IHttpWebResponse.AuthType' or remove it entirely if it represents any sort of Hungarian notation. [C:\Michael Sync\NuGet\MyFork\src\Core\Core.csproj]MSBUILD : error : CA1704 : Microsoft.Naming : In method 'IPackageServer.CreatePackage(string, Stream)', correct the spelling of 'api' in parameter name 'apiKey' or remove it entirely if it represents any sort of Hungarian notation. [C:\Michael Sync\NuGet\MyFork\src\Core\Core.csproj]MSBUILD : error : CA1704 : Microsoft.Naming : In method 'IPackageServer.DeletePackage(string, string, string)', correct the spelling of 'api' in parameter name 'apiKey' or remove it entirely if it represents any sort of Hungarian notation. [C:\Michael Sync\NuGet\MyFork\src\Core\Core.csproj]MSBUILD : error : CA1704 : Microsoft.Naming : In method 'IPackageServer.PublishPackage(string, string, string)', correct the spelling of 'api' in parameter name 'apiKey' or remove it entirely if it represents any sort of Hungarian notation. [C:\Michael Sync\NuGet\MyFork\src\Core\Core.csproj]

Sep 27, 2011 at 6:03 PM

The different between this machine and my previous machine is that my %systemroot% is under F: and the fork is located under C: which is not OS dive in this machine.. So, I'm guessing there might be some hard-coded things that always look under C: by default. That's why it seems like FxCop can't find its rule set. 

Sep 27, 2011 at 6:10 PM

What is your OS version and Visual Studio/.NET version?

Sep 27, 2011 at 6:23 PM
  • Windows 7 Ultimate N - Version 6.1 Build 7601 Service Pack 1
  • VS 2010 Version 10.0.40219.1 SP1Rel
  • .NET Framework Version 4.5.40805 SP1Rel

I found one thing.. 

I have the following things under this directory F:\Program Files (x86)\Microsoft SDKs\Windows

  • v6.0A
  • v7.0A
  • v8.0
  • v8.0A

I'm trying to install v7.1 now.. 

Sep 28, 2011 at 12:48 AM

Just install and it doesn't work. 

Here is the error when I run build.cmd. 


C:\Michael Sync\NuGet\MyFork>build.cmdMicrosoft (R) Build Engine Version 4.0.30319.17020

[Microsoft .NET Framework, Version 4.0.30319.17020]

Copyright (C) Microsoft Corporation 2007. All rights reserved.


  Core -> C:\Michael Sync\NuGet\MyFork\src\Core\bin\Debug\NuGet.Core.dll

  Running Code Analysis...

  Console.Types ->

C:\Michael Sync\NuGet\MyFork\src\VsConsole\Console.Types\bin  \Debug\NuGet.Console.Types.dll

  Bootstrapper -> C:\Michael Sync\NuGet\MyFork\src\Bootstrapper\bin\Debug\NuGet  .exe

MSBUILD : error : CA0053 : Unable to load rule assembly 'c:\michael sync\nuget\myfork\fxcop\microsoft.powershell.codeanalysis.dll':

Unable to load one or more of the requested types.

Retrieve the LoaderExceptions property for more information. [C:\Michael Sync\NuGet\MyFork\src\Core\Core.csproj]

MSBUILD :

warning : CA0062 : The rule 'PS1001' referenced in rule set 'C:\Michael Sync\NuGet\MyFork\src\Core\..\..\NuGet.ruleset' could not be found. [C:\Michael Sync\NuGet\MyFork\src\Core\Core.csproj]MSBUILD :

warning : CA0062 : The rule 'PS1002' referenced in rule set 'C:\Michael Sync\NuGet\MyFork\src\Core\..\..\NuGet.ruleset' could not be found. [C:\Michael Sync\NuGet\MyFork\src\Core\Core.csproj]MSBUILD :

warning : CA0062 : The rule 'PS1003' referenced in rule set 'C:\Michael Sync\NuGet\MyFork\src\Core\..\..\NuGet.ruleset' could not be found. [C:\Michael Sync\NuGet\MyFork\src\Core\Core.csproj]MSBUILD :

warning : CA0062 : The rule 'PS1004' referenced in rule set 'C:\Michael Sync\NuGet\MyFork\src\Core\..\..\NuGet.ruleset' could not be found. [C:\Michael Sync\NuGet\MyFork\src\Core\Core.csproj]MSBUILD :

warning : CA0062 : The rule 'PS1005' referenced in rule set 'C:\Michael Sync\NuGet\MyFork\src\Core\..\..\NuGet.ruleset' could not be found. [C:\Michael Sync\NuGet\MyFork\src\Core\Core.csproj]MSBUILD :

warning : CA0062 : The rule 'PS1006' referenced in rule set 'C:\Michael Sync\NuGet\MyFork\src\Core\..\..\NuGet.ruleset' could not be found. [C:\Michael Sync\NuGet\MyFork\src\Core\Core.csproj]MSBUILD :

warning : CA0062 : The rule 'PS1007' referenced in rule set 'C:\Michael Sync\NuGet\MyFork\src\Core\..\..\NuGet.ruleset' could not be found. [C:\Michael Sync\NuGet\MyFork\src\Core\Core.csproj]MSBUILD :

warning : CA0062 : The rule 'PS1008' referenced in rule set 'C:\Michael Sync\NuGet\MyFork\src\Core\..\..\NuGet.ruleset' could not be found. [C:\Michael Sync\NuGet\MyFork\src\Core\Core.csproj]MSBUILD :

warning : CA0062 : The rule 'PS1010' referenced in rule set 'C:\Michael Sync\NuGet\MyFork\src\Core\..\..\NuGet.ruleset' could not be found. [C:\Michael Sync\NuGet\MyFork\src\Core\Core.csproj]MSBUILD :

warning : CA0062 : The rule 'PS1011' referenced in rule set 'C:\Michael Sync\NuGet\MyFork\src\Core\..\..\NuGet.ruleset' could not be found. [C:\Michael Sync\NuGet\MyFork\src\Core\Core.csproj]MSBUILD :

warning : CA0062 : The rule 'PS1012' referenced in rule set 'C:\Michael Sync\NuGet\MyFork\src\Core\..\..\NuGet.ruleset' could not be found. [C:\Michael Sync\NuGet\MyFork\src\Core\Core.csproj]MSBUILD :

warning : CA0062 : The rule 'PS1013' referenced in rule set 'C:\Michael Sync\NuGet\MyFork\src\Core\..\..\NuGet.ruleset' could not be found. [C:\Michael Sync\NuGet\MyFork\src\Core\Core.csproj]MSBUILD :

warning : CA0062 : The rule 'PS1014' referenced in rule set 'C:\Michael Sync\NuGet\MyFork\src\Core\..\..\NuGet.ruleset' could not be found. [C:\Michael Sync\NuGet\MyFork\src\Core\Core.csproj]MSBUILD :

warning : CA0062 : The rule 'PS1015' referenced in rule set 'C:\Michael Sync\NuGet\MyFork\src\Core\..\..\NuGet.ruleset' could not be found. [C:\Michael Sync\NuGet\MyFork\src\Core\Core.csproj]MSBUILD :

warning : CA0062 : The rule 'PS1101' referenced in rule set 'C:\Michael Sync\NuGet\MyFork\src\Core\..\..\NuGet.ruleset' could not be found. [C:\Michael Sync\NuGet\MyFork\src\Core\Core.csproj]MSBUILD :

warning : CA0062 : The rule 'PS1102' referenced in rule set 'C:\Michael Sync\NuGet\MyFork\src\Core\..\..\NuGet.ruleset' could not be found. [C:\Michael Sync\NuGet\MyFork\src\Core\Core.csproj]MSBUILD :

warning : CA0062 : The rule 'PS1103' referenced in rule set 'C:\Michael Sync\NuGet\MyFork\src\Core\..\..\NuGet.ruleset' could not be found. [C:\Michael Sync\NuGet\MyFork\src\Core\Core.csproj]MSBUILD :

warning : CA0062 : The rule 'PS1104' referenced in rule set 'C:\Michael Sync\NuGet\MyFork\src\Core\..\..\NuGet.ruleset' could not be found. [C:\Michael Sync\NuGet\MyFork\src\Core\Core.csproj]MSBUILD :

error : CA1704 : Microsoft.Naming : Correct the spelling of 'Auth' in member name 'IHttpWebResponse.AuthType' or remove it entirely if it represents any sort of Hungarian notation. [C:\Michael Sync\NuGet\MyFork\src\Core\Core.csproj]

MSBUILD : error : CA1704 : Microsoft.Naming : In method 'IPackageServer.CreatePackage(string, Stream)', correct the spelling of 'api' in parameter name 'apiKey' or remove it entirely if it represents any sort of Hungarian notation. [C:\Michael Sync\NuGet\MyFork\src\Core\Core.csproj]MSBUILD :

error : CA1704 : Microsoft.Naming : In method 'IPackageServer.DeletePackage(string, string, string)', correct the spelling of 'api' in parameter name 'apiKey' or remove it entirely if it represents any sort of Hungarian notation. [C:\Michael Sync\NuGet\MyFork\src\Core\Core.csproj]MSBUILD : error : CA1704 : Microsoft.Naming : In method 'IPackageServer.PublishPackage(string, string, string)', correct the spelling of 'api' in parameter name 'apiKey' or remove it entirely if it represents any sort of Hungarian notation. [C:\Michael Sync\NuGet\MyFork\src\Core\Core.csproj] 

Code Analysis Complete -- 5 error(s), 18 warning(s)

Sep 28, 2011 at 1:10 AM

When I tried building it from Visual Studio, the VsExtension is not loaded with this error "the project type is not supported by default". What do we need to install?

And got the following errors in Visual Studio.

 

Error 2 'NuGet.Dialog.Providers.RootPackagesTreeNode' does not implement interface member 'Microsoft.VisualStudio.ExtensionsExplorer.IVsExtensionsTreeNode.Extensions'. 'NuGet.Dialog.Providers.RootPackagesTreeNode.Extensions' cannot implement 'Microsoft.VisualStudio.ExtensionsExplorer.IVsExtensionsTreeNode.Extensions' because it does not have the matching return type of 'System.Collections.IList'.

C:\Michael Sync\NuGet\MyFork\src\Dialog10\Nodes\RootTreeNode.cs 10 18 Dialog10Error 1

'NuGet.Dialog.Providers.PackagesTreeNodeBase' does not implement interface member 'Microsoft.VisualStudio.ExtensionsExplorer.IVsExtensionsTreeNode.Extensions'. 'NuGet.Dialog.Providers.PackagesTreeNodeBase.Extensions' cannot implement 'Microsoft.VisualStudio.ExtensionsExplorer.IVsExtensionsTreeNode.Extensions' because it does not have the matching return type of 'System.Collections.IList'. C:\Michael Sync\NuGet\MyFork\src\Dialog10\Nodes\PackagesTreeNodeBase.cs 16 29 Dialog10 

Sep 28, 2011 at 1:32 AM

Regarding VsExtension, it was fixed by installing VS SDK SP1.

But I'm still getting these two errors. 

Error 2 'NuGet.Dialog.Providers.RootPackagesTreeNode' does not implement interface member 'Microsoft.VisualStudio.ExtensionsExplorer.IVsExtensionsTreeNode.Extensions'. 'NuGet.Dialog.Providers.RootPackagesTreeNode.Extensions' cannot implement 'Microsoft.VisualStudio.ExtensionsExplorer.IVsExtensionsTreeNode.Extensions' because it does not have the matching return type of 'System.Collections.IList'.

C:\Michael Sync\NuGet\MyFork\src\Dialog10\Nodes\RootTreeNode.cs 10 18 Dialog10Error 1

'NuGet.Dialog.Providers.PackagesTreeNodeBase' does not implement interface member 'Microsoft.VisualStudio.ExtensionsExplorer.IVsExtensionsTreeNode.Extensions'. 'NuGet.Dialog.Providers.PackagesTreeNodeBase.Extensions' cannot implement 'Microsoft.VisualStudio.ExtensionsExplorer.IVsExtensionsTreeNode.Extensions' because it does not have the matching return type of 'System.Collections.IList'. C:\Michael Sync\NuGet\MyFork\src\Dialog10\Nodes\PackagesTreeNodeBase.cs 16 29 Dialog10

Sep 28, 2011 at 2:41 AM

I tried building it on two different machines and got two different errors. 

Machine #1: 

Microsoft (R) Build Engine Version 4.0.30319.17020

[Microsoft .NET Framework, Version 4.0.30319.17020]

Error ~ 

MSBUILD : error : CA0053 : Unable to load rule assembly 'c:\michael sync\nuget\myfork\fxcop\microsoft.powershell.codeanalysis.dll':

Unable to load one or more of the requested types.

Retrieve the LoaderExceptions property for more information. [C:\Michael Sync\NuGet\MyFork\src\Core\Core.csproj]

 

 

Machine #2: 

Microsoft (R) Build Engine Version 4.0.30319.1

[Microsoft .NET Framework, Version 4.0.30319.468]

Error ~ 

 Please specify a nuspec or project file to use.
J:\Michael Sync\NuGet-Myfork\Build\Build.proj(191,9): error MSB3073: The command ""J:\Michael Sync\NuGet-Myfork\Build\..\bin\NuGet\Console\NuGet.exe" pack -oJ:\Michael Sync\NuGet-Myfork\Build\..\bin\NuGet\Server -Build -p Configuration=Release -Symbols -exclude **\NuGet.Core.*" exited with code 1.

 

Sep 28, 2011 at 3:13 AM

Okay. Let's try solving "Machine #2" problem first... 

I think that this error occurred because the line "NuGet.exe pack -o J:\Michael Sync\NuGet-Myfork\Build\..\bin\NuGet\Server -Build -p Configuration=Release -Symbols -exclude **\NuGet.Core.*" is automatically generated while building and seems like it's missing the parameter. 

 

J:\Michael Sync\NuGet-Myfork\bin\NuGet\Console>NuGet.exe pack -o J:\Michael Sync\NuGet-Myfork\Build\..\bin\NuGet\Server -Build -p Configuration=Release -Symbols -exclude **\NuGet.Core.*
Please specify a nuspec or project file to use.

Coordinator
Sep 28, 2011 at 3:17 AM
Ah! You have a space in your path an it doesn't look like we're quoting it properly! Shame on us! ;)

Log a bug please :)
>
Sep 28, 2011 at 3:27 AM

Wow! Thanks. 

Yes. I created an issue ticket http://nuget.codeplex.com/workitem/1554

 

Hope I should be able to contribute something useful.. :) 

Sep 28, 2011 at 4:44 AM

You don't have to hope to contribute. You can submit a pull request right now :)

Sep 28, 2011 at 5:58 AM

:) haha. I need to understand about the code and structure first.. :)

Sep 28, 2011 at 1:15 PM

Regarding issue #1, did you install Visual Studio 11 or .NET Framework 4.5 on that machine? I am seeing the same problem on my machine which has VS 11 installed.

Sep 28, 2011 at 2:12 PM

Yes. I have 11 installed.. Do you want me to create new issue ticket as well?

Sep 28, 2011 at 3:54 PM

yes, please

Sep 28, 2011 at 4:30 PM

Yes dotnetjunky! :) 

http://nuget.codeplex.com/workitem/1556

Sep 29, 2011 at 3:02 AM

Hi,

I go through the problem and found that if we have VS 2011 installed, one of the project is automatically referenced to the latest version of Microsoft.VisualStudio.ExtensionsExplorer.dll which is v4.0_11.0.0.0__b03f5f7f11d50a3a instead of v4.0_10.0.0.0__b03f5f7f11d50a3a.

Can I fix it by setting Specific Version = True? It can be my very first contribution. :) 

 

Sep 29, 2011 at 4:24 AM

Okay. I will start the new thread..