Giter VIP home page Giter VIP logo

projectrenamer's Introduction

renameproject

CI Status NuGet NuGet PRs Welcome

Summary

How often have you felt the need to rename or move a C# (or VB) project? If you have come here, then you know that the most important existing IDE for C#, Visual Studio, does not really support this scenario very well.

This tool takes care of this for you, provided your use-case follows a set of fairly common practices:

  • you use git as a repository and have git(the executable) on your PATH
  • your csproj files have the same name as the folder in which they reside together with accompanying source code
  • you don't have more than one solution file (.sln) in one directory
  • you have dotnetcore 3.1 or above (**note: as we are approaching the release of net7, I will soon upgrade the tool to net6)
  • your solution does not contain nested solution folders - the tool currently has an issue with that and will fail; until I find the time to fix that, the workaround is simply to move the nested solution folder to top-level via VS, run the tool, and then move the solution folder back;seeing as this is two simple drag-and-drops that only change the solution file, I hope this is acceptable.

Get it

renameproject is intended to be used as a global dotnet tool. (You could install it as a local tool, too, but given what it does this does not really make a lot of sense.)

You install it by executing:

dotnet tool install -g ModernRonin.ProjectRenamer

Update it

If there is a new version out, you can update renameproject with

dotnet tool update --global ModernRonin.ProjectRenamer

When I publish a new version, I always post at my blog under the renameproject tag, aside from updating this readme here.

Release History

2.2.1:

  • bugfix: all Import Project directives with relative paths will be correctly adjusted now

2.2.0:

  • feature: tool can be used on VB projects, too; thanks to @fsbflavio for the PR!
  • bugfix: fixed a potential deadlock; thanks to @fsbflavio for the PR!

2.1.5:

  • bugfix: tool can be used on *nix platforms now without crashing; thanks to @pranav-ninja for the PR!

2.1.4:

  • bugfix: fixed issue when paths contained whitespace; thanks to @jakubmaguza for the PR - the first contribution from anyone else :-)

2.1.3:

  • bugfix: fixed a bug concerning nested solution folders; thanks to @Mike-E-angelo for reporting the bug

2.1.2:

  • bugfix: fixed another whitespace related scenario; thanks to @sejohnson-at-griffis for reporting the bug

2.1.1:

  • bugfix: projects in paths containing whitespace no longer crash the dotnet commands; thanks to @NicolasRiou for reporting the bug

2.1.0:

  • feature: you can move projects to different folders now instead of just renaming them
  • feature: you can specify a directory to exclude from project reference updates
  • feature: the detected VS solution folder is displayed in review
  • feature: the detected git version is displayed in review
  • bugfix: when called with unnamed arguments, old project name now is understood to come before new project name (before it was the wrong way round)
  • bugfix: VS solution folders containing spaces don't crash the tool anymore

2.0.0:

  • breaking change: instead of asking the user interactively, behavior is now controlled via commandline switches

1.0.1:

  • bugfix: if a project is not in a solution folder, the tools works now, too
  • bugfix: if a required tool like git cannot be found, give a proper error message

1.0.0: initial release

Use it

You use it from the command line, in the directory of your solution:

renameproject <oldProjectName> <newProjectName>

The project names include neither path nor extension (.csproj). renameproject will find your project just by the name, no matter how deeply it might be hidden in your directory structure. It must be linked into the solution, though.

Simple rename

Example usage:

renameproject ModernRonin.ProjectRenamer ModernRonin.RenameProject

What will happen:

  • the project file will be renamed
  • the folder of the project file will be renamed
  • renaming is done with git mv so it keeps your history intact
  • all <ProjectReference> tags in other projects in your solution referencing the project will be adjusted
  • if you use paket as a local dotnet tool (see Soft Limitations), paket install will be run, unless you specified the flag --no-paket
  • all changes will be staged in git
  • if you specified a flag --build, a dotnet build will be run just to be totally safe that everything worked well, for very cautious/diligent people :-)
  • a commit of the form Renamed <oldProjectName> to <newProjectName> will be created automatically, unless you specified a flag --no-commit

If anything goes wrong, all changes will be discarded.

Move

Since version 2.1.0, the tool also allows you to move projects. To do this, you prefix the new name with a relative folder.

Here's an example:

renameproject ModernRonin.ProjectRenamer src/ModernRonin.ProjectRenamer

If you want to move a project from somewhere in a subfolder into the root of the solution, prefix the new name with ./.

For example, to revert the change from the previous example you'd do:

renameproject ModernRonin.ProjectRenamer ./ModernRonin.ProjectRenamer --project-extension=.vbproj

Rename and Move combined

You can also move and rename in one operation like

renameproject ModernRonin.ProjectRenamer src/ModernRonin.RenameProject

However, there is a caveat: git interprets this not as rename, but as delete and create and thus you will loose the history of your project file. Thus, I recommend to do such things in two passes.

Exclude Directory

In some situations, for example if your repository contains a separate solution with separate projects in a subdirectory, you want to exclude a directory completely from being looked at by the project reference update mechanism. In that case, you can specify that directory with the optional --exclude argument.

Use with VB projects

Since version 2.2.0, you can rename Visual Basic projects now, too, thanks to a PR from @fsbflavio:

renameproject ModernRonin.ProjectRenamer ModernRonin.RenameProject --project

Help

For details about available arguments and flags/options and some example calls, you can also use

renameproject help

to get help about the available flags.

Limitations

renameproject has a few limitations. Some of them are hard limitations, meaning they are unlikely to go away, others are soft limitations, meaning they exist only because I simply have not gotten round to fix them yet. I
do not really have a lot of free time to spend on this, but am totally open to PRs (hint hint).

Hard Limitations

  • Your local repository copy must be clean. This is to ensure that in case we have to discard changes, we don't discard anything you wouldn't want discarded, by accident. If renameproject detects uncommitted changes, added files or the like, it will abort its operation.
  • the tool won't adjust your namespaces - just use R# for this.
  • I have not tested this with old-style, pre-SDK csproj projects and I very likely never will

Soft Limitations

  • you cannot have more than one solution file or the solution file in another location than the current directory - could be turned into an optional command-line argument in the future
  • you cannot use this without git - the git-aspects could be made optional via a command-line flag in the future
  • you cannot use this with projects of other types than csproj or "vbproj"; you can try to use it with for example fsproj, but there has been no testing this of any kind
  • the detection of whether the local repo is clean might throw false positives in some cases
  • you cannot use wildcards, like renameproject ModernRonin.CommonServices.* ModernRonin.Common.Services.* - this would be very handy for the wide-spread convention to have an accompanying *.Tests project
  • you need to manually update the tool with dotnet tool update -g ModernRonin.ProjectRenamer and you need to come here to check whether there is a new version (or check nuget)
  • if you use paket as a global tool instead of as a local tool, paket support will fail currently - you should really switch to using paket as a local tool, if you can. but on the other hand, in the future renameproject might just become smarter about this using a combination of checking whether there is paket in the PATH and the presence of dotnet-tools.json and whether it contains an entry for paket

License

The license is Creative Commons BY-SA 4.0. In essence this means you are free to use and distribute and change this tool however you see fit, as long as you provide a link to the license and share any customizations/changes you might perform under the same license.

projectrenamer's People

Contributors

jakubmaguza avatar mariojespada avatar modernronin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

projectrenamer's Issues

Unhandled exception. InvalidProjectFileException: SolutionParseNestedProjectError

Unhandled exception. Microsoft.Build.Exceptions.InvalidProjectFileException: SolutionParseNestedProjectError  C:\Users\gary.cass\source\repos\LOBO\LOBO.sln
   at Microsoft.Build.Shared.ProjectFileErrorUtilities.VerifyThrowInvalidProjectFile(Boolean condition, String errorSubCategoryResourceName, BuildEventFileInfo projectFile, Exception innerException, String resourceName, Object[] args)
   at Microsoft.Build.Shared.ProjectFileErrorUtilities.VerifyThrowInvalidProjectFile(Boolean condition, String errorSubCategoryResourceName, BuildEventFileInfo projectFile, String resourceName, Object[] args)
   at Microsoft.Build.Construction.ProjectInSolution.GetUniqueProjectName()
   at Microsoft.Build.Construction.SolutionFile.ParseSolution()
   at Microsoft.Build.Construction.SolutionFile.ParseSolutionFile()
   at Microsoft.Build.Construction.SolutionFile.Parse(String solutionFile)
   at ModernRonin.ProjectRenamer.Application.<>c__DisplayClass3_0.<Run>g__findProject|17() in C:\Projects\Github\ProjectRenaming\ModernRonin.ProjectRenamer\Application.cs:line 204
   at ModernRonin.ProjectRenamer.Application.Run() in C:\Projects\Github\ProjectRenaming\ModernRonin.ProjectRenamer\Application.cs:line 27
   at ModernRonin.ProjectRenamer.Program.Main(String[] args) in C:\Projects\Github\ProjectRenaming\ModernRonin.ProjectRenamer\Program.cs:line 92

Solution has four projects. Successfully used the tool to rename one, but second one fails with this error. Very simple project consisting of a number of .cs modules, some of which are in a sub-folder, but this was also the case for the successful one. There is no nested project or solution.

The .csproj file contents are as follows:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup Label="Globals">
    <SccProjectName>SAK</SccProjectName>
    <SccProvider>SAK</SccProvider>
    <SccAuxPath>SAK</SccAuxPath>
    <SccLocalPath>SAK</SccLocalPath>
  </PropertyGroup>

  <PropertyGroup>
    <TargetFramework>net5.0</TargetFramework>
    <LangVersion>9.0</LangVersion>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.Identity.Web" Version="1.8.2" />
    <PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
  </ItemGroup>

  <ItemGroup>
    <FrameworkReference Include="Microsoft.AspNetCore.App" />
  </ItemGroup>
</Project>

I am using version 2.1.2 of the tool, running on Windows 10.

Failing on Path with Whitespace

Hey there!

I saw you said you'd fixed this issue in 2.1.1, but I don't believe it's fixed based on the error I'm seeing:

Analyzing references in your projects - depending on the number of projects this can take a bit...
Unrecognized command or argument '(Griffis)\source\repos\DataWarehouse\AzureFunctions\func-inboundparsecsvs-centralus-prod\func-inboundparsecsvs-centralus-prod\func-inboundparsecsvs-centralus-prod.csproj'
call 'dotnet list C:\Users\Elliott (Griffis)\source\repos\DataWarehouse\AzureFunctions\func-inboundparsecsvs-centralus-prod\func-inboundparsecsvs-centralus-prod\func-inboundparsecsvs-centralus-prod.csproj reference' failed - aborting
...running git reset to undo any changes...

Unfortunately, my user folder has a space in it, and it looks like the path is not quoted in the call to dotnet list.

Thanks!

Issue with Solution Folders That Start with `.`

First off THANK YOU for creating this project! What a cool tool that really should be part of Visual Studio.

Everything works really well, especially the git aspect which was not something I was personally looking for but after using this I very much see why Git is a part of it.

That stated, I did run into an issue while running this on a SLN that has the target project in a solution folder that starts with ., for instance: Features/.shared

This is my output:

H:\Root>renameproject Starbeam.Features.Transactions Starbeam.Features.Transactions.Purchasing
Please review the following settings:
Project:                   Starbeam.Features.Transactions
found at:                  H:\Root\Starbeam.Features.Transactions\Starbeam.Features.Transactions.csproj
Rename to:                 Starbeam.Features.Transactions.Purchasing
at:                        H:\Root\Starbeam.Features.Transactions.Purchasing\Starbeam.Features.Transactions.Purchasing.csproj)
VS Solution folder:        Features/.shared
exclude:
Paket in use:              no
Run paket install:         yes
Run build after rename:    no
Create automatic commit:   yes
Git version:               git version 2.30.0.windows.2

-----------------------------------------------
Do you want to continue with the rename operation? [Enter=Yes, any other key=No]
Analyzing references in your projects - depending on the number of projects this can take a bit...
Project `Starbeam.Features.Transactions\Starbeam.Features.Transactions.csproj` removed from the solution.
Project reference `..\Starbeam.Features.Transactions\Starbeam.Features.Transactions.csproj` removed.
Project reference `..\Starbeam.Features.Transactions\Starbeam.Features.Transactions.csproj` removed.
Project reference `..\Starbeam.Features.Transactions\Starbeam.Features.Transactions.csproj` removed.
Project reference `..\Starbeam.Features.Transactions\Starbeam.Features.Transactions.csproj` removed.
Project reference `..\Starbeam.Features\Starbeam.Features.csproj` removed.
Reference `..\Starbeam.Features.Transactions.Purchasing\Starbeam.Features.Transactions.Purchasing.csproj` added to the project.
Reference `..\Starbeam.Features.Transactions.Purchasing\Starbeam.Features.Transactions.Purchasing.csproj` added to the project.
Reference `..\Starbeam.Features.Transactions.Purchasing\Starbeam.Features.Transactions.Purchasing.csproj` added to the project.
Reference `..\Starbeam.Features.Transactions.Purchasing\Starbeam.Features.Transactions.Purchasing.csproj` added to the project.
Reference `..\Starbeam.Features\Starbeam.Features.csproj` added to the project.
Project `Starbeam.Features.Transactions.Purchasing\Starbeam.Features.Transactions.Purchasing.csproj` added to the solution.
[temp 5d596c7] Renamed Starbeam.Features.Transactions to Starbeam.Features.Transactions.Purchasing
 11 files changed, 34 insertions(+), 35 deletions(-)
 rename {Starbeam.Features.Transactions => Starbeam.Features.Transactions.Purchasing}/Accounting/PerformAudit.cs (100%)
 rename {Starbeam.Features.Transactions => Starbeam.Features.Transactions.Purchasing}/Purchasing/DistributionValue.cs (100%)
 rename {Starbeam.Features.Transactions => Starbeam.Features.Transactions.Purchasing}/Purchasing/PurchaseOrderOwner.cs (100%)
 rename {Starbeam.Features.Transactions => Starbeam.Features.Transactions.Purchasing}/Registrations.cs (100%)
 rename Starbeam.Features.Transactions/Starbeam.Features.Transactions.csproj => Starbeam.Features.Transactions.Purchasing/Starbeam.Features.Transactions.Purchasing.csproj (100%)
 rename {Starbeam.Features.Transactions => Starbeam.Features.Transactions.Purchasing}/TransactionDetails.cs (100%)

But this is what I see in the solution explorer in Visual Studio:

In this case it was an easy fix as the .shared folder should be a root folder so I moved all the shared projects within there to simply Features, re-ran the command, and it worked (after deleting the folders from the previous attempt, that is).

However, I do have other folders that start with the . so this might be a problem in the future at some point without some fancy naming gymnastics. :)

Anyways, thank you for your efforts here!

wrong build configuration

First off, amazing tool, very nice.

When I used it though I got a bug on the configuration file:
{xxx}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{xxx}.Debug|Any CPU.Build.0 = Debug|Any CPU
{xxx}.Release|Any CPU.ActiveCfg = Debug|Any CPU
{xxx}.Release|Any CPU.Build.0 = Debug|Any CPU

When it should be:
{xxx}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{xxx}.Debug|Any CPU.Build.0 = Debug|Any CPU
{xxx}.Release|Any CPU.ActiveCfg = Release|Any CPU
{xxx}.Release|Any CPU.Build.0 = Release|Any CPU

Rename from 'X' to 'Y' failed.

First, thanks for this awesome tool. It saved a lot of time.

I'm trying to rename a project from something like src/SomeThing.Core to src/Something.Core. This is the command I'm running in a Powershell run as admin:

> renameproject.exe SomeThing.Core Something.Core --no-commit --no-paket --no-review

But, after running the above command, the renaming fails with the next output:

Analyzing references in your projects - depending on the number of projects this can take a bit...
Project `SomeThing.Core\SomeThing.Core.csproj` removed from the solution.
Rename from 'SomeThing.Core' to 'Something.Core/SomeThing.Core' failed. Should I try again? (y/n) n
fatal: renaming 'SomeThing.Core' failed: Permission denied
call 'git mv "C:\[redacted]\SomeThing\SomeThing.Core" "C:\[redacted]\SomeThing\Something.Core"' failed - aborting
...running git reset to undo any changes...
HEAD is now at f9dd0d3 Initial commit

After googling a bit, I found this SO answer where a intermediate folder is used to move the src folder to destination. Like:

git mv src src-temp
git mv src-temp dest

Changing the gitMove method to follow that workaround seems to work. This is the gitMove method after the change:

void gitMove()
{
    _filesystem.EnsureDirectoryExists(Path.GetDirectoryName(newDir));

    var tmp = $"{oldDir}-Temp";
    _git.Move(oldDir, tmp);
    _git.Move(tmp, newDir);
    var oldPath = Path.GetFileName(oldProjectPath).ToAbsolutePath(newDir);
    if (oldPath != newProjectPath) _git.Move(oldPath, newProjectPath);
}

I'm running Git 2.29.2.windows.2

Rename failed - it also renamed the parent folders.

I have a directory structure of this:

  • targetDirectory/mySolution.sln
  • targetDirectory/LibMain/lib/MyProject.RemoveThis.csproj

When I perform the project rename command:

renamproject MyProject.RemoveThis MyProject

It completes successfully... However the issue is that it also renames the parent directory:

  • targetDirectory/LibMain/MyProject/MyProject.csproj

The lib parent directory is changed to the name of the project, which in this case is MyProject

Current:

  • Original Path: * targetDirectory/LibMain/lib/MyProject.RemoveThis.csproj
  • After Rename Path: * targetDirectory/LibMain/MyProject/MyProject.csproj

Expected:

  • Original Path: * targetDirectory/LibMain/lib/MyProject.RemoveThis.csproj
  • After Rename Path: * targetDirectory/LibMain/lib/MyProject.csproj

Thanks

Moving a project fails if the project imports msbuild files other than paket.restore.targets

Say the csproj contains something like

<Import Project="..\..\package.props" />

When the project is moved (not just renamed), then this relative path needs adjusting. This isn't currently happening, so the move fails, albeit safely (no changes).

Seeing as we already adjust such paths for imports of paket, it should be fairly simple to extend that code to cover all <Import Project...> directives.

Unable to install in VS 2022 .NET 7

+ CategoryInfo          : NotSpecified: (The tool package could not be restored.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError

Tool 'modernronin.projectrenamer' failed to install. This failure may have been caused by:

  • You are attempting to install a preview release and did not use the --version option to specify the version.
  • A package by this name was found, but it was not a .NET tool.
  • The required NuGet feed cannot be accessed, perhaps because of an Internet connection problem.
  • You mistyped the name of the tool.

For more reasons, including package naming enforcement, visit https://aka.ms/failure-installing-tool

unexpected folder structure - at: value

Current folder structure:

|--[csharp]
   |--csharp.sln
   |--[KombiN]
      |--KombiN.csproj
   |--[KombiN.Tests]
      |--KombiN.Tests.csproj

compare the "at:" value for below commands

[user@ws csharp]$ renameproject KombiN kombin
Please review the following settings:
Project:                   KombiN
found at:                  /home/user/libs/KombiN/csharp/KombiN\KombiN.csproj
Rename to:                 kombin
at:                        /home/user/libs/KombiN/kombin/kombin.csproj)
VS Solution folder:        none
exclude:                   
Paket in use:              no
Run paket install:         yes
Run build after rename:    no
Create automatic commit:   yes
Git version:               git version 2.29.2
[user@ws csharp]$ renameproject KombiN ./kombin
Please review the following settings:
Project:                   KombiN
found at:                  /home/user/libs/KombiN/csharp/KombiN\KombiN.csproj
Rename to:                 kombin
at:                        /home/user/libs/KombiN/csharp/kombin/kombin.csproj)
VS Solution folder:        none
exclude:                   
Paket in use:              no
Run paket install:         yes
Run build after rename:    no
Create automatic commit:   yes
Git version:               git version 2.29.2

my expectation here was that regardless of the folder structure, it will rename it were old one was found.

Unhandled exception. System.ComponentModel.Win32Exception (2): The system cannot find the file specified.

When trying to rename a project I get the error above.

Stack trace:

Unhandled exception. System.ComponentModel.Win32Exception (2): The system cannot find the file specified.
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
at ModernRonin.ProjectRenamer.Program.RunTool(String tool, String arguments, Action onNonZeroExitCode) in C:\Projects\Github\ProjectRenaming\ModernRonin.ProjectRenamer\Program.cs:line 185
at ModernRonin.ProjectRenamer.Program.g__run|3_0(String arguments) in C:\Projects\Github\ProjectRenaming\ModernRonin.ProjectRenamer\Program.cs:line 44
at ModernRonin.ProjectRenamer.Program.EnsureGitIsClean() in C:\Projects\Github\ProjectRenaming\ModernRonin.ProjectRenamer\Program.cs:line 39
at ModernRonin.ProjectRenamer.Program.Main(String[] args) in C:\Projects\Github\ProjectRenaming\ModernRonin.ProjectRenamer\Program.cs:line 32

No support for white spaces in project directory

Hello and thank you for this tool, I love it.

I did encounter a problem with a dotnet list command though, because there was white space in a folder name. I could workaround the issue by moving my project to a temp folder without white space in its name.

image

Hope this helps.

Upgrade to supported .NET

I seems that the only real supported .NET (core) version is a bit old.

image

recommend to update, at least to .NET 6, but maybe to .NET 6 + .NET 8 would be nice (.NET 7 is almost out of support)

Failed with missing Framework

Using VS2022, 17.9.2,

  • Created ConsoleApp1 targeting NET Core 8
  • Closed VS2022
  • From solution folder in a terminal used renameproject ConsoleApp1 KarenApp1

Project file

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net8.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
  </PropertyGroup>

</Project>

Error

PS C:\DotnetLand\SomeSolution> renameproject ConsoleApp1 KarenApp1
You must install or update .NET to run this application.

App: C:\Users\paynek\.dotnet\tools\renameproject.exe
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '3.1.0' (x64)
.NET location: C:\Program Files\dotnet\

The following frameworks were found:
  5.0.17 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  6.0.7 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  6.0.23 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  6.0.26 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  6.0.27 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  7.0.16 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  8.0.1 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  8.0.2 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

Learn more:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=3.1.0&arch=x64&rid=win-x64&os=win10

Error: Could not find project or directory because of wrong file path construction

[user@ws csharp]$ renameproject KombiN ./kombin
Please review the following settings:
Project:                   KombiN
found at:                  /home/user/libs/KombiN/csharp/KombiN\KombiN.csproj
Rename to:                 kombin
at:                        /home/user/libs/KombiN/csharp/kombin/kombin.csproj)
VS Solution folder:        none
exclude:                   
Paket in use:              no
Run paket install:         yes
Run build after rename:    no
Create automatic commit:   yes
Git version:               git version 2.29.2

-----------------------------------------------
Do you want to continue with the rename operation? [Enter=Yes, any other key=No]
Analyzing references in your projects - depending on the number of projects this can take a bit...
Could not find project or directory `/home/user/libs/KombiN/csharp/KombiN\KombiN.csproj`.
call 'dotnet list "/home/user/libs/KombiN/csharp/KombiN\KombiN.csproj" reference' failed - aborting
...running git reset to undo any changes...
HEAD is now at a8e168e changed xml doc and rename test file
$ dotnet --info
.NET SDK (reflecting any global.json):
 Version:   5.0.102
 Commit:    71365b4d42

Runtime Environment:
 OS Name:     fedora
 OS Version:  33
 OS Platform: Linux
 RID:         fedora.33-x64
 Base Path:   /usr/lib64/dotnet/sdk/5.0.102/

Host (useful for support):
  Version: 5.0.2
  Commit:  cb5f173b96

.NET SDKs installed:
  3.1.111 [/usr/lib64/dotnet/sdk]
  5.0.102 [/usr/lib64/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 3.1.11 [/usr/lib64/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.2 [/usr/lib64/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.11 [/usr/lib64/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.2 [/usr/lib64/dotnet/shared/Microsoft.NETCore.App]

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.