-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
invoke a dotnet tool with multiple *proj in same directory is not possibile #7226
Comments
I do agree that we can do magic here to figure out how to function in a directory with multiple proj files. However, based on our previous conversations, I expect that what we really want is for the solution to have a command version that is global to the solution/repo. Is that fair? Is it at least the right prioritization? |
Yes, i think so. tools usually are shared per repo or global, that's the best ihmo. |
👍 for global installation of CLI tools, but in the meantime, is there any good workaround? I haven't found one other than renaming all but one .csproj file. |
I wanted to chime in and check whether there's a workaround for this issue? I just hit this as well, when trying my shiny new dotnet zip/dotnet tarball/dotnet rpm commands :). In my case, I'm not sure whether I want the tool to be installed globally - I'm guessing that could create some issues in shared build environments? Also, I only expect to invoke this command for the project in my solution that delivers the final executable - not the assemblies. Net, in my use case, I'd prefer to keep the tool at the project level instead of solution/global. Here's the environment info:
|
Can we add a project parameter? Something like this: I have a dir with two test projects (to test same source with two different conditional compilation symbols). Related: |
I might also add that it's not just multiple .csproj and/or .sln files that causes this behavior. I had a .csproj and a .dcproj file in my folder, and it wouldn't run until I deleted the docker project file also. |
We have issues with this on our buildserver (TeamCity) and the .metaproj files that are generated by the MSBuild ASP.NET Core tooling. |
This is causing trouble in corefx when runnin on Unix:
Any viable workaround at this point? |
This works for me: dotnet publish TripTravel.sln -c Release -o published |
Somehow this isn't an issue for me locally but is when used in a dockerfile. Super confused. My machine has the 3.0.100 SDK whereas I'm in a docker container using the 2.2 SDK image. Could this be fixed in 3.0? Can anyone else confirm? Update: For kicks I changed the image to 3.0 one and it didn't change anything. Same error. |
I just got bit by this, has anyone found a work-around yet? |
I landed here since I'm porting .NET Framework projects to .NET Core and want to keep the old projects for now. |
Steps to reproduce
Or:
dotnet restore Test1Library.fsproj
okdotnet restore Test2Library.fsproj
okdotnet compile-fsc
failsOr:
lib1.csproj
lib2.csproj
dotnet-mytool
) inside one or both projectsdotnet restore lib1.csproj
worksdotnet restore lib2.csproj
worksdotnet mytool
failsExpected behavior
It's possibile like with
dotnet restore
to invoke the tool command somehow.The
dotnet mytool
should fail only if ambiguous (both lib project definemytool
), otherwise should work (best experience).But expecit passing the project name maybe, like
dotnet -p lib1.csproj mytool
should make the tool workI think the issue is because the old
project.json
was one for directory, so the check to resolve the project to use was ok.Actual behavior
Error:
Environment data
ref dotnet/netcorecli-fsc#47
The text was updated successfully, but these errors were encountered: