DotnetRestoreAsync() threw exception ---> System.ComponentModel.Win32Exception: The directory name is invalid. #166
Replies: 8 comments
-
What happens if you manually run |
Beta Was this translation helpful? Give feedback.
-
That works fine though.
But the TestProject.sln solution is not in a separate TestProject directory, but in ..\b400f22e23b4c3694cc21ce17d795f8\ itself. So when I run dotnet restore in this folder. The TestProject.sln is restored successfully.
|
Beta Was this translation helpful? Give feedback.
-
Is this a single project template? Do you have a solution file in your template? If you can provide a link to your template, that would be helpful. |
Beta Was this translation helpful? Give feedback.
-
The tree looks like this. So on top I have a Templatepack solution with tests folder and templates folder. In for now I have only 1 template (sftemplate), but in the future that will be more. Templatepack The code we use is on a private repo in Azure Devops, so I cannot give you access. Maybe there are other ways to share to you? |
Beta Was this translation helpful? Give feedback.
-
Can I suggest, cloning the repo and copying the project into your code to debug the issue? Alternatively, you can use source link debugging too which might be simpler. |
Beta Was this translation helpful? Give feedback.
-
Good suggestion, I will check it today. In the meantime I gave you access to my private github repo. |
Beta Was this translation helpful? Give feedback.
-
Ok, I found out what happened. |
Beta Was this translation helpful? Give feedback.
-
Fixed! I had to add |
Beta Was this translation helpful? Give feedback.
-
Question
My unit test looks like this:
When I debug the test, the temporary directory is created successfully, the project is created with the correct name. But it fails at the step project.DotnetRestoreAsync();
Am I doing something wrong?
Beta Was this translation helpful? Give feedback.
All reactions