Devart Entity Developer - Build to Azure DevOps Pipelines

Costas

Administrator
Staff member
using
  • Visual Studio 2012 Premium (express is not supporting addins)
  • Devart.Entity Developer v6.10

JHqdvWb.png

on WindowsFormsApplication1.csproj we have :
XML:
    <Compile Include="DataModel1.Designer.cs">
      <AutoGen>True</AutoGen>
      <DesignTime>True</DesignTime>
      <DependentUpon>DataModel1.edml</DependentUpon>
    </Compile>
    <None Include="DataModel1.Diagram1.view">
      <DependentUpon>DataModel1.edml</DependentUpon>
    </None>
    <DevartEntityDeploy Include="DataModel1.edml">
      <Generator>DevartEfGenerator</Generator>
      <LastGenOutput>DataModel1.Designer.cs</LastGenOutput>
    </DevartEntityDeploy>
    <None Include="DataModel1.edps">
      <DependentUpon>DataModel1.edml</DependentUpon>
    </None>

the tricky part is that we cannot find any Import tag for Devart.Data.Entity.targets into WindowsFormsApplication1.csproj. The reason is that Devart installation, injected it, at C:\Program Files (x86)\MSBuild\v4.0\Custom.After.Microsoft.Common.targets
XML:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\Devart\v3.5\Devart.Data.Entity.targets" Condition="'$(ImportDevartEntityDeploy)'!='false' and Exists('$(MSBuildExtensionsPath)\Devart\v3.5\Devart.Data.Entity.targets')" />
</Project>

as we see points the MSBuildExtensionsPath which means
0GtoRG4.png



Adjust the WindowsFormsApplication1.csproj to import the Devart.Data.Entity.targets.
<Import Project="X:\Devart.Data.Entity.targets" />
tip: if Devart.Data.Entity.targets exists 2 times there is no conflict (saying because on developer machine now exist to Custom.After.Microsoft.Common.targets and into project file)

PYV8mCi.png

the Devart.Data.Entity.targets defines where to find the Devart.Data.Entity.Build.Tasks.dll
lslexgj.png

Conclusion on Azure build server two files needed to exist ( the ones exist on C:\Program Files (x86)\MSBuild\Devart\v3.5 ) :
  • Devart.Data.Entity.Build.Tasks.dll (20kb)
  • Devart.Data.Entity.targets (may needed to hardcode the paths as the shot)
no troubles with license validation as made on extension side..

In the following example the required Devart files ( .targets & .dll ) exist to project folder and we have modded the project file to Import the Devart.Data.Entity.targets. The modded Devart.Data.Entity.targets using the MSBuildThisFileDirectory variable.



Moreover Devart Entity Developer integration to Visual Studio 2012 made as
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7

0mcawKn.png

on devenv.exe.config (Visual Studio executable)

XML:
<probing privatePath="....;PrivateAssemblies\Devart" />
..
<dependentAssembly>
    <assemblyIdentity name="Devart.EntityDeveloper.Vs" publicKeyToken="09af7300eec23701" culture="neutral" />
    <codeBase version="6.10.1135.0" href="PrivateAssemblies\Devart\Devart.EntityDeveloper.Vs.dll" />
</dependentAssembly>



When removing the Devart.Data.Entity.targets by C:\Program Files (x86)\MSBuild\v4.0\Custom.After.Microsoft.Common.targets the project still compiling but without having the entity metadata.

RWErT4O.png

using the Visual Studio Object Viewer we see the NorthwindModel exists on both because is actual a .cs file, the metadata only embedded when Devart.Data.Entity.targets is in place ( underneath Devart.Data.Entity.Build.Tasks.dll adding extra Microsoft.Build.Utilities.TaskItem entries for metadata insertion )
wcNvdRp.png



references :
(2012) Devart Forums - DevartEntityDeploy on a build server
Devart Docs - Build CI/CD pipelines in Azure DevOps

similar as NuGet (this is for an obfuscator, not for devart) :
 

Costas

Administrator
Staff member
Visual Studio 2010-2015 - SQLite Entity Framework support
https://system.data.sqlite.org/index.html/doc/trunk/www/downloads-unsup.wiki

see the packages with comment 'This is the only setup package that is capable'

installer cmd switches (adjust the needed VS switch with false)
Code:
installer.exe -install true -wow64 true -installFlags AllExceptGlobalAssemblyCache -tracePriority Lowest -verbose true -noCompact true -noNetFx20 true -noNetFx35 true -noNetFx40 true -noNetFx45 true -noNetFx451 true -noNetFx452 true -noNetFx461 true -noNetFx462 true -noNetFx47 true -noNetFx471 true -noNetFx472 true -noNetFx48 true -noVs2005 true -noVs2008 true -noVs2010 true -noVs2012 true -noVs2013 true -noVs2017 true -configVersion 4.0.30319 -whatIf false -confirm true

ref

--

alternative/extension with the help of system.data.sqlite

Devart.dotConnect for SQLite - https://www.devart.com/dotconnect/sqlite/

--

Code:
https://www.nuget.org/packages/EntityFramework/6.0.0
EntityFramework v6.4.4 for framework v4.5 = 4.9mb
EntityFramework v6 for framework v4.5 = 5mb


https://www.nuget.org/packages/EntityFramework/5.0.0
EntityFramework v5 for framework v4.5 = 1.1mb

--

DbSet vs ObjectSet
Lazy Loading: DbSet supports lazy loading by default, meaning related entities are not loaded from the database until they are accessed. In contrast, ObjectSet does not support lazy loading out of the box.

DbSet supported by Entity Framework v4.3.1 before v4.3.1 only ObjectSet
 
Top