question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fody mscorlib not found on .NETStandard project

See original GitHub issue

Hello,

I am using Fody with AsyncErrorHandler.Fody and PropertyChanged.Fody in a PCL project which targets .NETStandard1.1.

When building I get the error that Fody cannot find mscorlib. Here the full stack trace: 1>FodyTarget: 1> Fody: Fody (version 1.29.4.0) Executing 1> Fody: ProjectDirectory: 'C:\Projects\ProjectLocation\Portable\ProjectName\'. 1> Fody: AssemblyPath: 'C:\Projects\ProjectLocation\Portable\ProjectName\obj\Debug\ProjectName.dll' 1> Fody: Found path to weavers file 'C:\Projects\ProjectLocation\Portable\ProjectName\FodyWeavers.xml'. 1> Fody: SolutionDirectory path is 'C:\Projects\ProjectLocation\' 1> Fody: Finding weavers 1> Fody: Adding weaver dlls from 'C:\Projects\ProjectLocation\Packages'. 1> Fody: Could not find packages dir from nuget config. 1> Fody: SolutionDirectoryPath: C:\Projects\ProjectLocation\ 1> Fody: Adding weaver dlls from 'C:\Users\username\.nuget\packages\Fody'. 1> Fody: SolutionDirectoryPath: C:\Projects\ProjectLocation\ 1> Fody: Skipped scanning 'C:\Projects\ProjectLocation\Tools' for weavers since it doesn't exist. 1> Fody: Fody weaver file added 'C:\Users\username\.nuget\packages\AsyncErrorHandler.Fody\1.0.11\AsyncErrorHandler.Fody.dll' 1> Fody: Fody weaver file added 'C:\Users\username\.nuget\packages\PropertyChanged.Fody\1.52.1\PropertyChanged.Fody.dll' 1> Fody: No Weaver project file found. 1> Fody: Finished finding weavers 5ms 1> Fody: Reference count=57 1> Fody: Found debug symbols at 'C:\Projects\ProjectLocation\Portable\ProjectName\obj\Debug\ProjectName.pdb'. 1> Fody: Weaver 'C:\Users\username\.nuget\packages\PropertyChanged.Fody\1.52.1\PropertyChanged.Fody.dll'. 1> Fody: Initializing weaver 1> Fody: Loading 'C:\Users\username\.nuget\packages\PropertyChanged.Fody\1.52.1\PropertyChanged.Fody.dll' from cache. 1> Fody: Weaver 'C:\Users\username\.nuget\packages\AsyncErrorHandler.Fody\1.0.11\AsyncErrorHandler.Fody.dll'. 1> Fody: Initializing weaver 1> Fody: Loading 'C:\Users\username\.nuget\packages\AsyncErrorHandler.Fody\1.0.11\AsyncErrorHandler.Fody.dll' from cache. 1> Fody/PropertyChanged: Executing Weaver 1> Fody/PropertyChanged: Can not find 'mscorlib, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. 1> Tried: 1> C:\Users\username\.nuget\packages\Acr.UserDialogs\6.3.2\lib\portable-win+net45+wp8+win8+wpa81\Acr.UserDialogs.dll 1> C:\Users\username\.nuget\packages\Acr.UserDialogs\6.3.2\lib\portable-win+net45+wp8+win8+wpa81\Acr.UserDialogs.Interface.dll 1> C:\Users\username\.nuget\packages\akavache.core\5.0.0\lib\Portable-Net45+Win8+WP8+Wpa81\Akavache.dll 1> C:\Users\username\.nuget\packages\Akavache.SQLite3\5.0.0\lib\Portable-Net45+Win8+WP8+Wpa81\Akavache.Sqlite3.dll 1> C:\Users\username\.nuget\packages\Autofac\4.2.1\lib\netstandard1.1\Autofac.dll 1> C:\Users\username\.nuget\packages\fusillade\0.7.0\lib\Portable-net45+win+wpa81+wp80\Fusillade.dll 1> C:\Users\username\.nuget\packages\Microsoft.CSharp\4.0.1\ref\netstandard1.0\Microsoft.CSharp.dll 1> C:\Users\username\.nuget\packages\modernhttpclient\2.4.2\lib\Portable-Net45+WinRT45+WP8+WPA81\ModernHttpClient.dll 1> C:\Users\username\.nuget\packages\Newtonsoft.Json\9.0.1\lib\netstandard1.0\Newtonsoft.Json.dll 1> C:\Users\username\.nuget\packages\Polly\4.3.0\lib\portable-net45+netcore45+wpa81+wp8\Polly.dll 1> C:\Users\username\.nuget\packages\Punchclock\1.1.1\lib\Portable-net45+win+wpa81+wp80\Punchclock.dll 1> C:\Users\username\.nuget\packages\refit\3.0.1\lib\netstandard1.1\Refit.dll 1> C:\Users\username\.nuget\packages\Rx-Core\2.2.5\lib\portable-net45+winrt45+wp8+wpa81\System.Reactive.Core.dll 1> C:\Users\username\.nuget\packages\Rx-Interfaces\2.2.5\lib\portable-net45+winrt45+wp8+wpa81\System.Reactive.Interfaces.dll 1> C:\Users\username\.nuget\packages\Rx-Linq\2.2.5\lib\portable-net45+winrt45+wp8+wpa81\System.Reactive.Linq.dll 1> C:\Users\username\.nuget\packages\Rx-PlatformServices\2.2.5\lib\portable-net45+winrt45+wp8+wpa81\System.Reactive.PlatformServices.dll 1> C:\Users\username\.nuget\packages\Splat\1.6.2\lib\Portable-net45+win+wpa81+wp80\Splat.dll 1> C:\Users\username\.nuget\packages\SQLitePCLRaw.bundle_e_sqlite3\1.1.0\lib\netstandard1.1\SQLitePCLRaw.batteries_e_sqlite3.dll 1> C:\Users\username\.nuget\packages\SQLitePCLRaw.bundle_e_sqlite3\1.1.0\lib\netstandard1.1\SQLitePCLRaw.batteries_v2.dll 1> C:\Users\username\.nuget\packages\SQLitePCLRaw.core\1.1.0\lib\netstandard1.1\SQLitePCLRaw.core.dll 1> C:\Users\username\.nuget\packages\System.Collections.Concurrent\4.0.12\ref\netstandard1.1\System.Collections.Concurrent.dll 1> C:\Users\username\.nuget\packages\System.Collections\4.0.11\ref\netstandard1.0\System.Collections.dll 1> C:\Users\username\.nuget\packages\System.ComponentModel\4.0.1\ref\netstandard1.0\System.ComponentModel.dll 1> C:\Users\username\.nuget\packages\System.Diagnostics.Debug\4.0.11\ref\netstandard1.0\System.Diagnostics.Debug.dll 1> C:\Users\username\.nuget\packages\System.Diagnostics.Tools\4.0.1\ref\netstandard1.0\System.Diagnostics.Tools.dll 1> C:\Users\username\.nuget\packages\System.Diagnostics.Tracing\4.1.0\ref\netstandard1.1\System.Diagnostics.Tracing.dll 1> C:\Users\username\.nuget\packages\System.Dynamic.Runtime\4.0.11\ref\netstandard1.0\System.Dynamic.Runtime.dll 1> C:\Users\username\.nuget\packages\System.Globalization\4.0.11\ref\netstandard1.0\System.Globalization.dll 1> C:\Users\username\.nuget\packages\System.IO.Compression\4.1.0\ref\netstandard1.1\System.IO.Compression.dll 1> C:\Users\username\.nuget\packages\System.IO\4.1.0\ref\netstandard1.0\System.IO.dll 1> C:\Users\username\.nuget\packages\System.Linq.Expressions\4.1.0\ref\netstandard1.0\System.Linq.Expressions.dll 1> C:\Users\username\.nuget\packages\System.Linq\4.1.0\ref\netstandard1.0\System.Linq.dll 1> C:\Users\username\.nuget\packages\System.Net.Http\4.1.0\ref\netstandard1.1\System.Net.Http.dll 1> C:\Users\username\.nuget\packages\System.Net.Primitives\4.0.11\ref\netstandard1.1\System.Net.Primitives.dll 1> C:\Users\username\.nuget\packages\System.ObjectModel\4.0.12\ref\netstandard1.0\System.ObjectModel.dll 1> C:\Users\username\.nuget\packages\System.Reflection.Extensions\4.0.1\ref\netstandard1.0\System.Reflection.Extensions.dll 1> C:\Users\username\.nuget\packages\System.Reflection.Primitives\4.0.1\ref\netstandard1.0\System.Reflection.Primitives.dll 1> C:\Users\username\.nuget\packages\System.Reflection\4.1.0\ref\netstandard1.0\System.Reflection.dll 1> C:\Users\username\.nuget\packages\System.Resources.ResourceManager\4.0.1\ref\netstandard1.0\System.Resources.ResourceManager.dll 1> C:\Users\username\.nuget\packages\System.Runtime.Extensions\4.1.0\ref\netstandard1.0\System.Runtime.Extensions.dll 1> C:\Users\username\.nuget\packages\System.Runtime.InteropServices.RuntimeInformation\4.0.0\ref\netstandard1.1\System.Runtime.InteropServices.RuntimeInformation.dll 1> C:\Users\username\.nuget\packages\System.Runtime.InteropServices\4.1.0\ref\netstandard1.1\System.Runtime.InteropServices.dll 1> C:\Users\username\.nuget\packages\System.Runtime.Numerics\4.0.1\ref\netstandard1.1\System.Runtime.Numerics.dll 1> C:\Users\username\.nuget\packages\System.Runtime.Serialization.Primitives\4.1.1\ref\netstandard1.0\System.Runtime.Serialization.Primitives.dll 1> C:\Users\username\.nuget\packages\System.Runtime\4.1.0\ref\netstandard1.0\System.Runtime.dll 1> C:\Users\username\.nuget\packages\System.Text.Encoding.Extensions\4.0.11\ref\netstandard1.0\System.Text.Encoding.Extensions.dll 1> C:\Users\username\.nuget\packages\System.Text.Encoding\4.0.11\ref\netstandard1.0\System.Text.Encoding.dll 1> C:\Users\username\.nuget\packages\System.Text.RegularExpressions\4.1.0\ref\netstandard1.0\System.Text.RegularExpressions.dll 1> C:\Users\username\.nuget\packages\System.Threading.Tasks\4.0.11\ref\netstandard1.0\System.Threading.Tasks.dll 1> C:\Users\username\.nuget\packages\System.Threading\4.0.11\ref\netstandard1.0\System.Threading.dll 1> C:\Users\username\.nuget\packages\System.Xml.ReaderWriter\4.0.11\ref\netstandard1.0\System.Xml.ReaderWriter.dll 1> C:\Users\username\.nuget\packages\System.Xml.XDocument\4.0.11\ref\netstandard1.0\System.Xml.XDocument.dll 1> C:\Users\username\.nuget\packages\Xam.Plugin.Connectivity\2.2.12\lib\portable-net45+wp80+wp81+wpa81+win8+MonoAndroid10+MonoTouch10+Xamarin.iOS10+Xamarin.Mac20+UAP10\Plugin.Connectivity.Abstractions.dll 1> C:\Users\username\.nuget\packages\Xam.Plugin.Connectivity\2.2.12\lib\portable-net45+wp80+wp81+wpa81+win8+MonoAndroid10+MonoTouch10+Xamarin.iOS10+Xamarin.Mac20+UAP10\Plugin.Connectivity.dll 1> C:\Users\username\.nuget\packages\Xamarin.Forms\2.3.3.168\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.Core.dll 1> C:\Users\username\.nuget\packages\Xamarin.Forms\2.3.3.168\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.Platform.dll 1> C:\Users\username\.nuget\packages\Xamarin.Forms\2.3.3.168\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.Xaml.dll 1>MSBUILD : error : Fody: An unhandled exception occurred: 1>MSBUILD : error : Exception: 1>MSBUILD : error : Object reference not set to an instance of an object. 1>MSBUILD : error : StackTrace: 1>MSBUILD : error : at ModuleWeaver.FindCoreReferences() in C:\projects\propertychanged\PropertyChanged.Fody\MsCoreReferenceFinder.cs:line 0 1>MSBUILD : error : at ModuleWeaver.Execute() in C:\projects\propertychanged\PropertyChanged.Fody\ModuleWeaver.cs:line 26 1>MSBUILD : error : at lambda_method(Closure , Object ) 1>MSBUILD : error : at InnerWeaver.ExecuteWeavers() in C:\projects\fody\FodyIsolated\InnerWeaver.cs:line 161 1>MSBUILD : error : at InnerWeaver.Execute() in C:\projects\fody\FodyIsolated\InnerWeaver.cs:line 82 1>MSBUILD : error : Source: 1>MSBUILD : error : PropertyChanged.Fody 1>MSBUILD : error : TargetSite: 1>MSBUILD : error : Void FindCoreReferences() 1>MSBUILD : error : 1> Fody: Finished Fody 10ms.

What do I have to do to get Fody working in a .NETStandard project?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
gercobrandwijkcommented, Dec 7, 2016

I checked it, and it is available in the free version, but only up to 10 classes…

Did you already investigate what needs to be done to get it working on .NETStandard? Can I help you with converting it?

1reaction
SimonCroppcommented, Apr 24, 2017

yep PropertyChanged is high on my list for netstandard compat

Read more comments on GitHub >

github_iconTop Results From Across the Web

Class Library .NET Standard and mscorlib.dll
I need to add _Thread reference to a mscorlib.dll. Later I can't compile project, because I have error message: 'Predefined type 'System.Object' ...
Read more >
Multi-Targeting and Porting a .NET Library to .NET Core 2.0
I've been holding off porting any of my full frameworks to .NET Core. With the latest .NET Core 2.0 and .NET Standard 2.0...
Read more >
Manual: Referencing additional class library assemblies
If your project uses the .NET Standard profile, all parts of the .NET class library API are referenced by default. You can't reference...
Read more >
NET Standard
NET Standard is a formal specification of .NET APIs that are available on multiple .NET implementations. The motivation behind .
Read more >
[Code]-Prism modules : reference assembly once
In an ideal world, no module assembly contains a public type. ... Jenkins cannot build Xamarin iOS project over a missing reference to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found