Git Product home page Git Product logo

Comments (6)

SimonCropp avatar SimonCropp commented on September 25, 2024

can u do a purge of the nuget cache prior to doing a build? i have a suspicion as to the problem and if the purge works i know how to fix it

from obsolete.

bording avatar bording commented on September 25, 2024

I was about to do the purge, but it appears that things are passing now for some reason. Looking at a build log from a passing build, I think I see what's happening.

From the failing build:

[22:37:39][Fody.WeavingTask]   Fody:     Fody weaver file added 'C:\Users\buildagent\.nuget\packages\obsolete.fody\4.1.0\Obsolete.Fody.dll'
[22:37:39][Fody.WeavingTask]   Fody:     Fody weaver file added 'C:\Users\buildagent\.nuget\packages\obsolete.fody\4.2.2\Obsolete.Fody.dll'
[22:37:39][Fody.WeavingTask]   Fody:     Fody weaver file added 'C:\Users\buildagent\.nuget\packages\obsolete.fody\4.3.7\netclassicweaver\Obsolete.Fody.dll'
...
[22:37:39][Fody.WeavingTask]   Fody: Found debug symbols at 'C:\BuildAgent\work\f572a372d5976361\src\NServiceBus.AmazonSQS\obj\Release\netstandard2.0\NServiceBus.AmazonSQS.pdb'.
[22:37:39][Fody.WeavingTask]   Fody: Weaver 'C:\Users\buildagent\.nuget\packages\obsolete.fody\4.2.2\Obsolete.Fody.dll'.
[22:37:39][Fody.WeavingTask]   Fody:   Initializing weaver
[22:37:39][Fody.WeavingTask]   Fody:   Loading 'C:\Users\buildagent\.nuget\packages\obsolete.fody\4.2.2\Obsolete.Fody.dll' from cache.
[22:37:39][Fody.WeavingTask]     Fody/Obsolete:   Executing Weaver 

From the passing build:

[17:43:36][Fody.WeavingTask]   Fody:     Fody weaver file added 'C:\Users\buildagent\.nuget\packages\obsolete.fody\3.1.0\Obsolete.Fody.dll'
[17:43:36][Fody.WeavingTask]   Fody:     Fody weaver file added 'C:\Users\buildagent\.nuget\packages\obsolete.fody\4.0.3\Obsolete.Fody.dll'
[17:43:36][Fody.WeavingTask]   Fody:     Fody weaver file added 'C:\Users\buildagent\.nuget\packages\obsolete.fody\4.0.4\Obsolete.Fody.dll'
[17:43:36][Fody.WeavingTask]   Fody:     Fody weaver file added 'C:\Users\buildagent\.nuget\packages\obsolete.fody\4.1.0\Obsolete.Fody.dll'
[17:43:36][Fody.WeavingTask]   Fody:     Fody weaver file added 'C:\Users\buildagent\.nuget\packages\obsolete.fody\4.2.2\Obsolete.Fody.dll'
[17:43:36][Fody.WeavingTask]   Fody:     Fody weaver file added 'C:\Users\buildagent\.nuget\packages\obsolete.fody\4.3.2\Obsolete.Fody.dll'
[17:43:36][Fody.WeavingTask]   Fody:     Fody weaver file added 'C:\Users\buildagent\.nuget\packages\obsolete.fody\4.3.7\netclassicweaver\Obsolete.Fody.dll'
...
[17:43:36][Fody.WeavingTask]   Fody: Found debug symbols at 'C:\BuildAgent\work\f572a372d5976361\src\NServiceBus.AmazonSQS\obj\Release\netstandard2.0\NServiceBus.AmazonSQS.pdb'.
[17:43:37][Fody.WeavingTask]   Fody: Weaver 'C:\Users\buildagent\.nuget\packages\obsolete.fody\4.3.2\Obsolete.Fody.dll'.
[17:43:37][Fody.WeavingTask]   Fody:   Initializing weaver
[17:43:37][Fody.WeavingTask]   Fody:   Loading 'C:\Users\buildagent\.nuget\packages\obsolete.fody\4.3.2\Obsolete.Fody.dll' from cache.
[17:43:37][Fody.WeavingTask]     Fody/Obsolete:   Executing Weaver 
[17:43:37][Fody.WeavingTask]     Fody/Obsolete:   	Removing reference to 'Obsolete.dll'.
[17:43:37][Fody.WeavingTask]     Fody/Obsolete:   Finished 'Obsolete' in 5ms 

In both cases, it's picking the wrong version of the weaver assembly. I've got 4.3.7 installed.

from obsolete.

SimonCropp avatar SimonCropp commented on September 25, 2024

can u try fody 2.4.5

from obsolete.

bording avatar bording commented on September 25, 2024

@SimonCropp That does seem to allow it to find the correct version of the weaver assembly because it's now finding the file in the PackageDefinitions section instead of falling back to scanning the "the MsBuildThisFileDirectory parent" folder.

However, what if it did need to fall back to that folder for some reason? Why was the correct version not being chosen from that folder? It doesn't seem reasonable to expect that the NuGet cache folder is only going to have a single version of the weaver assembly in it.

from obsolete.

SimonCropp avatar SimonCropp commented on September 25, 2024

The parent folder logic is legacy from when packages existed in the solution dir. moving forward the correct package versions are passed via msbuild, ie when using the new sdk project msbuild style. The fact that you regressed to the legacy seems to be due to an incorrect assumption on my part as to the logic of then to ise the new sdk approch. I assmed a prop would always exist. But the fact that it broke now is strange, i smoke tested it when released, but it consistently failes for me now. So perhaps it was a breaking change in an undocumented behaviour of msbuild

I will wire up some periodic builds to prevent a regression

from obsolete.

bording avatar bording commented on September 25, 2024

The parent folder logic is legacy from when packages existed in the solution dir. moving forward the correct package versions are passed via msbuild,

Cool. That works for me! Sounds like this is fixed then.

from obsolete.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.