Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Ensure analyzer package is referenced by Microsoft.AspNetCore.Mvc #7943

Merged
merged 1 commit into from
Jun 19, 2018

Conversation

pranavkm
Copy link
Contributor

@pranavkm pranavkm commented Jun 19, 2018

Fixes #7864

@pranavkm
Copy link
Contributor Author

Nuspec

  <?xml version="1.0" encoding="utf-8"?>
  <package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
    <metadata>
      <id>Microsoft.AspNetCore.Mvc</id>
      <version>2.2.0-preview1-t000</version>
      <authors>Microsoft</authors>
      <owners>Microsoft</owners>
      <requireLicenseAcceptance>true</requireLicenseAcceptance>
      <licenseUrl>https://raw.githubusercontent.com/aspnet/Home/2.0.0/LICENSE.txt</licenseUrl>
      <projectUrl>https://asp.net/</projectUrl>
      <iconUrl>https://go.microsoft.com/fwlink/?LinkID=288859</iconUrl>
      <description>ASP.NET Core MVC is a web framework that gives you a powerful, patterns-based way to build dynamic websites and web APIs. ASP.NET Core MVC enables a clean separation of concerns and gives you full control over markup.
  This package was built from the source at:
  https://github.com/aspnet/Mvc/tree/975dff9c3a6c5d31ebc88bbba0406cd3a8d37582</description>
      <copyright>© Microsoft Corporation. All rights reserved.</copyright>
      <tags>aspnetcore aspnetcoremvc</tags>
      <repository type="git" url="https://github.com/aspnet/Mvc" commit="975dff9c3a6c5d31ebc88bbba0406cd3a8d37582" />
      <dependencies>
        <group targetFramework=".NETStandard2.0">
          <dependency id="Microsoft.AspNetCore.Mvc.Analyzers" version="2.2.0-preview1-t000" include="All" />
          <dependency id="Microsoft.AspNetCore.Mvc.ApiExplorer" version="2.2.0-preview1-t000" exclude="Build,Analyzers" />
          <dependency id="Microsoft.AspNetCore.Mvc.Cors" version="2.2.0-preview1-t000" exclude="Build,Analyzers" />
          <dependency id="Microsoft.AspNetCore.Mvc.DataAnnotations" version="2.2.0-preview1-t000" exclude="Build,Analyzers" />
          <dependency id="Microsoft.AspNetCore.Mvc.Formatters.Json" version="2.2.0-preview1-t000" exclude="Build,Analyzers" />
          <dependency id="Microsoft.AspNetCore.Mvc.Localization" version="2.2.0-preview1-t000" exclude="Build,Analyzers" />
          <dependency id="Microsoft.AspNetCore.Mvc.RazorPages" version="2.2.0-preview1-t000" exclude="Build,Analyzers" />
          <dependency id="Microsoft.AspNetCore.Mvc.TagHelpers" version="2.2.0-preview1-t000" exclude="Build,Analyzers" />
          <dependency id="Microsoft.AspNetCore.Mvc.ViewFeatures" version="2.2.0-preview1-t000" exclude="Build,Analyzers" />
          <dependency id="Microsoft.AspNetCore.Mvc.Razor.Extensions" version="2.2.0-preview1-34481" include="All" />
          <dependency id="Microsoft.AspNetCore.Razor.Design" version="2.2.0-preview1-34481" include="All" />
          <dependency id="Microsoft.Extensions.Caching.Memory" version="2.2.0-preview1-34481" exclude="Build,Analyzers" />
          <dependency id="Microsoft.Extensions.DependencyInjection" version="2.2.0-preview1-34481" exclude="Build,Analyzers" />
        </group>
      </dependencies>
    </metadata>
    <files>
      <file src="D:\work\Mvc\src\Microsoft.AspNetCore.Mvc\bin\Release\netstandard2.0\Microsoft.AspNetCore.Mvc.dll" target="lib\netstandard2.0\Microsoft.AspNetCore.Mvc.dll" />
      <file src="D:\work\Mvc\src\Microsoft.AspNetCore.Mvc\bin\Release\netstandard2.0\Microsoft.AspNetCore.Mvc.xml" target="lib\netstandard2.0\Microsoft.AspNetCore.Mvc.xml" />
    </files>
  </package>

Dll references

// Detected Target-Framework-Id: .NETStandard,Version=v2.0

// Referenced assemblies (in metadata order):
// netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 (unresolved)
// Microsoft.AspNetCore.Mvc.Core, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
  // Assembly reference loading information:
  // Info: Success - Found in Assembly List

// Microsoft.Extensions.DependencyInjection.Abstractions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 (unresolved)
// Microsoft.AspNetCore.Mvc.ApiExplorer, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 (unresolved)
// Microsoft.AspNetCore.Mvc.ViewFeatures, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 (unresolved)
// Microsoft.AspNetCore.Mvc.Razor, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 (unresolved)
// Microsoft.AspNetCore.Mvc.RazorPages, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 (unresolved)
// Microsoft.AspNetCore.Mvc.TagHelpers, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 (unresolved)
// Microsoft.AspNetCore.Mvc.DataAnnotations, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 (unresolved)
// Microsoft.AspNetCore.Mvc.Formatters.Json, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 (unresolved)
// Microsoft.AspNetCore.Mvc.Cors, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 (unresolved)
// Microsoft.Extensions.Options, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 (unresolved)

@@ -16,7 +16,7 @@ public class ActionsMustNotBeAsyncVoidAnalyzer : ControllerAnalyzerBase
public static readonly string ReturnTypeKey = "ReturnType";

public ActionsMustNotBeAsyncVoidAnalyzer()
: base(DiagnosticDescriptors.MVC7003_ActionsMustNotBeAsyncVoid)
: base(ExperimentalDiagnosticDescriptors.MVC7003_ActionsMustNotBeAsyncVoid)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some diamond dependency shennanigans. Renaming the type in the experimental package

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where else does DiagnosticDescriptors exist? What is it clashing with?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -22,6 +22,7 @@ public void ReferenceAssemblies_ReturnsLoadableReferenceAssemblies()
// Arrange
var excludeAssemblies = new string[]
{
"Microsoft.AspNetCore.Mvc.Analyzers",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The package reference is in the deps file, so this is expected.

@@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Microsoft.AspNetCore.Mvc.Analyzers\Microsoft.AspNetCore.Mvc.Analyzers.csproj" PrivateAssets="None" ReferenceOutputAssembly="false" />
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actual change

Copy link
Contributor

@ajaybhargavb ajaybhargavb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pranavkm pranavkm merged commit e7ab81f into dev Jun 19, 2018
@pranavkm pranavkm deleted the prkrishn/7684 branch June 19, 2018 23:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants