HavenDV / Uno.Sdk

Single project solution for Uno
Other
7 stars 0 forks source link

Support for generators that affect Uno generated code #38

Open HavenDV opened 9 months ago

HavenDV commented 9 months ago

Workaround:


    <PropertyGroup>
<!--        Uncomment for first build/after changes -->
<!--        <EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>-->
<!--        <CompilerGeneratedFilesOutputPath>Generated</CompilerGeneratedFilesOutputPath>-->
    </PropertyGroup>

    <ItemGroup Condition=" '$(TargetFramework)' == 'net8.0-windows10.0.19041.0' ">
        <Compile Remove="Generated/**/*.*" />
        <None Include="Generated/**/*.*" />
    </ItemGroup>

    <Target Name="DisableAnalyzers"
            BeforeTargets="CoreCompile"
            Condition=" '$(TargetFramework)' != 'net8.0-windows10.0.19041.0' ">
        <ItemGroup>
            <Analyzer Remove="@(Analyzer->WithMetadataValue('Filename','Mvvm.Navigation.Generators'))" />
            <Analyzer Remove="@(Analyzer->WithMetadataValue('Filename','DependencyPropertyGenerator'))" />
        </ItemGroup>
    </Target>
HavenDV commented 7 months ago

https://github.com/levitali/CompiledBindings/blob/master/source/WPF/CompiledBindings.WPF.BuildTasks/Targets/CompiledBindings.WPF.targets