| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| <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> |
There was a problem hiding this comment.
Where did all of these come from? We need to document the justification for all warnings that we ignore.
Sorry, something went wrong.
There was a problem hiding this comment.
I'm surprised, too. We do not receive these warnings with the original csproj files, but they appear after we add "*.props".
I guess this is a "feature" of Sdk="Microsoft.NET.Sdk" templates.
I believe that some of these warnings can be easily corrected in separate PRs.
Sorry, something went wrong.
There was a problem hiding this comment.
I reviewed the warnings - all belong to XML comments and we have TONs warnings - It takes a lot of work to fix it.
Sorry, something went wrong.
There was a problem hiding this comment.
I'm fine with disabling the xml doc warnings.
Sorry, something went wrong.
| <AssemblyName>Microsoft.Management.Infrastructure.CimCmdlets</AssemblyName> | ||
| <AssemblyOriginatorKeyFile>../signing/visualstudiopublic.snk</AssemblyOriginatorKeyFile> | ||
| <SignAssembly>true</SignAssembly> | ||
| <GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute> |
There was a problem hiding this comment.
All of the GenerateAssembly* entries are missing. I'm assuming it was intentional. Can you please explain?
Sorry, something went wrong.
There was a problem hiding this comment.
Do you mean "<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>" ?
We explicitly had AssemblyInfo attrubutes in AssemblyInfo.cs files and we had to disable auto generating its by "<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>".
Now we use auto generating and should remove the "false".
Sorry, something went wrong.
There was a problem hiding this comment.
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.
Sorry, something went wrong.
There was a problem hiding this comment.
All these attributes were statically installed in the AssemblyInfo.cs files and that their automatic generation was turned off in csproj files. Now we've removed static attributes and allowed them to be automatically generated. In other words, attributes are present, but their values have changed - now they are always up-to-day. If you build the branch you can find the attributes in auto generated *.AssemblyInfo.cs files in OBJ directory.
Sorry, something went wrong.
There was a problem hiding this comment.
I would put the import of the PowerShell.common.props before the property section in the csproj files.
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).
Before contains defaults, and After contains common things you want to have done, but parameterized by each project properties.
Sorry, something went wrong.
There was a problem hiding this comment.
Staffan Gustafsson (@powercode) Could you please give an example?
Sorry, something went wrong.
There was a problem hiding this comment.
I agree with Staffan Gustafsson (@powercode) - simply move the Import so that it's before any PropertyGroup.
One example - we might move NoWarn into the PowerShellCommon.props, but in some project, we want to more/less warnings disabled.
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks for clarify. It's good.
Done.
Sorry, something went wrong.
|
Mike Richmond (@mirichmo) Dongbo Wang (@daxian-dbw) Could you please continue with the PR? |
Sorry, something went wrong.
| <AssemblyVersion>6.0.0.0</AssemblyVersion> | ||
|
|
||
| <ProductVersion>6.0.0-beta.2</ProductVersion> | ||
| <InformationalVersion>6.0.0-beta.2</InformationalVersion> |
There was a problem hiding this comment.
beta.3 please since we created the release today. Otherwise, it looks fine to me.
Sorry, something went wrong.
There was a problem hiding this comment.
Why is 6.0.0-beta.2 hard coded?
Sorry, something went wrong.
There was a problem hiding this comment.
The PR only targets assemblies and make multiple cleanups. I didn't want to complicate the PR and hard coded the tag.
In next PR I plan use git to get the tag dynamically. We discussed this previously in #3690.
Sorry, something went wrong.
| using System.Resources; | ||
|
|
||
| [assembly: AssemblyFileVersionAttribute("3.0.0.0")] | ||
| [assembly: AssemblyVersion("3.0.0.0")] |
There was a problem hiding this comment.
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.
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
I think bumping assembly version number needs to be reviewed by powershell committee before the change.
Sorry, something went wrong.
| <Import Project="..\..\PowerShellCommon.props"/> | ||
|
|
||
| <PropertyGroup> | ||
| <VersionPrefix>6.0.0</VersionPrefix> |
There was a problem hiding this comment.
<VersionPrefix> tag is needed to generate NuGet packages with the version like 6.0.0-alpha.3,
Sorry, something went wrong.
There was a problem hiding this comment.
Here are the NuGet packages generated:
PS:7> dir -Name Microsoft.PowerShell.Commands.Diagnostics.1.0.0-beta.4.nupkg Microsoft.PowerShell.Commands.Diagnostics.1.0.0-beta.4.symbols.nupkg Microsoft.PowerShell.Commands.Management.1.0.0-beta.4.nupkg Microsoft.PowerShell.Commands.Management.1.0.0-beta.4.symbols.nupkg Microsoft.PowerShell.Commands.Utility.1.0.0-beta.4.nupkg ...
They becomes 1.0.0
Sorry, something went wrong.
|
Mike Richmond (@mirichmo) I don't think this PR is ready to merge yet. Please revert this merge. |
Sorry, something went wrong.
|
Mike Richmond (@mirichmo) hold on the revert. Let's see if we can quickly fix the issues. |
Sorry, something went wrong.
|
Mike Richmond (@mirichmo) I don't have a quick fix. I suggest reverting this merge for now and submit another PR later. |
Sorry, something went wrong.
This reverts commit c549925.
|
This merge has been reverted via #4091. Thanks Mike Richmond (@mirichmo) for the quick turnaround. |
Sorry, something went wrong.
|
😕 It's a very strange side effect. I thought PowerShell Core assembles is not Windows PowerShell assemblies, and we could be free in the change. CoreFX assemblies don't keep old versions too. Maybe a right way is to be based on packages versions? |
Sorry, something went wrong.
|
Ilya (@iSazonov) With netstandard2.0 we expect most of the existing Windows powershell modules to work on powershell core without change. They were built against 3.0.0.0 S.M.A.dll, so we want to make sure nothing will break there. By the way, I think you have to submit a new PR for this. If I submit it, it will be from my fork and thus you won't be able to make changes. It's very easy to check out a PR with the tool hub. Once you get that tool, you can do things like this to get the changes from this PR: ## It will get the changes from this PR to a local branch named iSazonov-csproj-common-props hub checkout https://github.com/PowerShell/PowerShell/pull/3917 ## Then rebase this branch and push it to your fork ## Then submit a new PR with that remote branch Again, sorry for the troubles and thanks for your understanding. |
Sorry, something went wrong.
|
Dongbo Wang (@daxian-dbw) Should I restore the branch for you? |
Sorry, something went wrong.
Ok! |
Sorry, something went wrong.
* Update assemblies versions by MSBuild and create a new PowerShellAssembly.props file to consolidate properties. * Move import on first place * Move to "6.0.0-beta.3"
| Back | FazBrowse Home | New Git URL |
Related #3400
Motivation
We inherited old assembly file versions from Windows PowerShell.
Currently we shouldn't set versions of assemblies statically in AssemblyInfo.cs files, we should set versions of assemblies dynamically by MSBuild as discussed in #3690.
Fix
Follow-Up Work
In the PR we temporarily hard code assembly versions as "6.0.0-beta.2".
Later we should set a dll version based on GitCommitId.