Fody does not work correctly under Team Services / Azure Mobile Center
See original GitHub issueI believe the issue is in the way that Team Services runs the build (it does it by the project, not the solution). So $(SolutionDir) is not defined. What I see in the build log is this:
2017-05-17T14:41:09.4451350Z CopyRealmWeaver:
2017-05-17T14:41:09.4466560Z CopyRealmWeaver
2017-05-17T14:41:09.4481940Z Creating directory "*Undefined*Tools".
2017-05-17T14:41:09.4498440Z Copying file from "/Users/ci/agent/vstsagent/_work/1/s/packages/Realm.Database.1.2.0/build/../tools/RealmWeaver.Fody.dll" to "*Undefined*Tools/RealmWeaver.Fody.dll".
2017-05-17T14:41:09.6309300Z FodyTarget:
2017-05-17T14:41:09.6325390Z Fody: Fody (version 1.29.4.0) Executing
2017-05-17T14:41:09.6362230Z Fody: ProjectDirectory: '/Users/ci/agent/vstsagent/_work/1/s/********/'.
2017-05-17T14:41:09.6418550Z Fody: AssemblyPath: '/Users/ci/agent/vstsagent/_work/1/s/********/obj/Debug/********.dll'
2017-05-17T14:41:09.6474110Z Fody: Found path to weavers file '/Users/ci/agent/vstsagent/_work/1/s/********/FodyWeavers.xml'.
2017-05-17T14:41:09.6722100Z Fody: SolutionDirectory path is '/Users/ci/agent/vstsagent/_work/1/'
2017-05-17T14:41:09.6761710Z Fody: Finding weavers
2017-05-17T14:41:09.6901580Z Fody: Skipped scanning '/Users/ci/agent/vstsagent/_work/1/Packages' for weavers since it doesn't exist.
2017-05-17T14:41:09.6938720Z Fody: Could not find packages dir from nuget config.
2017-05-17T14:41:09.6954180Z Fody: SolutionDirectoryPath: /Users/ci/agent/vstsagent/_work/1/
2017-05-17T14:41:09.6991680Z Fody: Adding weaver dlls from '/Users/ci/agent/vstsagent/_work/1/s/packages'.
2017-05-17T14:41:09.7028760Z Fody: SolutionDirectoryPath: /Users/ci/agent/vstsagent/_work/1/
2017-05-17T14:41:09.7066460Z Fody: Skipped scanning '/Users/ci/agent/vstsagent/_work/1/Tools' for weavers since it doesn't exist.
2017-05-17T14:41:09.7103380Z Fody: No Weaver project file found.
2017-05-17T14:41:09.7141240Z MSBUILD : error : Fody: Could not find a weaver named 'RealmWeaver'. [/Users/ci/agent/vstsagent/_work/1/s/********/********.csproj]
2017-05-17T14:41:09.7179570Z MSBUILD : error : If you have nuget package restore turned on you probably need to do a build to download the weavers. [/Users/ci/agent/vstsagent/_work/1/s/********/********.csproj]
2017-05-17T14:41:09.7219890Z MSBUILD : error : Alternatively you may have added a weaver to your 'FodyWeavers.xml' and forgot to add the appropriate nuget package. [/Users/ci/agent/vstsagent/_work/1/s/********/********.csproj]
2017-05-17T14:41:09.7282900Z MSBUILD : error : Perhaps you need to run 'Install-Package RealmWeaver.Fody'. This url may provide more information http://nuget.org/packages/RealmWeaver.Fody/ . [/Users/ci/agent/vstsagent/_work/1/s/********/********.csproj]
2017-05-17T14:41:09.7321300Z Fody: Finished Fody 67ms.
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (4 by maintainers)
Top Results From Across the Web
MethodBoundaryAspect.Fody - LogAspect decoration not ...
I already tried using the "MethodBoundaryAspect.Fody" in my main project, the FodyWeavers.xml was created, but no change. Tried to change the ...
Read more >Code Repository Troubleshooting - Visual Studio App Center
When configuring a branch, I get an error message saying "no projects can be found" in my branch. Tip. The Build service has...
Read more >TF31002-Unable to connect - Azure DevOps & TFS
You receive this error when you try to connect to Azure DevOps Services. Problem, Resolution. You don't have an active account or license....
Read more >Visual Studio App Center
Quickly create high-quality apps for Android, iOS, macOS, and Windows. Automate your build, test, and distribution pipelines. And continuously monitor real-time ...
Read more >Resolve common Azure DevOps Office integration issues
Learn how to resolve common integration issues that occur with Azure DevOps Office integrations.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@SimonCropp was right in adding a
SolutionDir
property in each project. @adamcogx I was having this issue when trying to build using Mobile Center and adding Realm into my projects. You just have to put this into each csproj you are using Fody:Which allows the Realm project to copy the RealWeaver into the Tools Folder when is generated by the MSBuild. This should work with any other Fody Weaver.
Actually that issue is easily resolved by setting the SolutionDir on at the MSBuild step.
Set this: “/p:SolutionDir=Tools/” or “/p:SolutionDir=src/Tools/” on Additional Arguments in MSBuild options.