Giter Club home page Giter Club logo

Comments (5)

TAGC avatar TAGC commented on June 6, 2024

As reference (for myself), dotnet build gives this error when invoked in a directory with no solution/project files:

MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.

And this error when it contains more than one:

MSBUILD : error MSB1011: Specify which project or solution file to use because this folder contains more than one project or solution file.

In both cases the exit code is 1.

from dotnet-setversion.

TAGC avatar TAGC commented on June 6, 2024

Right now it seems it might not even be possible to run this tool when there isn't exactly one csproj file in the directory anyway. For one thing it's a per-project tool meaning it's impossible to run it without being in a directory with a project folder. If you try you get this:

$ dotnet setversion
No executable found matching command "dotnet-setversion"

On the other hand, if you try to run the tool in a project with more than one csproj file, you get the following error before the entry-point of the tool gets executed:

$ dotnet setversion
Specify which project file to use because this '<<folder>>' contains more than one project file.

With seemingly no way to actually specify the project file to use.

Because of this, I think this is a non-issue in this tool's current state. However, I'll probably need to convert this tool into a global tool to support #6 in which case this will become a concern. I'll keep this open for now.

from dotnet-setversion.

Skulblaka avatar Skulblaka commented on June 6, 2024

I have a feature branch in my fork where I converted it into a global tool including a migration guide. Do you want me to create another pull request after you merged with the current one?

from dotnet-setversion.

TAGC avatar TAGC commented on June 6, 2024

Sure, sounds good. Going to hold off on this until I know why the CI build is failing though. I RDP'd into the build server and for some reason the PowerShell console on it gets stuck executing the dotnet setversion command (it prints the "Setting version: ..." message immediately though and it's just a return 0; after that).

Will need access to a Windows machine to see if I can reproduce the problem locally. I'll have access to one on Monday.

from dotnet-setversion.

Skulblaka avatar Skulblaka commented on June 6, 2024

Closing this as running dotnet-setversion isn't possible in a directory with two csproj files, so Directory.EnumerateFileSystemEntries(...) will never emit more than one value.

from dotnet-setversion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.