Comments (5)
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.
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.
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.
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.
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)
- CI build hangs indefinitely HOT 4
- Error on Build HOT 2
- Support for .NET Core 3.1 HOT 2
- No problems here, just thanks
- trim trailing newline HOT 2
- AssemblyVersion and FileVersion are not updated. HOT 3
- Support for .NET 5.0
- Support to modify VersionPrefix and automatically increment a specified portion of the semantic version HOT 2
- Support for .NET 6.0 HOT 2
- Working with older project formats HOT 2
- Error when running HOT 4
- Support for .NET 7.0 HOT 3
- Support for .NET 8 HOT 5
- Doesn't work for dotnetcore 2.0 HOT 4
- Drop support for .NET Core 2.1, .NET Core 3.1, and .NET 5 HOT 1
- Latest dotnet2.0-sdk container doesn't work with setversion HOT 4
- Add support for the VSTS dotnet build task HOT 23
- TeamCity integration? HOT 3
- Does not handle multiple <PropertyGroup> tags HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dotnet-setversion.