How to remove PropertyChanged.Fody correctly through NuGet

I intended to use Fody.PropertyChanged in one of my projects and was correctly added via NuGet:

Install-Package PropertyChanged.Fody 

I realized that this was a wrong project, so I used the delete command:

 Uninstall-Package PropertyChanged.Fody 

After that I added it to the corresponding project.

Now, when I try to create my solution, I get the following error in the original project, which Fody should not have installed:

Fody: It seems you haven't tuned the weavers. Try adding the Fody nuget package for your project. Have a look here http://nuget.org/packages?q=fody for a list of available packages.

There is no Fody link in the project, I deleted the Fody link from the packages.config file and the XML file is missing.

What else should I do?

+5
source share
4 answers

You also need

 Uninstall-Package Fody 
+5
source

I think you recently updated the Fody library? When he asked to replace the existing "FodyWeavers.xml", you may have allowed it. If you have a backup of the project, select "FodyWeavers.xml" and replace it with a new one. Clean and reinstall the solution.

+1
source

Delete "FodyWeavers.xml" and open the project file using NotePad or notePad ++ and delete the following lines

 <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Import Project="..\packages\Fody.1.29.2\build\portable-net+sl+win+wpa+wp\Fody.targets" Condition="Exists('..\packages\Fody.1.29.2\build\portable-net+sl+win+wpa+wp\Fody.targets')" /> 
+1
source

This does not apply specifically to a project in which you do not want Fody, but sometimes VS gives undefined / odd errors.

I just went through a similar problem after installing PropertyChanged.Fody for the first time and could not build right after turning it on and linking to it ... I wonder if any of these details will help from my experience (making sure these points exist in the project you want to include lib in).

  • Make sure you have the following links in your packages.config when you run Install-Package PropertyChanged.Fody :
 <package id="Fody" version="1.24.0" targetFramework="net45" developmentDependency="true" /> <package id="PropertyChanged.Fody" version="1.49.0" targetFramework="net45" developmentDependency="true" /> 
  1. Make sure at the top level of the project you want to use FodyWeavers.xml .

  2. FodyWeavers.xml should look like this (I had to add <PropertyChanged /> to mine)

 <?xml version="1.0" encoding="utf-8" ?> <Weavers> <PropertyChanged /> </Weavers> 
0
source

Source: https://habr.com/ru/post/1214064/


All Articles