ASP.NET Core builds now failing

Joe's Avatar

Joe

Mar 21, 2017 @ 10:21 PM

Hi,
I've noticed my ASP.NET Core application builds are now failing on account of: MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.

Any ideas what has caused this? Have you guys upgrade your dot net core tools? I've attached my appveyor.yml file for your review.

Thanks!
Joe

  1. Support Staff 1 Posted by Feodor Fitsner on Mar 21, 2017 @ 10:28 PM

    Feodor Fitsner's Avatar

    Hi Joe,

    Correct, we have installed .NET Core SDK 1.0.1 on build worker though previous SDKs are, of course, still there. Multiple SDKs can work side-by-side, please see this issue for explanation and solution: https://github.com/appveyor/ci/issues/1377#issuecomment-287644271

    In short, add global.json to the root of your repo with the following contents:

    {
      "sdk": {
        "version": "1.0.0-preview2-1-003177"
      }
    }
    
  2. 2 Posted by desautelsj on Mar 23, 2017 @ 04:16 AM

    desautelsj's Avatar

    I also faced this problem and Feodor suggestion helped me resolve the issue but one detail I wanted to share: I have my Cake build script in my project's root folder and my source files (including my .sln) in a subfolder called source. In the GitHub issue referenced above, Feodor says:

    Add global.json file to the folder with your .sln file

    However, in my case that did not work. I had to move the global.json to my project's root folder.

    Hope it's helpful.

  3. Support Staff 3 Posted by Feodor Fitsner on Mar 23, 2017 @ 04:20 AM

    Feodor Fitsner's Avatar

    Yeah, thanks for your note. When dotnet command line tool is running it's looking for global.json in the current directory. By default, build scripts run in repo root folder, so global.json should be there as well.

  4. 4 Posted by desautelsj on Mar 23, 2017 @ 04:36 AM

    desautelsj's Avatar

    One more detail, the most recent 1.0.0 SDK on the "Visual Studio 2015 AppVeyor image is:

    {
        "sdk": {
            "version": "1.0.0-preview2-003156"
        }
    }
    
  5. Support Staff 5 Posted by Feodor Fitsner on Mar 23, 2017 @ 04:39 AM

    Feodor Fitsner's Avatar

    There is 1.0.0-preview2-1-003177 also available.

  6. 6 Posted by desautelsj on Mar 23, 2017 @ 04:40 AM

    desautelsj's Avatar

    oups you're right, 3177 is indeed more recent than 3156. Sorry for the confusion.

  7. 7 Posted by Joseph Ellis on Mar 23, 2017 @ 08:05 AM

    Joseph Ellis's Avatar

    Thank you both for your help. I've popped the global.json in the root of my
    project and everything's working as expected.

    Thanks again.

  8. 8 Posted by Joe on Mar 23, 2017 @ 08:43 AM

    Joe's Avatar

    Thanks for your help guys! I put the global.json file in the root of my project and everything is working as expected.

  9. Ilya Finkelshteyn closed this discussion on Aug 25, 2018 @ 02:16 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac