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

WPF app based on this template fails to compile #22

Closed
AArnott opened this issue Sep 17, 2019 · 4 comments
Closed

WPF app based on this template fails to compile #22

AArnott opened this issue Sep 17, 2019 · 4 comments
Assignees
Labels
wontfix This will not be worked on

Comments

@AArnott
Copy link
Owner

AArnott commented Sep 17, 2019

The XAML compiler seems to not like the read only source tree.

As reported by @BretJohnson

@AArnott AArnott added the bug Something isn't working label Sep 17, 2019
@AArnott
Copy link
Owner Author

AArnott commented Nov 15, 2019

It seems to still be a problem, even for .NET Core WPF projects added to this repo:

1>------ Rebuild All started: Project: WpfApp1, Configuration: Debug Any CPU ------
1>D:\git\lib.template\src\WpfApp1\MainWindow.xaml.cs(23,16,23,26): warning CS1591: Missing XML comment for publicly visible type or member 'MainWindow.MainWindow()'
1>Done building project "WpfApp1_zk3lipur_wpftmp.csproj".
1>D:\git\lib.template\obj\WpfApp1\Debug\netcoreapp3.0\MainWindow.g.cs(58,21,58,38): error CS1504: Source file 'MainWindow.xaml' could not be opened -- Could not find file.
1>D:\git\lib.template\obj\WpfApp1\Debug\netcoreapp3.0\App.g.cs(51,21,51,31): error CS1504: Source file 'App.xaml' could not be opened -- Could not find file.
1>Done building project "WpfApp1.csproj" -- FAILED.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

@AArnott
Copy link
Owner Author

AArnott commented Nov 15, 2019

It is the presence of this in Directory.Build.props:

<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-19367-01" PrivateAssets="All" />

That, in combination with redirecting the obj directory does it. Remove either one and it builds successfully.

@AArnott AArnott self-assigned this Nov 15, 2019
@AArnott
Copy link
Owner Author

AArnott commented Nov 15, 2019

I filed a bug against SourceLink: dotnet/sourcelink#492

@AArnott
Copy link
Owner Author

AArnott commented Nov 15, 2019

Workaround

Add this within a <PropertyGroup> in your WPF project file:

<EmbedUntrackedSources>false</EmbedUntrackedSources>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant