-
Notifications
You must be signed in to change notification settings - Fork 255
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
Overwriting cs files in folder while folder is source of csproj in vs2017 RTM makes nuget restore fail on build #4846
Comments
From @FransBouma on March 10, 2017 10:1 Additional info: once the sln is loaded from disk in a new vs2017 session, I can't reproduce the problem. So my guess is that this is related to some state being wrong when the sln is created (and saved), projects are added and then modified outside vs2017. Might be related to the issue I reported yesterday: #1717 |
From @emgarten on March 10, 2017 16:46 @FransBouma the message looks scary but you can ignore it, NuGet will retry when the project details are loaded and restore everything. @davkean yes looks like the same issue, you can probably close this one out |
From @FransBouma on March 10, 2017 18:19
But that never happens unless the sln is re-loaded. So although it might retry, it will never actually work: only reloading the solution works. I agree though that it looks like the same issue, which IMHO all come from a bug somewhere in the initialization of the internal datastructures, as the problems are gone when the sln is reloaded, but are present when the sln is created, saved but not reloaded. |
From @emgarten on March 10, 2017 18:53
Even after waiting the project isn't restored? |
From @FransBouma on March 10, 2017 20:45 Indeed, it stays this way. I tried numerous things for 5-10 minutes, nothing. Restarted vs2017 and reloaded the solution and that sorted it. it's not an error that you see due to some data that's not available yet and will be gone in a few seconds or so, it's not solvable unless the solution is reloaded. |
From @emgarten on March 10, 2017 21:23 @FransBouma thanks for the details, sounds like you are hitting more than just the timing issues. If it does work to reload everything then the solution/projects are likely correct. It sounds like this is just an issue with restore. Does right clicking on the solution and selecting restore help when you hit this? |
From @FransBouma on March 10, 2017 21:50
I will try that tomorrow and see what the outcome is :) |
From @FransBouma on March 11, 2017 9:15 I can't reproduce it now... very strange! And not very good of course, as it might pop up later. Anyway, let's chalk this up for the restore issue already known then. I have no other explanation. Is issue #1717 also caused by the same issue? |
@davkean if the project isn't found even after waiting as @FransBouma described it likely means that it wasn't nominated and NuGet cannot find it for that reason. |
Closing based on the previous conversation, if you are still hitting this please provide additional repro steps. Thanks! |
From @FransBouma on March 10, 2017 9:57
Hi,
I have two .net standard 1.6 class libraries in one solution, with the following contents:
AW.Model.csproj
They're in their own folders, Model for the first, Persistence for the second. Both folders contain .cs files, all being generated.
Now I re-generate the code files in the two folders while I have the two csproj files open in a solution (and no other projects) in vs2017 RTM. The csproj files are overwritten with the same contents (so are the other files).
When I now try to build, I get the error:
Error occurred while restoring NuGet packages: The operation failed as details for project AW.Persistence could not be loaded.
Log of MSBuild in vs2017 on rebuild with detail level 'normal'
This is strange as the project is loaded properly, I can navigate the references in solution explorer as well and builds go fine. Closing / reopening VS2017 and reloading the solution file fixes the problem.
Copied from original issue: dotnet/project-system#1725
The text was updated successfully, but these errors were encountered: