Closed cboseak closed 6 years ago
Lack of the .nuget folder. It's included in the solution but not in the git... Can't restore packages too. Only way to fix this issue is to restart project from scratch, add dependencies one by one and copy classes. then run. An example project shouldn't more than 2 minutes to run. Took me more than 1h to try everything before restarting from scratch...
There is a much easier solution.
Right click on project name, Unload the Project, Edit the Project file (do not change line endings if it asks) Search for 'nuget'
Comment out this block in the project file, as shown.
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
<Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" />
</Target>
-->```
Save the Project,
Reload the Project
Rebuild
Takes longer to type than to do it.
Thanks,
Eric-
Try it now, I fixed the markdown so the xml is visible
On Thu, Nov 23, 2017 at 5:15 AM, Simon Pera notifications@github.com wrote:
Hey, I have the same problem but I not understand what @caladin https://github.com/caladin would say by "Comment out this block in the project file, as shown.". Witch block must I comment?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/googleplus/gplus-quickstart-csharp/issues/21#issuecomment-346591282, or mute the thread https://github.com/notifications/unsubscribe-auth/AG5SU2RlMr_W4ovqhSMSOWX39faTREXzks5s5VPjgaJpZM4KbUda .
Caladin's solution worked fine for me, just delete the following from the .csproj:
`
`
Save and that´s it.
Thanks!
cloning into VS and running causes issues. I tried to both "update-package -reinstall" from prompt and right clicking and choosing "restore all nuget packages"