Why can visual studio open the source file when the nuget package published locally?

  Uncategorised

I compiled and published a nuget package named "QCM" on my computer using Visual Studio 2022, and then published it to the nuget server built on the intranet. Then a project on my computer referenced the "QCM" package. I cheated "QCM" "When the code in the package throws an exception, visual studio 2022 will automatically open the source code of this function, but only the metadata can be seen when using Ctrl + F12. I want to know how visual studio knows the location of the source file. This nuget package does not contain. PDB, but only. DLL files.
Here is the. Nuspec file:

<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
  <metadata>
    <id>QCM</id>
    <version>5.0.3.1-alpha</version>
    <authors></authors>
    <owners></owners>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <description></description>
    <releaseNotes></releaseNotes>
    <dependencies>
      <group targetFramework=".NETCoreApp3.1">
        <dependency id="System.Text.Json" version="5.0.1" exclude="Build,Analyzers" />
      </group>
      <group targetFramework="net5.0">
        <dependency id="System.Text.Json" version="5.0.1" exclude="Build,Analyzers" />
      </group>
    </dependencies>
    <frameworkReferences>
      <group targetFramework=".NETCoreApp3.1">
        <frameworkReference name="Microsoft.AspNetCore.App" />
      </group>
      <group targetFramework="net5.0">
        <frameworkReference name="Microsoft.AspNetCore.App" />
      </group>
    </frameworkReferences>
  </metadata>
</package>

Source: Visual Studio Questions

LEAVE A COMMENT