Dependency problems after update nuget packages of a VISX project

末鹿安然 提交于 2019-12-11 05:30:45

问题


I'm creating a VISX project. It runs normally, but after I update all it's nuget packages, it start to show errors when I try to run it in the Visual Studio Experimental Instance.

I tried to revert the packages, but it seems that some packages versions are no longer available for download.

The main reason is that the VISX can't load the Microsoft.VisualStudio.Threading assembly after the dependecies are updated.

I tried adding the assembly to the package's Assets too. The VISX can load it now, but can't find the following method in the AsyncPackage class, like it would be loading the wrong assembly version.

JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);

There's also the same error (assembly not found) for the Newtonsoft.Json dependency.

Can someone help me with this?


I zipped everything and upload in my onedrive: https://1drv.ms/u/s!AmhLdtS8gKjrl71Vmnp85m4ZPUILgw

I included all packages, since there's a chance that who download the project could not execute it because the packages could not be downloaded from nuget.org.

To simulate the error, just update the dependencies.


Update 1

As suggested, I was able to redo the entire project using "package reference" to target dependencies.

The visx builds and work, but the problem with the dependency for Newtonsoft.Json still occurs. Also, I tried adding another dependency from a nuget package that I created, and the same error occurs too.

I wrote a piece of code that uses JsonConvert just to make use of the dependency. When I execute the "TestCommand" from VS Experimental instance, them the error popups.

Link for the second project in my onedrive: https://1drv.ms/u/s!AmhLdtS8gKjrl71ZCd1WIYNDTZaSCw

来源:https://stackoverflow.com/questions/50808935/dependency-problems-after-update-nuget-packages-of-a-visx-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!