0

I am trying to use Fody.PropertyChanged on my project, so I have added [ImplementPropertyChanged] to my class.
It all works fine in local, on my dev machine.

However, when decompiling the TFS-generated binaries, I find that they are not weaved: they still have the Fody attributes.

The FodyWeavers.xml has the veaver:

<Weavers>
  <PropertyChanged />
</Weavers>

Where do I look, and what do I look at, to find out why my assemblies are not weaved?

Thanks!

thomasb
  • 5,209
  • 4
  • 57
  • 83
  • Did you add your final solution in the update? Suggest you to create an answer . This will also make answer searching in the forum easier and be beneficial to other community members as well. – PatrickLu-MSFT Jan 12 '16 at 04:06
  • You're right. I hoped that someone would come up with a better answer, but alas... – thomasb Jan 12 '16 at 08:44

1 Answers1

0

I have managed to weave the assemblies this way :

I have copied the contents of packages\Fody.xx\ into Assemblies\Fody\

I then have modified the .csproj to point to the copied .targets file (towards the end of the .csproj) :

<Import Project="$(SolutionDir)\Assemblies\Fody\build\dotnet\Fody.targets" Condition="Exists('$(SolutionDir)\Assemblies\Fody\build\dotnet\Fody.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)\Assemblies\Fody\build\dotnet\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\Assemblies\Fody\build\dotnet\Fody.targets'))" />
</Target>

I suspect that the TFS maintainers are downloading the Nuget packages in another folder (for instance to have only one copy of all the Nuget packages for all projects), which would mean that this kind of package cannot work the regular way.

thomasb
  • 5,209
  • 4
  • 57
  • 83