Closed aliostad closed 6 years ago
There's project.assets.json file in the obj directory that I believe is triggering this. Was this project ever a .NET Core project at one point in history? Or did it contain a <TargetFramework>
property ever at one point?
Thanks for fast response! Well, I have been playing around trying to figure out best approach, or it could have been left from the other branch which will be .NET Standard. Most possibly the latter, I wouldn't normally mess around with master
.
Yeah that's the problem, we need to think we would handle this case. I suspect we'd run into the same issue when switching between branches for a legacy project that had opt'd into <PackageReference/>
and one that hadn't.
Good to hear. At least now I know how to resolve, I hope you fix it since it can be very annoying. Thanks for your help 👍
Also, the question is why "Clean Solution", did not remove these. I at least cleaned the solution like 10 times. I would expect obj folder to go.
I have a repro of what looks like the same issue here. A newly-created Framework 4.5 project gives the same NuGet restore error on load, and fails to build, when it's adjacent to a netstandard2.0 project.
I can only repro this in VS, as such, I will move this issue to be further investigated in the dotnet/project-system repo.
This issue was moved to dotnet/project-system#3164
So this is the context of the conversation, where @davkean advised me to create this issue.
I had started porting PerfIt to .NET Standard in a different branch and it seems something makes VS 2017 to think it is .NET Core.
I have changed
ToolsVersion
to 12.0, 14.0 and 15.0 to no avail. I cloned the project in a clean location and VS 2017 had no issue so it seems something in my working folder that does this. I also rangit clean -d -f
and no difference.So I think in order to reproduce, I have to share with you my environment which is zipped in the file below. As for me, I will clean up and start again but I hope you get to the bottom of this since it was utterly annoying and wasted 6-7 hours (I started reducing project to one project and compare with other projects that work). Thanks in advance.
Anyway here is the file https://drive.google.com/file/d/0By4PF7Jis9FzNHVMR21KTjJZY3M/view?usp=sharing
Here is the full output from the build: