我正在尝试为 Windows 通用示例应用程序文件访问项目设置构建管道。
管道使用 Azure Pipelines Hosted VS2017 Image
当我在本地 VS 中运行它时,该解决方案就会构建。
Package.appxmanifest 包含
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.10586.0" MaxVersionTested="10.0.17763.0" />
Run Code Online (Sandbox Code Playgroud)
当管道尝试构建时,构建任务日志中会出现以下错误。
Error CS0234: The type or namespace name 'ApplicationModel'
does not exist in the namespace 'Windows'
(are you missing an assembly reference?)
Run Code Online (Sandbox Code Playgroud)
YAML 是
resources:
- repo: self
queue:
name: Hosted VS2017
demands:
- msbuild
- visualstudio
steps:
- task: NuGetCommand@2
displayName: 'NuGet restore'
- task: VSBuild@1
displayName: 'Build solution **\*.sln'
Run Code Online (Sandbox Code Playgroud)
该项目在我的机器上看起来像这样
它运行正确。
我注意到 Nuget Restore 任务的日志没有错误并且确实报告了
2018-12-16T01:27:31.8700773Z …Run Code Online (Sandbox Code Playgroud) I want to create simple toast notification to action center in windows 10 from a WPF app using this article.
But I got problem on Step 2:
Right click on the project => Add => Reference... => Windows => Core
What I checked:
And this is my csproj file:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' …Run Code Online (Sandbox Code Playgroud)