Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors building project with xaml rules and WPF user control #248

Closed
jp2masa opened this issue Sep 9, 2017 · 1 comment
Closed

Errors building project with xaml rules and WPF user control #248

jp2masa opened this issue Sep 9, 2017 · 1 comment

Comments

@jp2masa
Copy link

jp2masa commented Sep 9, 2017

I'm working on a project system based on CPS and now I'm trying to implement app designer property pages, but I'm having trouble compiling a WPF user control. I'm using the new csproj.
I followed the steps in this comment to be able to compile a WPF xaml user control: dotnet/sdk#810 (comment)
But now I can't use anything compiled from xaml rules. I get no errors in intellisense, but I can't build the project, with an error like error CS0103: The name 'XSharpDebugger' does not exist in the current context. XSharpDebugger is a xaml rule.
Any idea why the compiled rules aren't being passed to the C# compiler?

@jp2masa
Copy link
Author

jp2masa commented Sep 10, 2017

EDIT: This isn't a good workaround, this scenario should just work, it's probably a problem in the project configuration.

I solved this by creating a workaround.
In case someone else has the same problem, this is the workaround I'm using:

<Target Name="FixRulesCompile" BeforeTargets="CoreCompile">
    <ItemGroup>
        <Compile Include="@(XamlPropertyRule->'$(IntermediateOutputPath)%(Filename).cs')" Exclude="@(Compile)" />
    </ItemGroup>
</Target>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant