Home

Relative Path in .Linq Query file header

Is there a way to put a relative path in the CustomAssemblyPath like I'm trying to do below?

<CustomAssemblyPath>..\LinqPad.EfContexts.env\bin\Debug\netcoreapp3.1\LinqPad.EfContexts.env.dll</CustomAssemblyPath>

<Query Kind="Program">
  <Connection>
    <ID>f81faef7-c68a-4d13-978d-12cd7a0f7a33</ID>
    <NamingServiceVersion>2</NamingServiceVersion>
    <Persist>true</Persist>
    <Driver Assembly="EF7Driver" PublicKeyToken="469b5aa5a4331a8c">EF7Driver.StaticDriver</Driver>
   <CustomAssemblyPath>..\LinqPad.EfContexts.env\bin\Debug\netcoreapp3.1\LinqPad.EfContexts.env.dll</CustomAssemblyPath>
    <CustomTypeName>LinqPad.EfContexts.env.Models.LEFT_DBContext</CustomTypeName>
    <DisplayName>EfCore.env</DisplayName>
    <DriverData>
      <UseDbContextOptions>false</UseDbContextOptions>
    </DriverData>
  </Connection>
  <NuGetReference>Company.Api.Client</NuGetReference>
  <NuGetReference>Microsoft.Extensions.DependencyInjection</NuGetReference>
  <NuGetReference>Newtonsoft.Json</NuGetReference>
  <NuGetReference>RestSharp</NuGetReference>
  <Namespace>RestSharp</Namespace>
  <Namespace>System.Threading.Tasks</Namespace>
  <Namespace>Microsoft.Extensions.DependencyInjection</Namespace>
  <Namespace>Company.Api.Client</Namespace>
  <Namespace>Microsoft.Extensions.Configuration</Namespace>
  <Namespace>Company.Api.Client.Models</Namespace>
</Query>

Comments

  • A relative path is permitted, but path is considered relative to the folder in which LINQPad is installed, not the folder in which the query has been saved. This is intended for portable deployments, where you ship LINQPad6.exe in a folder along with a file defining default connections, and optionally custom drivers and queries:
    https://www.linqpad.net/PortableDeployment.aspx

    The path cannot be relative to a query because connections are shared between queries (which may not be saved to the same folder).

Sign In or Register to comment.