Bug Fix
The project was using a newer version of Microsoft.CodeAnalysis.CSharp
This commit is contained in:
parent
84af952300
commit
dd05aca370
@ -6,7 +6,7 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<TargetFramework>netstandard2.0</TargetFramework>
|
<TargetFramework>netstandard2.0</TargetFramework>
|
||||||
<IncludeBuildOutput>true</IncludeBuildOutput>
|
<IncludeBuildOutput>true</IncludeBuildOutput>
|
||||||
<Version>1.0.0</Version>
|
<Version>1.0.1</Version>
|
||||||
<Title>Server Database Source Generator</Title>
|
<Title>Server Database Source Generator</Title>
|
||||||
<Authors>JacobTech</Authors>
|
<Authors>JacobTech</Authors>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@ -16,7 +16,7 @@
|
|||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.6.0" />
|
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.4.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -59,12 +59,14 @@ public class TableRowGenerator : ISourceGenerator
|
|||||||
this.CloseClass(generatedClass);
|
this.CloseClass(generatedClass);
|
||||||
|
|
||||||
context.AddSource($"{declaredClass.Identifier}_{relatedClass.Type.Name}.g.cs", SourceText.From(generatedClass.ToString(), Encoding.UTF8));
|
context.AddSource($"{declaredClass.Identifier}_{relatedClass.Type.Name}.g.cs", SourceText.From(generatedClass.ToString(), Encoding.UTF8));
|
||||||
|
//context.AddSource($"{declaredClass.Identifier}_{relatedClass.Type.Name}_goooddddd.g.cs", SourceText.From(generatedClass.ToString().Replace("partial ", "").Replace(declaredClass.Identifier.ToString(), declaredClass.Identifier.ToString() + "GODDD"), Encoding.UTF8));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
context.AddSource("teste.g.cs", SourceText.From(@$"using System;
|
context.AddSource("teste.g.cs", SourceText.From(@$"// <auto-generated/>
|
||||||
|
using System;
|
||||||
namespace ServerDatabase.SourceGenerator.Generated
|
namespace ServerDatabase.SourceGenerator.Generated
|
||||||
{{
|
{{
|
||||||
public class bobe
|
public class bobe
|
||||||
@ -87,7 +89,8 @@ namespace ServerDatabase.SourceGenerator.Generated
|
|||||||
private StringBuilder GenerateClass(string n, ClassDeclarationSyntax og)
|
private StringBuilder GenerateClass(string n, ClassDeclarationSyntax og)
|
||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.Append(@$"using System;
|
sb.Append(@$"// <auto-generated/>
|
||||||
|
using System;
|
||||||
|
|
||||||
namespace {n}
|
namespace {n}
|
||||||
{{
|
{{
|
||||||
|
Loading…
Reference in New Issue
Block a user