Giter VIP home page Giter VIP logo

Comments (2)

atifaziz avatar atifaziz commented on August 11, 2024

When you add the NuGet package reference in the UI, you have to use the Add Specific Version To Query menu option as show below:

image

Once you've selected version 1.60.6, you'll see it appear in the list on the left with a special note about the version-specific reference:

image

You'll also see the version number appear in the Additional Reference tab of the Query Properties dialog (F4):

image

In the query file, the reference appears as:

<NuGetReference Version="1.60.6">Dapper</NuGetReference>

In your case, you added the version number to the wrong element; you added it to the Namespace element instead of the NuGetReference element for Dapper.

So assuming a DapperQuery.linq with the following content:

<Query Kind="Expression">
  <NuGetReference Version="1.60.6">Dapper</NuGetReference>
</Query>

Dapper.DbString.DefaultLength

Running lpless.exe -t exe .DapperQuery.linq should use the specified version and compile successfully:

Q:\DapperQuery.linq
  Packages directory: Q:\packages
  Packages target: .NETFramework,Version=v4.5.2
  Resolving references...
    Dapper 1.60.6
  Resolved references (1):
    packages\Dapper.1.60.6\lib\net451\Dapper.dll
  Q:\tools\Microsoft.Net.Compilers\tools\csc.exe Q:\DapperQuery.cs /r:System.dll /r:Microsoft.CSharp.dll /r:System.Core.dll /r:System.Data.dll /r:System.Data.Entity.dll /r:System.Transactions.dll /r:System.Xml.dll /r:System.Xml.Linq.dll /r:System.Data.Linq.dll /r:System.Drawing.dll /r:System.Data.DataSetExtensions.dll /r:packages\Dapper.1.60.6\lib\net451\Dapper.dll
    Microsoft (R) Visual C# Compiler version 2.0.0.61501
    Copyright (C) Microsoft Corporation. All rights reserved.

I'm going to close this as a non-issue.

from linqpadless.

shps951023 avatar shps951023 commented on August 11, 2024

@atifaziz thanks,it's helpful!

from linqpadless.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.