-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Set assembly versions by MSBuild #3917
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <PropertyGroup> | ||
| <Product>PowerShell Core</Product> | ||
| <Company>Microsoft Corporation</Company> | ||
| <Copyright>(c) Microsoft Corporation. All rights reserved.</Copyright> | ||
|
|
||
| <FileVersion>6.0.0.0</FileVersion> | ||
| <AssemblyVersion>6.0.0.0</AssemblyVersion> | ||
|
|
||
| <ProductVersion>6.0.0-beta.3</ProductVersion> | ||
| <InformationalVersion>6.0.0-beta.3</InformationalVersion> | ||
|
|
||
| <TargetFramework>netcoreapp2.0</TargetFramework> | ||
| <TreatWarningsAsErrors>true</TreatWarningsAsErrors> | ||
| <AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
| <GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
|
|
||
| <DelaySign>true</DelaySign> | ||
| <AssemblyOriginatorKeyFile>../signing/visualstudiopublic.snk</AssemblyOriginatorKeyFile> | ||
| <SignAssembly>true</SignAssembly> | ||
| </PropertyGroup> | ||
| </Project> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,11 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <Import Project="..\..\PowerShellCommon.props"/> | ||
|
|
||
| <PropertyGroup> | ||
| <VersionPrefix>6.0.0</VersionPrefix> | ||
| <TargetFramework>netcoreapp2.0</TargetFramework> | ||
| <TreatWarningsAsErrors>true</TreatWarningsAsErrors> | ||
| <DelaySign>true</DelaySign> | ||
| <Description>PowerShell Core's Microsoft.Management.Infrastructure.CimCmdlets project</Description> | ||
| <NoWarn>$(NoWarn);CS1570;CS1572;CS1573;CS1574;CS1584;CS1587;CS1591</NoWarn> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where did all of these come from? We need to document the justification for all warnings that we ignore.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm surprised, too. We do not receive these warnings with the original csproj files, but they appear after we add "*.props".
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I reviewed the warnings - all belong to XML comments and we have TONs warnings - It takes a lot of work to fix it.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm fine with disabling the xml doc warnings. |
||
| <AssemblyName>Microsoft.Management.Infrastructure.CimCmdlets</AssemblyName> | ||
| <AssemblyOriginatorKeyFile>../signing/visualstudiopublic.snk</AssemblyOriginatorKeyFile> | ||
| <SignAssembly>true</SignAssembly> | ||
| <GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All of the GenerateAssembly* entries are missing. I'm assuming it was intentional. Can you please explain?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you mean "<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>" ? We explicitly had AssemblyInfo attrubutes in
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My comment applied to all of those flags as well since I referred to them as "GenerateAssembly*". I am not particularly familiar with them and would like to make sure that we are not inadvertently dropping a flag that is necessary for PowerShell.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All these attributes were statically installed in the
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would put the import of the That way you can do per project overrides if there is something that needs to be project specific. Maybe even have .before.props and .after.props (or with some other naming).
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @powercode Could you please give an example?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree with @powercode - simply move the One example - we might move NoWarn into the
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for clarify. It's good. |
||
| <GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,6 @@ | ||
| using System.Reflection; | ||
| using System.Resources; | ||
|
|
||
| [assembly: AssemblyFileVersionAttribute("3.0.0.0")] | ||
| [assembly: AssemblyVersion("3.0.0.0")] | ||
|
|
||
| [assembly: AssemblyCulture("")] | ||
| [assembly: NeutralResourcesLanguage("en-US")] | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,5 @@ | ||
| using System.Reflection; | ||
| using System.Resources; | ||
|
|
||
| [assembly: AssemblyFileVersionAttribute("3.0.0.0")] | ||
| [assembly: AssemblyVersion("3.0.0.0")] | ||
|
|
||
| [assembly: AssemblyCulture("")] | ||
| [assembly: NeutralResourcesLanguage("en-US")] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,5 @@ | ||
| using System.Reflection; | ||
| using System.Resources; | ||
|
|
||
| [assembly: AssemblyFileVersionAttribute("3.0.0.0")] | ||
| [assembly: AssemblyVersion("3.0.0.0")] | ||
|
|
||
| [assembly: AssemblyCulture("")] | ||
| [assembly: NeutralResourcesLanguage("en-US")] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,3 @@ | ||
| using System.Runtime.CompilerServices; | ||
| using System.Reflection; | ||
| [assembly: InternalsVisibleTo("System.Management.Automation,PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] | ||
| [assembly: AssemblyFileVersionAttribute("3.0.0.0")] | ||
| [assembly: AssemblyVersion("3.0.0.0")] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,3 @@ | ||
| using System.Runtime.CompilerServices; | ||
| using System.Reflection; | ||
| [assembly: InternalsVisibleTo("System.Management.Automation,PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] | ||
| [assembly: AssemblyFileVersionAttribute("1.0.0.0")] | ||
| [assembly: AssemblyVersion("1.0.0.0")] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,5 @@ | ||
| using System.Reflection; | ||
| using System.Resources; | ||
|
|
||
| // General Information about an assembly is controlled through the following | ||
| // set of attributes. Change these attribute values to modify the information | ||
| // associated with an assembly. | ||
| [assembly: AssemblyTitle("LocalAccounts")] | ||
| [assembly: AssemblyDescription("PowerShell cmdlet for local accounts.")] | ||
|
|
||
| [assembly: AssemblyFileVersionAttribute("3.0.0.0")] | ||
| [assembly: AssemblyVersion("3.0.0.0")] | ||
|
|
||
| [assembly: AssemblyCulture("")] | ||
| [assembly: NeutralResourcesLanguage("en-US")] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,5 @@ | ||
| using System.Reflection; | ||
| using System.Resources; | ||
|
|
||
| [assembly: AssemblyFileVersionAttribute("3.0.0.0")] | ||
| [assembly: AssemblyVersion("3.0.0.0")] | ||
|
|
||
| [assembly: AssemblyCulture("")] | ||
| [assembly: NeutralResourcesLanguage("en-US")] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1 @@ | ||
| using System.Reflection; | ||
|
|
||
| [assembly:AssemblyFileVersionAttribute("3.0.0.0")] | ||
| [assembly:AssemblyVersion("3.0.0.0")] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1 @@ | ||
| using System.Reflection; | ||
|
|
||
| [assembly:AssemblyFileVersionAttribute("3.0.0.0")] | ||
| [assembly:AssemblyVersion("3.0.0.0")] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,9 +2,6 @@ | |
| using System.Reflection; | ||
| using System.Resources; | ||
|
|
||
| [assembly: AssemblyFileVersionAttribute("3.0.0.0")] | ||
| [assembly: AssemblyVersion("3.0.0.0")] | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change the assembly version from 3.0.0.0 to 6.0.0.0 might break existing assemblies that reference to S.M.A 3.0.0.0. We need to evaluate the implication before making this change.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think bumping assembly version number needs to be reviewed by powershell committee before the change. |
||
|
|
||
| [assembly: AssemblyCulture("")] | ||
| [assembly: NeutralResourcesLanguage("en-US")] | ||
|
|
||
|
|
||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<VersionPrefix>tag is needed to generate NuGet packages with the version like6.0.0-alpha.3,There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here are the NuGet packages generated:
They becomes 1.0.0