Comments (10)
@richardhauer to me this looks good, should not have any side effects.
Can you provide a PR with this change?
from fody.
it was to fix this issue #349
from fody.
i would not like to use 'DesignTimeBuildto infer
Live Unit Testing` since that would seem to be a side effect.
from fody.
While DesignTimeBuild
property does not imply LUT, the reverse is true - LUT does have the DesignTimeBuild
property set, at least, removing the condition allows Fody to work in LUT.
WRT #349 it seems that blocking Fody for all design-time builds might be too broad. There may be a more specific way to get Fody to play nicely with NServiceBus and still work for LUT. Perhaps @davkean could be drawn on this topic?
In his linked document on the subject, @davkean states that:
Targets that dynamically change references, source files or compilation options must run during design-time builds to avoid unexpected behavior in Visual Studio.
... and seeing as this is the whole job of Fody it would seem (to me) that is exactly when it should be running. In which case a deeper look at the original problem in #349 might reveal an alternative, more specific approach to addressing the issue.
from fody.
Design-Time builds don't produce binaries, Fody runs on top of a binary. Therefore cannot run in design-time builds.
from fody.
@davkean Ah ok; is there a way you might suggest we can get Fody to work in an LUT scenario without resorting to removing the And $(DesignTimeBuild) != true
condition clause? That's the real goal. There's very little information around on how the LUT system works, from what I've been able to find.
from fody.
from fody.
Righto. So update the condition to something along the lines of this?
Condition="Exists(@(IntermediateAssembly)) And ($(DesignTimeBuild) != true Or $(BuildingForLiveUnitTesting) == true) And $(DisableFody) != true"
Exclude Fody from the build chain if DesignTimeBuild
unless also BuildingForLiveUnitTesting
?
@SimonCropp I can confirm that my LUT does work when the Condition
attribute is updated as above. I suspect this will allow both the LUT case and the NServiceBus case to work, though I don't have a way to test the latter.
from fody.
@tom-englert please see PR #1037
from fody.
thanks everyone for all the help. i will deploy this now
from fody.
Related Issues (20)
- .NET hot reload issue with fody HOT 5
- Why could I not load a file or assembly or one of its dependencies? The system cannot find the file specified for Costura Fody and Xceed toolkit. HOT 2
- No warning when "PrivateAssets=All" is missing in package reference HOT 1
- AccessViolationException in Fody.WeavingTask (Build Failure MSB4166) HOT 4
- Visual Studio 2022 for Mac Preview 5 HOT 1
- Cleaned library references are not removed from the deps.json file HOT 5
- Add PrivateAssets="All" to any weaver package WinUI 3 packaged app will fail to build. HOT 2
- After updating Fody debugging is no longer possible HOT 15
- Fody Weaving skipped when Clean build initiated using msbuild HOT 2
- Allow yearly contribution HOT 2
- Update Cecil HOT 5
- FodyWeavers.xml in solution directory is not found/used HOT 7
- PropertyChanged.Fody can not run in .net 7 readytorun or aot. HOT 1
- FodyHelpers incorrect reference Mono.Cecil version. HOT 6
- FileNotFoundException when trying to use a type from another assemblu HOT 2
- "The assembly has already been processed by Fody" in nuke HOT 20
- Update Cecil
- Pdb reference in generated dll/exe not using PathMap rules HOT 4
- release Avalonia fody HOT 2
- fody is missing NuGet package README file HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fody.