I'm trying to get Xamarin Studio to use PropertyChanged.Fody. I have Fody installed via NuGet which puts Fody.targets in its NuGet packages folder. But when I build, the output never shows that the target is run.
How can I tell Xamarin Studio to use the Fody build target?
Thanks!
I had the same issue and managed to figure out that if you remove the build\Microsoft.Bcl.Build.targets from the csproj file Fody runs as normal.
So try and remove this line.
<Import Project="..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />
As you tagged your question with monotouch, I assume you're having the issue on iOS. Until very recently, Xamarin.Studio
wasn't using xbuild (or msbuild) to build the project, and then additional targets were skipped.
Starting with Xamarin.iOS 7.9
(or more realistically 8.0
), the default is unchanged but you have the option to enable it from the project preferences :
Ignore the "unsupported" warning, but know that it's unsupported if you have any issue.
Then, provided that the nuget
correctly added a line like
<Import Project="PATH_TO/Fody.targets" />
the target should be executed.
There is an error in the Fody.targets file. Just replace
Condition="Exists(@(IntermediateAssembly))"
with
Condition="Exists('@(IntermediateAssembly)')"
and it should work again.
Find the file in .../projectfolder/packages/Fody2.x.x/build/netstandard1.4/Fody.targets
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With