Giter Club home page Giter Club logo

Comments (5)

daveaglick avatar daveaglick commented on September 15, 2024

Was this a .NET Framework or a .NET Core console application? I'd like to try and reproduce as closely as possible.

from scripty.

strich avatar strich commented on September 15, 2024

.NET Framework. I was testing this on a normal .NET 4.6.1 project, however my ultimate intention is to use it on a Unity3D project, which generates .NET 3.x VS projects.

from scripty.

daveaglick avatar daveaglick commented on September 15, 2024

Looks like you just need to modify the script a bit. I got the following errors (you can see them by hovering over the script file, which should have a red underline after an unsuccessful generation):

2016-09-27_14h24_31

The following modifications worked:

using Microsoft.CodeAnalysis;

foreach (Document document in Project.Analysis.Documents)
{
    Output.WriteLine($"// {document.FilePath}");
}

Notice I am including the Microsoft.CodeAnalysis namespace to bring the Document class into scope. I'm also accessing the Roslyn Documents property as a member of the Analysis property from the Project global property.

from scripty.

strich avatar strich commented on September 15, 2024

Great this worked. Two things however:

  1. You should update your README with that code snippet.
  2. At least in my VS I do not ever see any red lines indicating there are errors to be viewed. I did however see the errors when I manually looked in the Errors window tab.

from scripty.

daveaglick avatar daveaglick commented on September 15, 2024

Great, glad you've got it working! I have ReSharper installed so the red lines on the file might be coming from that instead of VS.

from scripty.

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.