Comments (3)
I don't think this is enough... How do you know from the FAKE script which dependencies are 4.0 and need to be replaced by equivalent 3.5 ones? IMHO the only way to do this is "manually" (or at least this part), i.e. the developer has to mark the necessary references as 4.0-only and also add the replacements to be used for the 3.5 build (or Silverlight build, or Mono build, etc).
The best solution for multitargeting I've seen is Castle's (see Windsor.csproj), it just uses multiple MSBuild configurations, each with its own output path and constants defined for ifdeffing, and references with conditions to exclude/include them. This also has the benefit that you can easily choose the configuration (therefore target) right from Visual Studio. So in this case, all the pieces are already there... no need for any specific FAKE task, just set the desired Configuration, or if you want iterate through a list of available Configurations.
from fake.
Mauricio's suggestion works for me. I could use a course on setting up configurations. :)
from fake.
Just reread this and on second thought, it should be possible to iterate through the project references, fetch the framework version from their assembly metadata (or project target in the case of a project reference) and XML-poke as you said, using some sort of convention for the location of the equivalent assemblies (e.g. NuGet's convention of NET20, NET35, NET40, etc).
Though there are probably some pitfalls with this... and I still think handling this at the msbuild level is better.
from fake.
Related Issues (20)
- Could not find a suitable .NET 6 runtime version matching SDK version: 7.0.100 HOT 32
- DotNet.publish fails attempting to load Microsoft.Build.Framework, Version=15.1.0.0 HOT 5
- Jsjsks HOT 1
- `StringBuilder.appendQuotedIfNotNull` is used incorrectly. HOT 4
- Documentation: Fileformat for Releasenotes not rendered correctly HOT 3
- dotnet local tool fails when run via FAKE, but succeeds when run via command line HOT 8
- Fake.DotNet.Fsdocs watch command missing arguments. HOT 2
- MSBuild.build adds a bad string at the end of properties HOT 3
- Update MSBuild.StructuredLogger to latest HOT 13
- Why is the launch property not being passed into the `dotnet run` correctly? HOT 3
- Unsupported log file format. Latest supported version is 14, the log file has version 16. HOT 6
- Fake 6.0 is not working when SDK 6 and SDK 7 are installed HOT 8
- msbuild parameter add code in command line HOT 2
- Use of multiple items in DefineConstants is escaped HOT 1
- Why `version` must be present in `global.json` if you don't require it HOT 2
- Update maintainer list on the main page
- Project evolution and maintaining HOT 4
- Security warnings about usage of NuGet.Protocol v6.0 HOT 5
- https://www.nuget.org/packages/FAKE points to wrong url regarding migration guide HOT 6
- `Starting processes` documentation doesn't explain how to resolve paths
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 fake.