-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assembly Version not listed #49
Comments
Or maybe we can set it via cli https://stackoverflow.com/a/45426330/890736 |
Or maybe not. dotnet/fsharp#3113 Might need to just use FAKE to generate them. |
Note that dotnet/fsharp#3113 has now been fixed, and will appear in a future .Net Core 2.1 preview (which will, AFAICT, have version number 2.1.200-preview-something). So it might be possible to do |
I was wondering when that would get fixed. I guess we have a couple questions to answer:
|
Since .Net Core 2.0 released without this feature, the scaffold will probably have to support that for a while. I don't know enough .Net Core users yet to know what they'll do, but I think while dropping support for .Net Core 1.1 is fine, .Net Core 2.0 will need to be supported for quite some time. As for the "msbuild or outside tool" question, I don't have a solid opinion yet. I feel like we should go through the msbuild tool as much as possible since that's what other .Net developers seem to expect, but that's just a vague feeling with no specific data to back it up. I do agree that modifying .xxproj files directly should be avoided if possible, as there are too many possible variations where your modification might not make sense for the way project XYZ is set up. A But there's a certain elegant simplicity to just creating an AssemblyInfo.fs file too... I'll have to think about this one before I'm certain of what I would suggest. |
I'm being stupid we a can pass these properties to msbuild. No need to modify a file. |
So I guess the next question is, pivot on the template or the build script? I'd like the keep the build script clean but that means figuring out how to use the templating engine to do this and properly test it in travis/appveyor. |
Could use a condition in the template.json file to detect the currently-installed dotnet version, and then copy a different build script into the template based on the detected dotnet version. E.g., if dotnet version is before 2.1.100 then copy "make-assemblyInfo-build.fsx" into the "build.fsx" file, but if if dotnet version is after 2.1.100 then instead copy "use-msbuild-build.fsx" into the "build.fsx" file. See https://github.com/dotnet/templating/wiki/Reference-for-template.json (though that document does not specify which environment/MsBuild variables will contain the current dotnet version). |
Description
Currently the libraries do not generate Assembly versions.
Error messages, screenshots
Assembly info "0.0.0.0"
Failing test, failing github repo, or reproduction steps
Can test with
(typedefof<Foo>.GetTypeInfo().Assembly.GetName().Version.ToString())
Expected Behavior
Version info is embedded in the assembly
Known workarounds
It doesn't look like you can easily pass it on the CLI dotnet/sdk#1098 so we might need to just generate the AssemblyInfo with FAKE instead of the dotnet autogenerate. Or modify the fsproj (I'd rather not).
Other information
The text was updated successfully, but these errors were encountered: