C3D.MSBuild.Tools.EF6.GenerateViews 6.4.18

dotnet add package C3D.MSBuild.Tools.EF6.GenerateViews --version 6.4.18                
NuGet\Install-Package C3D.MSBuild.Tools.EF6.GenerateViews -Version 6.4.18                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="C3D.MSBuild.Tools.EF6.GenerateViews" Version="6.4.18">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add C3D.MSBuild.Tools.EF6.GenerateViews --version 6.4.18                
#r "nuget: C3D.MSBuild.Tools.EF6.GenerateViews, 6.4.18"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install C3D.MSBuild.Tools.EF6.GenerateViews as a Cake Addin
#addin nuget:?package=C3D.MSBuild.Tools.EF6.GenerateViews&version=6.4.18

// Install C3D.MSBuild.Tools.EF6.GenerateViews as a Cake Tool
#tool nuget:?package=C3D.MSBuild.Tools.EF6.GenerateViews&version=6.4.18                

C3D.MSBuild.Tools.EF6.GenerateViews

An MSBuild based implementation of the Entity Framework 6 Power Tools Community Edition Generate Views command.

Build Status NuGet package NuGet downloads

The samples folder shows the use of the package with NETFramework and NETCore (.Net 5)

This is for EntityFramework 6 only - not EFCore

An example of how to get the EDMX file from your context file is given in the program main. It will write the EDMX for the context to the executable folder. You can copy this into your application directory. Ensure it is not set to any build action or have any custom tool attached.

Set the Build Action to EntityView

Set the Custom Tool Namespace to match your database context's namespace.

On build, the Views will be generated in the obj folder and automatically included in the build.

If you are using Code-First migrations, you can add the following to automatically generate views based on the last edmx file in the migrations folder.

  <ItemGroup>
    <EntityView Include="Migrations\**\*.edmx">
      <CustomToolNamespace>MyApplication.Models.DAL</CustomToolNamespace>
    </EntityView>
  </ItemGroup>

Known Properties

EntityFramework6GenerateViewsOutputDir - Defaults to $(IntermediateOutputPath)\EntityViews

Known Items

  • EntityView - One or more edmx files used to generate the Views. Only the latest (alphabetically last) file is used.
    • CustomToolNamespace - Item Metadata of the EntityView item used to determine the namespace of the DBContext. The DBContext name itself is determined from the EDMX file.
There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETFramework 4.7.2

    • No dependencies.
  • .NETStandard 2.1

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
6.4.18 37,823 10/26/2021
6.4.14 365 9/23/2021
6.4.12-g55b1fe29c3 664 9/23/2021
6.4.7-g9532f4e752 227 9/23/2021