-1

I cut my project and pasted it in a different folder, and now it doesn't work anymore due to it not finding the correct path (which I deliberately changed).

Now my path looks like: \source\repos\App%name%with%spaces\namespacename\solutionfile.sln,
which used to be: \source\repos\namespacename\namespacename.sln.

Basically, I put the whole project in another folder called App%name%with%spaces.

Now I get errors that they can't find the projects.assets.json file. Does anyone know a solution to this?

EDIT: The "%" in the foldername is supposed to be a space. The spaces had been automatically changed to %, so change the foldername to a name without spaces, because it is sensitive to that. E.g. change App name with spaces\namespacename\solutionfile.sln to App_name_with_underscores\namespacename\solutionfile.sln

Liweinator
  • 57
  • 7

2 Answers2

1

The problem was apparently due to the folder name having spaces in the project. This answer has been found in this thread: https://stackoverflow.com/questions/48440223/assets-file-project-assets-json-not-found-run-a-nuget-package-restore.

If this is your issue, just rename the GIT repository when you clone

git clone http://Your%20Project%20With%20Spaces newprojectname

Liweinator
  • 57
  • 7
0

Moving an entire solution folder generally does not cause problems like you are experiencing, as files and folders in your solution and project (.sln/.__proj) files are specified by relative paths.

With that out of the way, this specific error is generally fixed by running:

Tools > NuGet Package Manager > Package Manager Console:

then execute this command:

dotnet restore
mattlant
  • 15,384
  • 4
  • 34
  • 44