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

How to properly compile? #1982

Closed
Damonsoft opened this issue Feb 15, 2020 · 3 comments · Fixed by #1987
Closed

How to properly compile? #1982

Damonsoft opened this issue Feb 15, 2020 · 3 comments · Fixed by #1987
Labels

Comments

@Damonsoft
Copy link

Hello! I just have a simple question. I've been trying to get debugging going on WinUI, and I'm a little lost. I cloned the repository and updated my Visual Studio to version 16.4.5. I also made sure the SDK's 17763 and 18362 we're properly installed. When selecting Debug, x64, and the project MUXControlsTestApp, executing a build causes the following error.

Severity Code Description Project File Line Suppression State
Error Cannot resolve Assembly or Windows Metadata file 'C:\Users\damon\Documents\GitHub\microsoft-ui-xaml\BuildOutput\Debug\x64\Microsoft.UI.Xaml\Microsoft.winmd' MUXControlsTestApp (test\MUXControlsTestApp\MUXControlsTestApp) C:\Users\damon\Documents\GitHub\microsoft-ui-xaml\test\MUXControlsTestApp\MSTest\MUXControlsTestApp.csproj

So my next thought was to just use the build command in the root directory which builds everything properly. Then use Visual Studio to debug the application. Unfortunately I cant figure out where the PDB file for the specific source files I need are outputted. I tried pointing Visual Studio towards the Microsoft.Ui.Xaml.pdb in the BuildOutput directory but no luck.

Also the build command ends correctly but when building the TestApp it indicates a missing reference to System.Runtime 4.0.0.

@msft-github-bot msft-github-bot added the needs-triage Issue needs to be triaged by the area owners label Feb 15, 2020
@ranjeshj ranjeshj added needs-author-feedback Asked author to supply more information. and removed needs-triage Issue needs to be triaged by the area owners labels Feb 15, 2020
@ranjeshj
Copy link
Contributor

@Damonsoft can you try running restore nuget packages (right click on MuxControls.sln in solution explorer) and do a rebuild from VisualStudio ?

@Damonsoft
Copy link
Author

@ranjeshj Hey, so I did a fresh Git Clone of the repository and I right clicked the MuxControls.sln in solution explorer and did a nuget restore. The output stated all nuget packages were already installed.

All packages are already installed and there is nothing to restore.

I then did a rebuild and I got around 12 errors at least, all stating the same general error of missing Microsoft.winmd configuration file. However I did notice this time that Microsoft.Ui.Xaml project failed to load in Visual Studio. When hitting reload project in the context menu of solution explorer Visual studio gives me this error.

C:\Users\damon\Documents\GitHub\microsoft-ui-xaml\dev\dll\Microsoft.UI.Xaml.vcxproj : error : Cannot load project with duplicated project items: C:\Users\damon\Documents\GitHub\microsoft-ui-xaml\dev\RadioButtons\RadioButton_themeresources.xaml is included as 'Page' and as 'Page' item types.

I tried poking around the Microsoft.UI.Xaml.vcxproj file to see whats going on but couldn't come up with a solution. Thanks a bunch for you help!

@msft-github-bot msft-github-bot added needs-triage Issue needs to be triaged by the area owners and removed needs-author-feedback Asked author to supply more information. labels Feb 16, 2020
@Damonsoft Damonsoft changed the title Question: [your question here] How to properly compile? Feb 17, 2020
@ranjeshj
Copy link
Contributor

@Damonsoft This looks like a duplicate entry in one of the included projects. I created a PR to remove the duplicate entry - try pulling that change and see if it fixes it for you.
#1987

Also, delete the BuildOutput folder before loading the solution and do a full rebuild to ensure that you start at a clean point. It takes a little while during the initial load, but it should get faster in future loads.

Its a long weekend, so responses might be delayed. Thanks.

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

Successfully merging a pull request may close this issue.

3 participants