-
Notifications
You must be signed in to change notification settings - Fork 15
Updating references to NuGet packages #22
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
base: master
Are you sure you want to change the base?
Conversation
Updating from fork's origin
Add exclusion for .vs/ folder
Update StyleCop to latest stable
Add stylecop.json and remove exclusion from .gitignore Add GlobalSuppression file to suppress documentation rule
| <Reference Include="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> | ||
| <HintPath>..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll</HintPath> | ||
| <Private>True</Private> | ||
| <Reference Include="System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> |
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.
Would it be possible to not reference an explicit version here? So it'll work regardless of what version is actually installed?
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.
Thanks for looking into it. I am not familiar enough with the possible reference styles to answer that question. The other consideration is that even if Visual Studio will be able to locate the reference, when it builds, it's might still bind to the specific version located at compile time.
This SO answer seems to support my thinking: https://stackoverflow.com/questions/24022134/how-exactly-does-the-specific-version-property-of-an-assembly-reference-work-i, but I have not tested it myself.
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.
Actually it's best for a library to use the lowest possible version of it's dependencies and mark the dependency with <SpecificVersion>False</SpecificVersion> (as described in the SO answer @SvenAelterman refers to). So maybe it's better to downgrade to 5.0.0 (basically what @ivaylokenov did in this commit f56c657#diff-64f0574f3b8754e57f68807d79fc91a8). About the green squiggly that's mentioned in issue #21: targeting 5.0.0 MVC and 3.0.0 Razor + WebPages packages doesn't generate it - tested it locally. The detailed build log shows that the 5.2.7 version of MVC is used:
1> Unified primary reference "System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35".
1> Using this version instead of original version "5.0.0.0" in "<BASE-PATH>\My-ASP.NET-MVC-Lambda-Expression-Helpers\System.Web.Mvc.Expressions\bin\Release\System.Web.Mvc.Expressions.dll" because of a binding redirect entry in the file "Web.config".
| { | ||
| private const string ControllerSuffix = "Controller"; | ||
|
|
||
| #pragma warning disable SA1306 |
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.
It's better to make these static readonly instead of suppressing the rule.
| } | ||
| } | ||
| } | ||
| } |
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.
We would prefer having a blank line at the end of the file.
| // Project-level suppressions either have no target or are given | ||
| // a specific target and scoped to a namespace, type, member, etc. | ||
|
|
||
| [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1600:Elements should be documented", Justification = "<Pending>", Scope = "type", Target = "~T:System.Web.Mvc.Expressions.Internals.MvcExtensions")] No newline at end of file |
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.
It would be more consistent and better to just add the suppressed rule here: https://github.com/ivaylokenov/ASP.NET-MVC-Lambda-Expression-Helpers/blob/master/System.Web.Mvc.Expressions/System.Web.Mvc.Expressions.ruleset. This way we won't have a new file that needs to be compiled on each project build.
| <Reference Include="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> | ||
| <HintPath>..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll</HintPath> | ||
| <Private>True</Private> | ||
| <Reference Include="System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> |
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.
Actually it's best for a library to use the lowest possible version of it's dependencies and mark the dependency with <SpecificVersion>False</SpecificVersion> (as described in the SO answer @SvenAelterman refers to). So maybe it's better to downgrade to 5.0.0 (basically what @ivaylokenov did in this commit f56c657#diff-64f0574f3b8754e57f68807d79fc91a8). About the green squiggly that's mentioned in issue #21: targeting 5.0.0 MVC and 3.0.0 Razor + WebPages packages doesn't generate it - tested it locally. The detailed build log shows that the 5.2.7 version of MVC is used:
1> Unified primary reference "System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35".
1> Using this version instead of original version "5.0.0.0" in "<BASE-PATH>\My-ASP.NET-MVC-Lambda-Expression-Helpers\System.Web.Mvc.Expressions\bin\Release\System.Web.Mvc.Expressions.dll" because of a binding redirect entry in the file "Web.config".
|
Why hasn't this been merged in yet? |
|
I haven't had a chance to update the PR yet as requested by the maintainers. I know it needs to be done though. |
Hey, @SvenAelterman . If you are OK, I can make some time during the weekend to address all PR comments so we can close this PR and release a new version. |
|
@vladislav-karamfilov Yes, please make the modifications as you see fit. |
Hey, @SvenAelterman! I finally had the time to address the CR comments. I opened a PR (Sorrell-Solutions#2) to your fork's master and when you merge it, we'll be finally able to merge this PR and release a new NuGet package version. Thank you! :) |
Addressed code review comments of PR "Updating references to NuGet packages"
|
|
|
@vladislav-karamfilov I've just approved your PR into my forked repo. |
I've mainly updated the references to the latest stable versions of everything.
I've also done a few things with Code Analysis to address or suppress rules.
I am open to your feedback and modifications to my PR.
If you're still maintaining this project, I'd appreciate the merge and a release of an updated NuGet package? Thanks!