mwpowellhtx / code.generation.roslyn Goto Github PK
View Code? Open in Web Editor NEWdotnet Code Generation using the Roslyn API.
License: GNU General Public License v3.0
dotnet Code Generation using the Roslyn API.
License: GNU General Public License v3.0
We are more or less a third, perhaps one half, of the way there, we think. Consider instead of invoking a code generation asynchronously, that the service yields to a reactive, observable collection of CompilationUnitSyntax
elements. Upon each element being generated, that is when we would do such things as write the generated code to file, register said generated code with the internal registries for bookkeeping, and so on.
The Bump Assembly Version action is apparently invoked for every target in the build. If there is one target, it happens one time only. If there are more than one targets, i.e. a multi-target, then is apparently occurs asynchronously, and we may see +N, or +N-1, depending on which target resolved last, either of which is incorrect for increment versions. Should be +1.
Was referencing a non existing MicrosoftCodeAnalysisCSharp
property, whereas should have been MicrosoftCodeAnalysisCSharpVersion
. This yields much better results.
Hi, I've followed the tutorial for building a generator and in the project that I use the CodeGeneration the class Bar was duplicated.
As you can see I just pressed F12 on Bar, and it shoes 2 class, one from my file Bar.cs, and another from the generated one.
using Alberto.FastMap.CodeGen;
namespace Alberto.TheApp
{
[ImplementCloneableInterface]
public class Bar
{
}
}
I've used same classes that you showed in readme tutorial ImplementCloneableInterfaceAttribute and ImplementCloneableInterfaceGenerator
Thats my CodeGen project csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Code.Generation.Roslyn" Version="1.2.0.20972" />
</ItemGroup>
</Project>
And that is my Client app that uses the CodeGen
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Code.Generation.Roslyn.BuildTime" Version="1.2.0.20971" PrivateAssets="all"/>
<DotNetCliToolReference Include="dotnet-cgr" Version="[1,2)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Alberto.FastMap.CodeGen\Alberto.FastMap.CodeGen.csproj" />
</ItemGroup>
</Project>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.