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

Update projects to support editing/building with VS 2019 #2997

Merged
merged 16 commits into from
Sep 9, 2019

Conversation

clairernovotny
Copy link
Member

@clairernovotny clairernovotny commented Sep 7, 2019

Issue: #2996

PR Type

What kind of change does this PR introduce?

  • Build or CI related changes

Updates to support building with VS 2019

What is the current behavior?

VS 2019 is not supported

What is the new behavior?

VS 2019 is supported / required for editing/building.

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tested code with current supported SDKs
  • Pull Request has been submitted to the documentation repository instructions. Link:
  • Sample in sample app has been added / updated (for bug fixes / features)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Header has been added to all new source files (run build/UpdateHeaders.bat)
  • Contains NO breaking changes

Other information

Copy link
Contributor

@rjmurillo rjmurillo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@michael-hawker
Copy link
Member

I did a git clean and tried to build in VS 2019 16.3 Preview 3 and got this:

Error occurred while restoring NuGet packages: Sequence contains more than one matching element
1>------ Build started: Project: Microsoft.Toolkit.Uwp.Notifications, Configuration: Debug Any CPU ------
1>You are using a preview version of .NET Core. See: https://aka.ms/dotnet-core-preview
1>You are using a preview version of .NET Core. See: https://aka.ms/dotnet-core-preview
1>C:\Program Files\dotnet\sdk\3.0.100-preview9-014004\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(234,5): error NETSDK1004: Assets file 'H:\code\WindowsCommunityToolkit\Microsoft.Toolkit.Uwp.Notifications\obj\project.assets.json' not found. Run a NuGet package restore to generate this file.
1>You are using a preview version of .NET Core. See: https://aka.ms/dotnet-core-preview
1>You are using a preview version of .NET Core. See: https://aka.ms/dotnet-core-preview
1>Done building project "Microsoft.Toolkit.Uwp.Notifications.csproj" -- FAILED.
1>C:\Program Files\dotnet\sdk\3.0.100-preview9-014004\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(234,5): error NETSDK1004: Assets file 'H:\code\WindowsCommunityToolkit\Microsoft.Toolkit.Uwp.Notifications\obj\project.assets.json' not found. Run a NuGet package restore to generate this file.
1>C:\Program Files\dotnet\sdk\3.0.100-preview9-014004\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(234,5): error NETSDK1004: Assets file 'H:\code\WindowsCommunityToolkit\Microsoft.Toolkit.Uwp.Notifications\obj\project.assets.json' not found. Run a NuGet package restore to generate this file.
1>C:\Program Files\dotnet\sdk\3.0.100-preview9-014004\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(234,5): error NETSDK1004: Assets file 'H:\code\WindowsCommunityToolkit\Microsoft.Toolkit.Uwp.Notifications\obj\project.assets.json' not found. Run a NuGet package restore to generate this file.
1>Done building project "Microsoft.Toolkit.Uwp.Notifications.csproj" -- FAILED.
1>Done building project "Microsoft.Toolkit.Uwp.Notifications.csproj" -- FAILED.
2>------ Build started: Project: Microsoft.Toolkit.Uwp.Samples.BackgroundTasks, Configuration: Debug Any CPU ------
2>CSC : error CS0006: Metadata file 'H:\code\WindowsCommunityToolkit\Microsoft.Toolkit.Uwp.Notifications\bin\Debug\uap10.0\Microsoft.Toolkit.Uwp.Notifications.dll' could not be found
3>------ Build started: Project: Microsoft.Toolkit.Uwp.SampleApp, Configuration: Debug x86 ------
3>C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3277: Found conflicts between different versions of "System.Net.Http" that could not be resolved.  These reference conflicts are listed in the build log when log verbosity is set to detailed.
3>H:\code\WindowsCommunityToolkit\Microsoft.Toolkit.Uwp.SampleApp\Microsoft.Toolkit.Uwp.SampleApp.csproj : XamlCompiler error WMC1006: Cannot resolve Assembly or Windows Metadata file 'H:\code\WindowsCommunityToolkit\Microsoft.Toolkit.Uwp.Notifications\bin\Debug\uap10.0\Microsoft.Toolkit.Uwp.Notifications.dll'
3>H:\code\WindowsCommunityToolkit\Microsoft.Toolkit.Uwp.SampleApp\Microsoft.Toolkit.Uwp.SampleApp.csproj : XamlCompiler error WMC1006: Cannot resolve Assembly or Windows Metadata file 'H:\code\WindowsCommunityToolkit\Microsoft.Toolkit.Uwp.Samples.BackgroundTasks\bin\Debug\Microsoft.Toolkit.Uwp.Samples.BackgroundTasks.winmd'
3>CSC : error CS0006: Metadata file 'H:\code\WindowsCommunityToolkit\Microsoft.Toolkit.Uwp.Notifications\bin\Debug\uap10.0\Microsoft.Toolkit.Uwp.Notifications.dll' could not be found
3>CSC : error CS0006: Metadata file 'H:\code\WindowsCommunityToolkit\Microsoft.Toolkit.Uwp.Samples.BackgroundTasks\bin\Debug\Microsoft.Toolkit.Uwp.Samples.BackgroundTasks.winmd' could not be found
========== Build: 0 succeeded, 3 failed, 13 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========

@onovotny which VS version did you use?

Copy link
Member

@michael-hawker michael-hawker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Built for me in VS 16.3 Preview 3 after a msbuild /restore

@clairernovotny
Copy link
Member Author

Merge away when ready

@michael-hawker
Copy link
Member

Yup @onovotny, @azchohfi was just trying again on his machine, and @Kyaa-dost was building on a fresh 16.2 instance so we could get more info on the NuGet issue, but will merge before the end of the day. Thanks!

@clairernovotny
Copy link
Member Author

As a separate issue, we should probably move the controls/design projects to SDK-style projects. I resisted doing so as part of this PR 😁. Is there a reason they're legacy project types?

@azchohfi azchohfi merged commit fb5bc7e into master Sep 9, 2019
@delete-merged-branch delete-merged-branch bot deleted the onovotny/vs2019 branch September 9, 2019 20:21
@azchohfi
Copy link
Contributor

azchohfi commented Sep 9, 2019

AFAIK, they are still legacy because nobody did the work yet. Is this on your backlog @michael-hawker ?

@michael-hawker
Copy link
Member

@azchohfi @onovotny, not sure why they weren't converted before. I do have an item in the #2989 release plan about the design projects needing to use the new VS format, that's what's giving us some of the warnings in VS about not loading the design projects. But we haven't started that yet.

@michael-hawker michael-hawker added this to the 6.0 milestone Sep 13, 2019
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

Successfully merging this pull request may close these issues.

4 participants