You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a script which requires Newtonsoft.Json - In my case it is also used by the project that contains the script but this should not be a pre-requisite.
At the moment I am using #r "..\\bin\\Debug\\Newtonsoft.Json.dll" but this obviously only works after the build has been done once and not on a CI server. I am not currently using the project's packages path as if I update the package it will break the script.
I suggest that either a local packages.config gets parsed and restored relative to the script and using that, or a pre-processing of the csx occurs to replace package references with dll references.
e.g. #r "{Newtonsoft.Json}" -> #r "C:\\...\\packages\\Newtonsoft.Json.8.0.3\\lib\\net45\\Newtonsoft.Json.dll" assuming that there is a packages.config entry or MSBuild ItemGroup or other mechanism to define <package id="Newtonsoft.Json" version="8.0.3" targetFramework="net452" />
The text was updated successfully, but these errors were encountered:
I totally agree - this would be really helpful. I was hoping it was on the roadmap for native Roslyn scripting functionality, and it looks like it is, but not until 2.0. Since we don't know when that's due, I may have to add it directly (for now). I'm going to see if I can get some feedback on what the Roslyn implementation will look like and copy that so we can rip it out of Scripty once it's in Roslyn.
I have a script which requires Newtonsoft.Json - In my case it is also used by the project that contains the script but this should not be a pre-requisite.
At the moment I am using
#r "..\\bin\\Debug\\Newtonsoft.Json.dll"
but this obviously only works after the build has been done once and not on a CI server. I am not currently using the project's packages path as if I update the package it will break the script.I suggest that either a local packages.config gets parsed and restored relative to the script and using that, or a pre-processing of the csx occurs to replace package references with dll references.
e.g.
#r "{Newtonsoft.Json}"
->#r "C:\\...\\packages\\Newtonsoft.Json.8.0.3\\lib\\net45\\Newtonsoft.Json.dll"
assuming that there is a packages.config entry or MSBuild ItemGroup or other mechanism to define<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net452" />
The text was updated successfully, but these errors were encountered: