Closed satbirbaidwan closed 6 years ago
Thank you for your feedback, @satbirbaidwan!
I had a similar report in #14, but your case seems a bit different. There's only one actual project file (i.e. .csproj
), while the others are a local settings file (.user
) and some VS source control file.
The error message you are seeing, however, is not coming from this tool, as you already found out. The CLI issue (dotnet/cli#4808) is the root cause, and affects all custom dotnet tools, including this one. I don't know of a way around it, other than ensuring only one project file is present.
I encourage you to add your feedback on the CLI issue, since yours seems to be a case where the error message is not just inconvenient, but also incorrect. It would probably help if you can add a repository with a repro case to demonstrate the issue.
Perhaps that will remind the CLI team to revisit the issue and hopefully fix it; it's been open for a long time now.
As there is nothing actionable that I can fix here, I will close this issue.
Thanks for looking into this and replying!
I actually found a workaround. I installed transform-xdt as a global tool using
dotnet tool install --global dotnet-xdt --version 2.1.0
as mentioned in your article
and all i had to do is change in xx.csproj file change line
`<Exec
Command="dotnet transform-xdt --xml "$(_SourceWebConfig)" --transform "$(_XdtTransform)" --output "$(_TargetWebConfig)""
Condition="Exists('$(_XdtTransform)')" />
`
to
<Exec Command="dotnet xdt --xml "$(_SourceWebConfig)" --transform "$(_XdtTransform)" --output "$(_TargetWebConfig)"" Condition="Exists('$(_XdtTransform)')" />
and it works as expected
Regards, Satbir Baidwan
Hi, I have tested this in a new solution and it works fine. Thanks and great job. However when i tried to incorporate this in my actual solution i am getting error "Specify which project file to use because this c:\pathtofolder\project contains more than one project file."
I looked in the source folder and i have project.csproj project.csproj.user project.csproj.vspscc
This appears to be a known issue with CLI Tools Is there a way to get around this without deleting other files ?