Skip to content
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

Support for arbitrary value in AssemblyInformationalVersionAttribute #4822

Closed
tmat opened this issue May 3, 2018 · 6 comments
Closed

Support for arbitrary value in AssemblyInformationalVersionAttribute #4822

tmat opened this issue May 3, 2018 · 6 comments
Labels
Bug Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code.
Milestone

Comments

@tmat
Copy link
Member

tmat commented May 3, 2018

The compiler reports a warning when the value of AssemblyInformationalVersionAttribute is not a valid version string.

.NET SDK 2.1.300-rc1-008673

Repro:

> dotnet new classlib --language F#

Set value in the project:

<InformationalVersion>1.0.0+a1686e12e2b5dbbf0773de915f8b6039041dd4c1</InformationalVersion>
> dotnet build
...
FSC : warning FS2003: An System.Reflection.AssemblyInformationalVersionAttribute specified version '1.0.0+a1686e12e2b5dbbf0773de915f8b6039041dd4c1', but this value is invalid and has been ignored 

The C# and VB compilers accept arbitrary values.

SourceLink package adds git commit sha to the version (format above).

@tmat
Copy link
Member Author

tmat commented May 3, 2018

@KevinRansom

@KevinRansom KevinRansom self-assigned this May 7, 2018
@KevinRansom
Copy link
Member

I will take care of it.

@dsyme dsyme added Bug Area-Compiler Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code. labels May 13, 2018
@cartermp
Copy link
Contributor

Link #5336

@cartermp cartermp added this to the 16.0 milestone Jul 13, 2018
KevinRansom added a commit that referenced this issue Jul 18, 2018
…VersionAttribute (#5336)

* remove TypeChecker validation

* update testcase baselines

* Update fsharpqa tests

* Feedback

* Update nowarn test
jwosty pushed a commit to jwosty/fsharp that referenced this issue Jul 19, 2018
…tionalVersionAttribute (dotnet#5336)

* remove TypeChecker validation

* update testcase baselines

* Update fsharpqa tests

* Feedback

* Update nowarn test
jwosty added a commit to jwosty/fsharp that referenced this issue Jul 19, 2018
…yInformationalVersionAttribute (dotnet#5336)"

This reverts commit b5ab862.
jwosty pushed a commit to jwosty/fsharp that referenced this issue Jul 19, 2018
…tionalVersionAttribute (dotnet#5336)

* remove TypeChecker validation

* update testcase baselines

* Update fsharpqa tests

* Feedback

* Update nowarn test
@cartermp cartermp modified the milestones: 16.0, 15.8 Jul 29, 2018
@ctaggart
Copy link
Contributor

Even though this was merged on July 18th to the master branch, the fix has not made it to a stable .NET Core SDK yet. It still fails on the most recent stable .NET Core SDK 2.1.402. Any idea when it will make it to a stable released version? I just came across this in the Giraffe build when trying to enable SourceLink there giraffe-fsharp/Giraffe#304. They have <TreatWarningsAsErrors>true</TreatWarningsAsErrors>, so it failed the build.

Workaround is https://github.com/giraffe-fsharp/Giraffe/blob/08bd0cbc802f1d9eeae460126ab481ac9783f9f8/src/Directory.Build.props#L7-L8

    <!-- Support for arbitrary value in AssemblyInformationalVersionAttribute https://github.com/Microsoft/visualfsharp/issues/4822 -->
    <NoWarn>FS2003</NoWarn>

@KevinRansom
Copy link
Member

KevinRansom commented Sep 14, 2018 via email

@cartermp
Copy link
Contributor

More concretely, the .NET SDK that will be aligned with Preview 1 of VS 2019 will have this fix in it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code.
Projects
None yet
Development

No branches or pull requests

5 participants