Comments (13)
Hi,
I don't think I understand your problem completely.
Can you please give more detail?
Cheers,
Steffen
from fake.
I've splittet AssemblyInfo.cs into two parts: AssemblyInfo.cs (with informations about each project) and VersionInfo.cs (global version information in src). Because the GUID (and all the bool flags like ComVisible) depend on the project, they would be defined twice, when Fake generates them for me.
GUID can probably be overwritten by an empty string within build.fsx, but ComVisible not. And it doesn't feel right to declare it globally, does it?
from fake.
There is a ReplaceAssemblyInfoVersions task. Does this help?
from fake.
I don't think so. When I use an empty Guid, it should not write it into the version info. I changed the behaviour of Fake to leave it empty by default. It would be left to discuss if this is ok or leads to problems.
But it does not help for the boolean values, as they are true/false - I cannot blank them afterwards, so they are written always.
from fake.
I think a possible solution would be making all fields in AssemblyInfoParams options, e.g. GenerateClass: bool option.
Then the task would only generate output for the fields that are Some x.
Of course, it's a breaking change...
from fake.
Suggestion: can't the flags changed into nullable bools? And can they set to null by default, and they have to be set when they should be written? Still a breaking change, but...
from fake.
@Slesa yup, that's precisely what I was suggesting... F# devs prefer options to nullable types as they're more general.
from fake.
@mausch I should have read the stackoverflow article more attentively, sorry :-)
from fake.
Ok now I understand it.
Actually I think options would be a good solution. The breaking change is not that big since most scripts don't change the defaults. At least none of my 50 scripts. ;-)
from fake.
what do you think? is this enough?
from fake.
Looks cool, thank you very much. I will try it, but it should work this way.
from fake.
I had to change the GUID again, because this breaks all my scripts ;-) Sorry.
But you should still be able to opt out by overwriting the Guid with string.empty.
from fake.
Works great
from fake.
Related Issues (20)
- Update to .NET 7 HOT 9
- 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
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.