Coder Social home page Coder Social logo

Comments (2)

mjiderhamn avatar mjiderhamn commented on June 15, 2024

To reproduce this, create a NuGet.Config file with for example the following contents

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <config>
    <add key="repositoryPath" value="$\..\packages" />
  </config>
</configuration>

if such a file with $\..\packages is placed in a parent/ancestor folder to the project folder, CNeptune won't work.

from cneptune.

mjiderhamn avatar mjiderhamn commented on June 15, 2024

A workaround is to replace

  <Import Project="c:\foo\bar\packages\CNeptune.1.2.1\build\CNeptune.targets" Condition="Exists('c:\foo\bar\packages\CNeptune.1.2.1\build\CNeptune.targets')" />
  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
    <PropertyGroup>
      <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
    </PropertyGroup>
    <Error Condition="!Exists('c:\foo\bar\packages\CNeptune.1.2.1\build\CNeptune.targets')" Text="$([System.String]::Format('$(ErrorText)', 'c:\foo\bar\packages\CNeptune.1.2.1\build\CNeptune.targets'))" />
  </Target>

in your .csproj with

  <PropertyGroup>
    <BuildDependsOn>
      $(BuildDependsOn);
      CNeptune
    </BuildDependsOn>
  </PropertyGroup>
  <Target Name="CNeptune">
    <Exec Command="&quot;$(SolutionDir)\..\packages\CNeptune.1.2.1\build\CNeptune.exe&quot; &quot;$(ProjectPath)&quot; &quot;$(Configuration)&quot;" />
  </Target>

(where you may need to modify the Command to your needs.

from cneptune.

Related Issues (18)

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.