Skip to content

Latest commit

 

History

History
81 lines (56 loc) · 2.33 KB

README.md

File metadata and controls

81 lines (56 loc) · 2.33 KB

Restore to intellisense

Samples for the restore to intellisense demo

MSBuild

<Project>

  <PropertyGroup>
    <SpecialProp>..\..\special\path\custom.dll</SpecialProp>
  </PropertyGroup>

  <ItemGroup>
    <Reference Include="$(SpecialProp)" />
  </ItemGroup>

  <Target Name="BeforeBuild">
    <!-- Insert tasks to run before build here -->
  </Target>
</Project>

MSBuild references

Packages.config

  • The original NuGet package management style.
  • Built on basic MSBuild concepts such as Reference.
  • Build process is unaware of NuGet.

PackageReference Build

  • PackageReference has an assets file, instead of hardcoding the assemblies in the project file.
<Project>
...
    <ItemGroup>
        <PackageReference Include="NuGet.Common" Version="5.8.0" />
    </ItemGroup>
...
</Project>

Project System

The project system is the interface between the project file and Visual Studio features.

Design time builds are minimal builds that gather enough information to populate:

  • Language service (roslyn)
  • Solution explorer
  • NuGet restore nomination !!!!!

Project System references

CPS CPS Intro .NET Project System .NET Project System general docs .NET Project System design time build details

packages.config and intellisense

Getting intellisense in packages.config requires a manual restore.

PackageReference, solution load, automatic restore and intellisense stage in .NET Managed languages project system

Getting intellisense in SDK based PackageReference is automatic.

  • Project load, evaluation
  • Design time build #1 (leads to nomination)
  • Restore
  • Design time build #2 if necessary.

Intellisense stage for 3 projects