Giter Site home page Giter Site logo

code.generation.roslyn's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

johnholliday

code.generation.roslyn's Issues

Reconsider how the Generated Code occurs

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.

Discovered a version bumping issue with multi-targeting

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.

Duplicated class generated

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.

image

The Bar class

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>

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.