Comments (5)
Was this a .NET Framework or a .NET Core console application? I'd like to try and reproduce as closely as possible.
from scripty.
.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.
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):
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.
Great this worked. Two things however:
- You should update your README with that code snippet.
- 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.
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)
- After installing scripty tool VS2017 is broken HOT 1
- Can't set the custom tool HOT 2
- Auto run custom tool when *.cs document saving HOT 3
- Making Scripty.MsBuild run only within a single build configuration HOT 5
- Cake.Scripty references an older version of Cake.Core
- Scripty doesn't work in SDK-style projects HOT 6
- Potential problems with outputting to source folder HOT 1
- Scripty.MsBuild settings encoding problem
- Scripty still runs even if file is excluded from project HOT 3
- Recommended changes resulting from automated audit HOT 1
- Extension fails to work in 15.8 Preview 3 HOT 19
- How to use System.Data namespace in .csx File HOT 1
- Scripty Extension Page Not Found HOT 1
- Trouble with referenced third-party libraries HOT 2
- Scripty Visual Studio extension URL is not working HOT 2
- Dead Project ? HOT 1
- Visual studio extesion no longer available + does not work in .net core 2.1, 2.2
- Is this project dead? What do we use to generate code with .NET Core 3.1? HOT 1
- Works on Windows, fails on Linux.
- create a source generator to replace scripty
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scripty.